As we see that the resident memory (RES) got for the java/jvm is 3.9 GB. As we are on an 32-bit system, that is basically pushing the limits of the address space. For this to happen the max heap for the JVM being run should have been set at least 4GB.
In principle no Java application is designed to use such a large heap. This can mean various things:
- The JVM garbage collector is not working ok, or cannot catch up. The above generally points to a configuration issue with the use of JVM or less likely a bug with JVM. Otherwise:
- The java threads are not destroyed when they are not needed anymore
- The java threads does not release memory when they should.That is basically an application implementation problem. To diagnose that java thread dumps would be useful. (kill -QUIT will do it but the target dump file depends on the application configuration using
the JVM)
Apart from that from the Linux perspective if you can do the following it would be quite useful along with the other actions requested before:
- Using top determine the java process with a high RES value, get the
- Run:
# cat /proc//maps > /tmp/java.maps