Heap memory is constantly increasing every time

jconsole heap graph

look at my schedule every time is touching new. my vm arguments are as follows:

-XX:+UseCompressedOops -XX:+TieredCompilation -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 

is this good or is something wrong with the arguments?

+6
source share
1 answer

It looks fine to me.

Objects are created in the Eden space, and you seem to have about 400 MB Eden. (Size between maximum and minimum memory usage)

This means that you create about 3 of them every 3 hours or about 400 MB / hour. Note: your monitoring tool can create a lot or even most of this garbage.

After each small collection, the remaining objects are added to the Survivor spaces. Once these objects have been copied enough times, they are added to the space on which they are stored.

Since you are using JMX / RMI, this can be the main cause of garbage in eden and stored objects. I suggest you reconnect and complete the full GC. This will let you know how much is actually saved.

If the amount remaining after a full GC increases, a memory leak may occur.

+1
source

All Articles