diff --git a/roles/graylog/defaults/main.yml b/roles/graylog/defaults/main.yml index db61d55..5577914 100644 --- a/roles/graylog/defaults/main.yml +++ b/roles/graylog/defaults/main.yml @@ -69,3 +69,6 @@ graylog_journal_max_size: 5 # on el7, TLSv1.3 seems to break filebeat connections, so, just enable TLSv1.2 graylog_tls_versions: - TLSv1.2 + +# Mem to allocate to the JVM (Xmx / Xms) +graylog_jvm_mem: 2g diff --git a/roles/graylog/templates/graylog-server.service.j2 b/roles/graylog/templates/graylog-server.service.j2 index ecd2a8e..764ffca 100644 --- a/roles/graylog/templates/graylog-server.service.j2 +++ b/roles/graylog/templates/graylog-server.service.j2 @@ -12,7 +12,7 @@ User=graylog Group=graylog LimitNOFILE=64000 ExecStart=/usr/bin/java \ - -Xms2g -Xmx2g -XX:NewRatio=1 -server -XX:+ResizeTLAB \ + -Xms{{ graylog_jvm_mem }} -Xmx{{ graylog_jvm_mem }} -XX:NewRatio=1 -server -XX:+ResizeTLAB \ -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled \ -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow \ -cp {{ graylog_root_dir }}/app/graylog.jar{% if graylog_libs.keys() | list | length > 0 %}{% for lib in graylog_libs.keys() | list %}:{{ graylog_root_dir }}/app/lib/{{ lib }}-{{ graylog_libs[lib].version }}.jar{% endfor %} {% endif %} \