I was reading this blog and appreciate if someone can help me out.
In the first chart , it says,
This screenshot from Marvel shows a heap that is too small: the garbage collections are barely able to free objects leaving little heap space free after each collection.
I understand that gc's are not able to free heap and won't go under 75 % .
However, I dont quite understand what the description of second chart trying to say.
This screenshot from Marvel shows a heap that is too large; the heap is almost exclusively garbage before each collection and this memory is likely better utilized by the filesystem cache.
The chart looks like there is a large consumption of heap usage periodically thus it leads to long gc which dominates the cpu usage. However, why is this sovled by setting the heap size lower ?