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 size?
  • How works the JBoss memory consumption?
  • Why is JBoss memory usage exceeding the MaxHeapSize?

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)
  • OpenJDK

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content