Why does the JVM consume more memory than the amount given to -Xmx?

Solution Verified - Updated -

Issue

  • We currently have JBoss instances with the JVM configured with the -Xmx2048m option. Despite that the output of the top command shows that each Java process is consuming over 3 GB of memory. Why is the Java instance consuming more than 2GB of memory?
  • If maximum heap size given for a JBoss is 2GB then why the same JBoss is consuming memory more than 2GB.
  • Why does our java process's memory usage (resident set size) exceed its configured max heap?
  • How works the JBoss memory consumption?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
  • Red Hat JBoss Enterprise Portal Platform (EPP)
  • Red Hat JBoss Enterprise Web Server (EWS)
  • Red Hat JBoss Enterprise SOA Platform (SOA-P)
  • Java

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In