Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

server: autoscale JVM heap options #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

server: autoscale JVM heap options #39

wants to merge 2 commits into from

Conversation

igalic
Copy link

@igalic igalic commented May 4, 2016

rationale: the jvm settings for graylog server can be automatically
scaled based on the available memory. We set min & max heap to memory/2,
capping it at below 32G, to ensure the JVM will be able to use
-XX:+UseCompressedOops (see
https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html)
By default, PermSize and MaxPermSize is also set to the same value.
We leave the GC settings alone, since they are very sensible values for
Graylog2. However, we allow to provide additional java options, such as
-javaagent, or jmx options, which are useful for monitoring.

While we try hard to preserve backwards compatibility in the defaults
files, but this will cause restarts in default installations.

rationale: the jvm settings for graylog server can be automatically
scaled based on the available memory. We set min & max heap to memory/2,
capping it at below 32G, to ensure the JVM will be able to use
-XX:+UseCompressedOops (see
https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html)
By default, PermSize and MaxPermSize is also set to the same value.
We leave the GC settings alone, since they are very sensible values for
Graylog2. However, we allow to provide additional java options, such as
-javaagent, or jmx options, which are useful for monitoring.

While we try hard to preserve backwards compatibility in the defaults
files, but this will cause restarts in *default* installations.
@joschi
Copy link
Contributor

joschi commented May 4, 2016

@igalic Could you please file that PR against the new Puppet modules at https://github.com/Graylog2/puppet-graylog?

@igalic
Copy link
Author

igalic commented May 4, 2016

yesno.
This pr isn't really necessary there… given the template code for defaults file:

<%= @data.keys.sort.map {|k| "#{k} = #{@data[k]}" }.join("\n") %>

of course this doesn't give us auto-scaling, but at least it enables us to… do things…

But the other issue is that we still use this module, and more importantly, we still use graylog 1.x because we haven't had time and resources to upgrade yet.

PermSize is now set to 1/20 of the Heap size, with a lower bound of 256m
and a max of 1G.
we also clarify that m here, since by efault memory options passed to
the jvm are kB
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants