Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] max-old-space-size #52310

Merged
merged 14 commits into from
Dec 11, 2019
18 changes: 16 additions & 2 deletions docs/setup/production.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* <<enabling-ssl>>
* <<load-balancing>>
* <<high-availability>>
* <<memory>>

How you deploy Kibana largely depends on your use case. If you are the only user,
you can run Kibana on your local machine and configure it to point to whatever
Expand All @@ -27,7 +28,7 @@ You can use {stack} {security-features} to control what {es} data users can
access through Kibana.

When {security-features} are enabled, Kibana users have to log in. They need to
have a role granting <<kibana-privileges, Kibana privileges>> as well as access
have a role granting <<kibana-privileges, Kibana privileges>> as well as access
to the indices they will be working with in Kibana.

If a user loads a Kibana dashboard that accesses data in an index that they
Expand Down Expand Up @@ -125,4 +126,17 @@ elasticsearch.hosts:
--------

Related configurations include `elasticsearch.sniffInterval`, `elasticsearch.sniffOnStart`, and `elasticsearch.sniffOnConnectionFault`.
These can be used to automatically update the list of hosts as a cluster is resized. Parameters can be found on the {kibana-ref}/settings.html[settings page].
These can be used to automatically update the list of hosts as a cluster is resized. Parameters can be found on the {kibana-ref}/settings.html[settings page].

[float]
[[memory]]
=== Memory
Kibana has a default memory limit of 1.4 GB, and in most cases, we recommend leaving this unconfigured. In some scenarios, such as running on containers with limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the max old space is generally 1.4GB, it is based on system information, like memory available. @mistic did a deep dive into this a while back and can comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah right, good catch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tylersmalley exactly. Nodejs calculates the default allocated heap according multiple variables, processor architecture, total available physical memory etc (the logic can be found here https://github.com/v8/v8/blob/master/src/heap/heap.cc#L227)

So in order to be able to specify what is our minimum required memory we need to proceed what we have been discussing of distribute kibana with an override NODE_OPTIONS for heap. So, at least for now, we should not specify that information on the docs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a clarifier, `default maximum memory limit. it's not very specific but I'm hoping it's good enough

resources, it may make sense to tweak limits to meet more specific requirements.

You can modify this limit by setting ``--max-old-space-size` in the `NODE_OPTIONS` environment variable. For deb and rpm, packages this is passed in via `/etc/default/kibana` and can be appended to the bottom of the file.
jbudz marked this conversation as resolved.
Show resolved Hide resolved

The option accepts a limit in MB:
--------
NODE_OPTIONS="--max-old-space-size=2048" bin/kibana
--------