An explicit memory leak on Debian on Debian

I'm having serious problems with a Java application deployed to Tomcat:

  • OS: Debian 6.06 (kernel 3.2.13-grsec-xxxx-grs-ipv6)
  • Tomcat: 6.0.35
  • JDK: 1.6.0_37-b06
  • JVM parameters: -Xms3584m -Xmx3584m -XX: MaxPermSize = 256m -XX: ThreadStackSize = 1024
  • Number of threads: 200

After hours of using RSS (resident memory size) is 13 GB and VSZ virtual memory size is 15 GB.

The app has 2 servlets: Spring DispatcherServlet for some simple HTTP requests and CXFServlet for handling WebServices. The app doesn't have any special code.

The head used is about 2GB, so this is not a problem.

A SOAP request that returns a 4 MB response generates a 500 MB increase in RSS. Running the garbage collector does not affect RSS.

Do you know any possible reason for this memory increase or any tool that can help me investigate this issue. Thank.

pmap output

: 14226976K write / private: 13772580K total: 286844K

10 largest "anonymous" blocks:

0000000720000000 3670016 rw--- 0000000000000000 000:00000   [ anon ]
0000000000601000 2529344 rw--- 0000000000000000 000:00000   [ anon ]
0000000710000000  173504 rw--- 0000000000000000 000:00000   [ anon ]
00007f7484000000  131072 rw--- 0000000000000000 000:00000   [ anon ]
00007f7414000000  131068 rw--- 0000000000000000 000:00000   [ anon ]
00007f7424000000  131068 rw--- 0000000000000000 000:00000   [ anon ]
00007f7434000000  131068 rw--- 0000000000000000 000:00000   [ anon ]
00007f7494000000  131068 rw--- 0000000000000000 000:00000   [ anon ]
00007f737c000000  131024 rw--- 0000000000000000 000:00000   [ anon ]
00007f738c000000  131024 rw--- 0000000000000000 000:00000   [ anon ]

      

+3


source to share


2 answers


You can get a good idea of ​​what's going on inside your JVM with JVisualVM, an analysis tool that comes with Java. The guide can be found here.

JVisualVM



There are other more efficient tools out there (JProfiler 7 comes to mind), but they usually come with a license fee. You can try JProfiler free trial.

0


source


What exactly is the problem? Is it an OS replacement? Perhaps you only need to read the accepted answer to this question: Virtual memory usage from Java under Linux, too much memory used



If you are using NIO, this can also be a source of off-heap memory consumption, as described here: Why Sun JVM keeps consuming more and more RSS memory, even when heap sizes etc. stable?

0


source







All Articles