1

JVM (java 1.6) of JacORB notification service consumes memory beyond -Xmx value , which is set to 240MB.

java exe in Windows Task Manager cross 900MB Privatebytes, but My YourKit (Evalution Version) shows memory consumption as 28 MB.

Anybody has idea , why java exe cross -Xmx value

Thanks, Sharat Bhat

Sharat Bhat
  • 41
  • 1
  • 3

3 Answers3

3

-Xmx determines the maximum size of the Java heap that your process is allowed to use.

"Private Bytes" can (and does) include memory that's used by the JVM process but that's not part of the Java heap.

You should therefore not be expecting your process's memory usage as measured by "private bytes" to stay below the -Xmx setting.

Lastly, I'd expect YourKit's assessment of the heap usage to be pretty accurate.

Community
  • 1
  • 1
NPE
  • 486,780
  • 108
  • 951
  • 1,012
1

Have you set -Xss, too? Otherwise the stack is not limited.

Tobias
  • 9,170
  • 3
  • 24
  • 30
0

-Xmx sets the maximum heap space. But Java allocates memory for other spaces : the permgen space, containing class definitions, the stack of every thread, memory allocated in native code, etc.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255