Skip to main content

GC Activity

This brief article explains how to monitor Java Garbage Collection activity in Ember.

In many cases Ember container runs with -verbosegc Java argument passed with JAVA_OPTS environment variable. If this is your case you can start monitoing container standard ouput to see GC activity:

docker compose logs -f ember

Alternatively you can attach to the container and run JStat tool:

Step 1: Attach to Ember container:

docker compose exec -it ember /bin/sh

Step 2. Run jstat. Usually each container runs Ember using PID 1 (you can verify this using jps command). To start tracing GC activities every second, run 

jstat -gc 1 1000

Don't forget stop this container after you done.