Memory usage and garbage collector

Hi,

We are checking the memory usage for a few days, the memory grows up to 3.8 GB and then goes down. The maximum memory is set to 4GB.

Is the garbage collector which reduces the memory?
Why dows the memory go down at 3.8 GB?
Can I set the time when garbage collector works?

Yes, you probably wnat to change to G1GC. You can’t manually tell the garbage collector to work, but as far as I know G1GC is the most recommended on to change to for Ignition. Check out this post Gateway / Java question 7.7.2

1 Like

G1GC is the default for new installs. Java tries to not do difficult garbage collection until needed, so memory consumption approaching your limit is normal. G1GC is very good at doing “light” GC often so that big GC is rare.

Yes, you can ask the JVM to run GC early. Not recommended, and not guaranteed to actually do anything in a busy system.

1 Like

Java tries to not do difficult garbage collection until needed, so memory consumption approaching your limit is normal.

That being said, would this be a normal behavior using G1GC? The chart doesn’t seem to reflect all the changes I see in the memory bar, it goes between ~1000 to ~3500 every 8-10 seconds, we haven’t had any issues, but I am a little concerned.

Seems a bit more churn than a typical system, but not out of bounds for a busy one.