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 - PERF-201Getting issue details... STATUS - POC to investigate Garbage Collection in FOLIO modules
Investigations
Use -Xlog:gc flag to enable logging when a module loads up. For example, we used mod-data-export to experiment. It was using openjdk-11.
Experiments:
- 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.
My laptop is running on 6 cores and openjdk-11.0
2. Running mod-data-export in AWS ECS
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.
mod-data-export is running inside a Docker Container which is running openjdk-11
Start recording: execute the workflow
Stop recording and import to JMX file:
Open imported JMX file in JMeter:
Pros:
- Easy to install
- Easy to record HTTP(S) request in browser and import to JMeter script
- No need to set up proxy manually, everything is handled by the plugin
- It is open-source with 70k+ users
- The plugin is frequently maintained and upgraded
- The plugin generates clean and accurate JMeter script with almost no junk files
- Replay recorded JMeter script without any changes
- Captures HTTP(S) calls to the backend which is difficult to track manually
- The JMeter script can be edited in the browser before importing
- Automates and simplifies JMeter script creation process
Cons:
- Recorded JMeter script need to be refactored to comply with best practices
- Need FOLIO UI modules installed
This plugin was tested against the check-in-check-out workflow and works well with all HTTP(S) verbs.
Outcome:
After weighing in both approaches and after discussing with the team, approach B was accepted.
Links
https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.html