activemq memory usage 4 times greater than Maximum heap allocated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

activemq memory usage 4 times greater than Maximum heap allocated

Abhinav2510
Hi All,

I have below configuration for my java actvemq process where Xmx is 15360M
but when I see the process usage of memory using glance I see  RSS 41.8gb
and VSS  51.6gb . pmap <process_id>|grep total gives me  total 54059348K. I
am not sure what is happening in activemq that is causing this much amount
of memory being utilized. While heap usage is pretty low till 60%.

In the output of pmap I see lot of anon blocks. Please find attached PMAP
output


/XXXXX 111922      1 22 14:30 pts/0    00:04:26
/u/users/user/jdk1.7.0_71/bin/java -Xms1024M -Xmx15360M -Xss512K
-XX:+UseG1GC -XX:NewRatio=4 -XX:InitiatingHeapOccupancyPercent=45
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/x/logs/AMQGC.log
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=20M
-Djava.util.logging.config.file=logging.properties
-Djava.security.auth.login.config=/u/users/user/POSInterfaces/apache-activemq-5.13.2//conf/login.config
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote
-Djava.awt.headless=true
-Djava.io.tmpdir=/u/users/user/POSInterfaces/apache-activemq-5.13.2//tmp
-Dactivemq.classpath=/u/users/user/POSInterfaces/apache-activemq-5.13.2//conf:/u/users/user/POSInterfaces/apache-activemq-5.13.2//../lib/:
-Dactivemq.home=/u/users/user/POSInterfaces/apache-activemq-5.13.2/
-Dactivemq.base=/u/users/user/POSInterfaces/apache-activemq-5.13.2/
-Dactivemq.conf=/u/users/user/POSInterfaces/apache-activemq-5.13.2//conf
-Dactivemq.data=/u/users/user/POSInterfaces/apache-activemq-5.13.2//data
-jar /u/users/user/POSInterfaces/apache-activemq-5.13.2//bin/activemq.jar
start/
pmap.txt <http://activemq.2283324.n4.nabble.com/file/t378515/pmap.txt>  



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: activemq memory usage 4 times greater than Maximum heap allocated

erik-wramner
This could be
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8180048, a memory
leak in G1. If so you can work around it by switching to concurrent mark
sweep or you can upgrade to the very latest Java SE 8u144 from Oracle, where
the bug should be fixed. Not sure if the fix is in OpenJDK yet.
Alternatively you could enable native memory tracking (not in production!)
and check if it is the symbol area that grows, more specifically from
interned strings.

-Erik



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: activemq memory usage 4 times greater than Maximum heap allocated

Abhinav2510
Thank you for suggestion but I checked the Bug tracker it says it affetcts
Java 8,9 . We are still using Java 7.

Thanks & Regards
Abhinav Suryawanshi



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: activemq memory usage 4 times greater than Maximum heap allocated

erik-wramner
Java 7 is end of life, so when I filed the bug I didn't include it in
affected versions. I'm almost 100% certain that it is affected as well. The
bug is in G1.

-Erik



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: activemq memory usage 4 times greater than Maximum heap allocated

Abhinav2510
Hi Eric,

Thank you for your valuable input. Let me test with other GC algo and get
back to you with results. I deeply appreciate your efforts.

- Abhinav Suryawanshi



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: activemq memory usage 4 times greater than Maximum heap allocated

Abhinav2510
Thank you Eric,
That was the issue indded. Changing GC algorithm helped dramatically reduce
memory consumption.

Abhinav SUryawanshi



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html