users@glassfish.java.net

Re: System reporting Glassfish as using twice Xmx limit - why?

From: <glassfish_at_javadesktop.org>
Date: Sat, 08 May 2010 23:48:38 PDT

When you set -Xmx you're defining the maximum size of the heap, the memory space for the objects and arrays allocated by the jvm. There is additional non-heap memory that the jvm needs to allocate for other purposes. I suspect the number you're citing also includes the memory mapped to the shared libraries (.so) that the jvm depends on. Try running jconsole and you'll get at least some idea of the memory that the jvm is consuming.

At any rate, the short answer is that -Xmx is only part of the memory used by the jvm.
[Message sent by forum member 'jrosen']

http://forums.java.net/jive/thread.jspa?messageID=469065