mirror of
https://github.com/valitydev/salt-common.git
synced 2024-11-06 10:25:23 +00:00
Es cold gc change (#47)
This commit is contained in:
parent
fccded2aa8
commit
c3041180a5
@ -54,6 +54,7 @@ jvm = pillar('elastic:jvm', {})
|
||||
jvm_heap_size = jvm.get('heap_size', '1g')
|
||||
jvm_stack_size = jvm.get('stack_size', '1m')
|
||||
jvm_extra_options = jvm.get('extra_options', {})
|
||||
jvm_gc_type = jvm.get('gc_type', 'CMS')
|
||||
jvm_gc_occupancy_value = jvm.get('gc_occupancy_value', '75')
|
||||
|
||||
tls = pillar('elastic:tls', {})
|
||||
@ -127,7 +128,8 @@ File.managed(
|
||||
mode=644, user='root', group='root',
|
||||
template='jinja', source='salt://elasticsearch/files/jvm.options.tpl',
|
||||
defaults={'heap_size': jvm_heap_size, 'stack_size': jvm_stack_size,
|
||||
'gc_occupancy_value': jvm_gc_occupancy_value, 'extra_options': jvm_extra_options},
|
||||
'gc_type': jvm_gc_type, 'gc_occupancy_value': jvm_gc_occupancy_value,
|
||||
'extra_options': jvm_extra_options},
|
||||
require=[File(conf_path)])
|
||||
|
||||
File.managed(
|
||||
|
@ -18,10 +18,16 @@
|
||||
################################################################
|
||||
|
||||
## GC configuration
|
||||
{% if gc_type == 'G1GC' %}
|
||||
-XX:+UseG1GC
|
||||
-XX:G1ReservePercent=25
|
||||
-XX:InitiatingHeapOccupancyPercent={{ gc_occupancy_value }}
|
||||
-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=10,filesize=64m
|
||||
{% else %}
|
||||
-XX:+UseConcMarkSweepGC
|
||||
-XX:CMSInitiatingOccupancyFraction={{ gc_occupancy_value }}
|
||||
-XX:+UseCMSInitiatingOccupancyOnly
|
||||
|
||||
{% endif %}
|
||||
## optimizations
|
||||
|
||||
# pre-touch memory pages used by the JVM during initialization
|
||||
|
Loading…
Reference in New Issue
Block a user