Skip to end of banner
Go to start of banner

JVM Garbage Collection

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


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-201 - Getting 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. 

Observations:

  1. 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

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.

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. 

https://guide.blazemeter.com/hc/en-us/articles/206732579-The-BlazeMeter-Chrome-Extension-Record-JMeter-Selenium-or-Synchronized-JMeter-and-Selenium-The-BlazeMeter-Chrome-Extension:-Record-JMeter,-Selenium,-or-Synchronized-JMeter-and-Selenium

https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.html

https://jmeter-plugins.org/

https://guide.blazemeter.com/hc/en-us/articles/115004970329-Chrome-Extension-Changelog-Chrome-Extension-Changelog



  • No labels