new14
new14

Reputation: 723

Centos RES memory keep increasing and crossed initial and maximum memory for java

We have a java application running on Centos 6.4 what we notice is that the RES is around 378m which is more then the allocated max that is 256m. Does this signify that we the application is leaking? So far there is no GC happening yet but many YGC? What does this indicate?

Below is my jstat results and also the MAT results.

Timestamp         S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   
      2331438.3  56.95   0.00  62.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331443.3  56.95   0.00  62.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331448.4  56.95   0.00  62.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331453.4  56.95   0.00  62.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331458.4  56.95   0.00  62.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331463.4  56.95   0.00  62.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331468.4  56.95   0.00  62.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331473.4  56.95   0.00  63.24  82.79  80.37   1362   54.337     0    0.000   54.337
      2331478.4  56.95   0.00  63.24  82.79  80.37   1362   54.337     0    0.000   54.337
      2331483.4  56.95   0.00  63.78  82.79  80.37   1362   54.337     0    0.000   54.337
      2331488.4  56.95   0.00  63.78  82.79  80.37   1362   54.337     0    0.000   54.337
      2331493.4  56.95   0.00  63.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331498.4  56.95   0.00  63.79  82.79  80.37   1362   54.337     0    0.000   54.337
      2331503.4  56.95   0.00  63.79  82.79  80.37   1362   54.337     0    0.000   54.337

MAT Results

java.lang.ref.Finalizer @ 0xf5e19670 40 92,688 
next java.lang.ref.Finalizer @ 0xf5e1a6a8 40 93,024 
next java.lang.ref.Finalizer @ 0xf5e1bda0 40 122,768 


Suspect 1.

The class "java.lang.ref.Finalizer", loaded by "<system class loader>", occupies 1,337,176 (30.93%) bytes. The memory is accumulated in one instance of "java.lang.ref.Finalizer" loaded by "<system class loader>".

Keywords
java.lang.ref.Finalizer


Suspect 2
 6 instances of "com.mysql.jdbc.JDBC4Connection", loaded by "sun.misc.Launcher$ExtClassLoader @ 0xf58bf000" occupy 432,624 (10.01%) bytes. 

Biggest instances:

•com.mysql.jdbc.JDBC4Connection @ 0xf61c54f8 - 94,864 (2.19%) bytes. 
•com.mysql.jdbc.JDBC4Connection @ 0xf61c4678 - 86,600 (2.00%) bytes. 
•com.mysql.jdbc.JDBC4Connection @ 0xf61c4bf8 - 85,456 (1.98%) bytes. 
•com.mysql.jdbc.JDBC4Connection @ 0xf626c348 - 68,000 (1.57%) bytes. 
•com.mysql.jdbc.JDBC4Connection @ 0xf626c7d0 - 68,000 (1.57%) bytes. 


Keywords
com.mysql.jdbc.JDBC4Connection
sun.misc.Launcher$ExtClassLoader @ 0xf58bf000

Upvotes: 2

Views: 305

Answers (1)

Alexey Ragozin
Alexey Ragozin

Reputation: 8409

-Xmx limits only heap memory space for JVM Besides heap space JVM is allocating memory for

  • Perm space (class metadata) up to 64 MiB by default
  • Thread stacks (256k per thread, configurable)
  • I/O buffers and off-heap buffers explicitly allocated by application

Upvotes: 1

Related Questions