Merge pull request #10 from wazuh/elasticsearch_jvm

Until 32000m for JVM memory, thanks @jlruizmlg
This commit is contained in:
Jose Luis 2017-08-18 13:13:10 -07:00 committed by GitHub
commit e75d3acf4e
2 changed files with 14 additions and 4 deletions

View File

@ -3,5 +3,5 @@ elasticsearch_cluster_name: wazuh
elasticsearch_node_name: node-1
elasticsearch_http_port: 9200
elasticsearch_network_host: 127.0.0.1
elasticsearch_jvm_xms: 1g
elasticsearch_jvm_xms: 2000
elastic_stack_version: 5.5.0

View File

@ -1,3 +1,4 @@
#jinja2: trim_blocks:False
# {{ ansible_managed }}
## JVM configuration
@ -19,9 +20,18 @@
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms{{ elasticsearch_jvm_xms }}
-Xmx{{ elasticsearch_jvm_xms }}
{% if elasticsearch_jvm_xms is defined %}
{% if elasticsearch_jvm_xms < 32000 %}
-Xms{{ elasticsearch_jvm_xms }}m
-Xmx{{ elasticsearch_jvm_xms }}m
{% else %}
-Xms32000m
-Xmx32000m
{% endif %}
{% else %}
-Xms{% if ansible_memtotal_mb < 64000 %}{{ ((ansible_memtotal_mb|int)/2)|int }}m{% else %}32000m{% endif %}
-Xmx{% if ansible_memtotal_mb < 64000 %}{{ ((ansible_memtotal_mb|int)/2)|int }}m{% else %}32000m{% endif %}
{% endif %}
################################################################
## Expert settings