voxpupuli / puppet-opensearch

Puppet module to manage OpenSearch
Apache License 2.0
4 stars 4 forks source link

GC config hardcoded in template #28

Open siliconalchemy opened 1 year ago

siliconalchemy commented 1 year ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

class { 'opensearch':
}

What are you seeing

JVM GC settings are hardcoded in template templates/jvm.options.epp

What behaviour did you expect instead

It would be very helpful to be configurable through manifests, in particular Xloggc, NumberOfGCLogFiles and GCLogFileSize. Otherwise the GC logs can fill up the filesystem considerably, even in small installs, with Gbs of largely useless logs.

siliconalchemy commented 1 year ago

It's this line that is used now instead of NumberOfGCLogFiles and GCLogFileSize:

# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/opensearch/gc.log:utctime,pid,tags:filecount=2,filesize=16m
crazymind1337 commented 5 months ago

@siliconalchemy are you satisfied with the change I have made? If so you can close this issue.

siliconalchemy commented 4 months ago

Thankyou! Are all the entries for different jdk versions still applicable to opensearch? It's quite confusing to a non-java user that's just looking to use opensearch. I note that even in the reference the default settings aren't mentioned, or any clear note on how to change the default logging - for a non-java user it's relatively hard work to find out how to turn off GBs worth of useless (to a user) logs.

crazymind1337 commented 4 months ago

Well I just used the default config from the package. I think they added this kind of config to ensure opensearch works, if somebody decided to use another jdk for some reason.