Overview
While profiling a FOLIO instance running Juniper release, we found out that it is using Mark and Sweep Garbage Collection phases but were not sure which Garbage Collection algorithm it was using. We created
- POC to investigate Garbage Collection in FOLIO modules. Investigate if we can improve performance by using G1 Garbage Collection which is an asynchronous and non-blocking process. Jira Legacy server System JiraJIRA columnIds issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 01505d01-b853-3c2e-90f1-ee9b165564fc key PERF-201
...
Use -Xlog:gc flag to enable logging when a module loads up. For example, we used mod-data-export to experiment.
Experiments:
All experiments were carried out on openjdk-11.0
- Running mod-data-export locally on my laptop
java -jar -Xlog:gc=debug:file=gc.log target/mod-data-export-fat.jar
JVM automatically selected G1 Garbage Collector. G1 (Garbage First) Garbage Collector is designed for applications running on multi-processor machines with large memory space.
...
2. Running mod-data-export in AWS ECS in m5.xlarge EC2 instance type
JVM automatically selected Serial Garbage Collection. The Serial algorithm uses a single thread to do Garbage Collection. When JVM runs Garbage Collection, Java applications pause for few milliseconds.
...
3. Tried to override using -XX:+AlwaysActAsServerClassMachine flag. However, Data Export App in UI fails to poll the backend and crashes frequently.
...
5. Tested in a cap planning environment that is running 8 Cores(m5.2xlarge EC2 instance type) but JVM is still using Serial Garbage Collection
...
https://serverfault.com/questions/691659/count-number-of-allowed-cpus-in-a-docker-container
http://www.herongyang.com/Java-GC/Serial-Collector-GC-Log-Message-Format.html
https://stackoverflow.com/questions/52474162/why-is-serialgc-chosen-over-g1gc
...