metwork-framework / mfadmin

metwork/mfadmin module
http://metwork-framework.org
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

We should try to configure elasticsearch number of rotated gc.log files and their size #266

Open thebaptiste opened 1 year ago

thebaptiste commented 1 year ago

See : https://stackoverflow.com/questions/69913079/jvm-11-gc-log-rotation-initialization-of-output-file-var-log-cassandra-gc-lo The default seems to be 32 files of 64M each.

thebaptiste commented 1 year ago

It's in jvm.options file, lines :

## JDK 8 GC logging

8:-XX:+PrintGCDetails
8:-XX:+PrintGCDateStamps
8:-XX:+PrintTenuringDistribution
8:-XX:+PrintGCApplicationStoppedTime
8:-Xloggc:logs/gc.log
8:-XX:+UseGCLogFileRotation
8:-XX:NumberOfGCLogFiles=32
8:-XX:GCLogFileSize=64m

# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise
# time/date parsing will break in an incompatible way for some date patterns and locals
9-:-Djava.locale.providers=COMPAT

We can change the number of rotated log files, their size and the path to the files.