wood burning stoves 2.0*
The moose likes Performance and the fly likes java on linux, setting max heap size  (-Xmx) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "java on linux, setting max heap size  (-Xmx)" Watch "java on linux, setting max heap size  (-Xmx)" New topic
Author

java on linux, setting max heap size (-Xmx)

Cal Racey
Greenhorn

Joined: May 19, 2003
Posts: 2
I'm trying to set up a tomcat server to make use of my machine's 6 gig worth of memmory (it needs it).
However when i try to set the -Xmx option to set a maximum heap size over 1800m then i get an error saying "could not reserve enough space for object heap" . This behavior is the same with sun's j2sdk1.4.1_02, blackdowns j2sdk1.4.1-01 and bea's jrockit 8.
Does anyone know if heap size can get beyond 1.8 gig on linux, and if so how to do it?
Cal Racey
Greenhorn

Joined: May 19, 2003
Posts: 2
To answer my own question looks like just below 2 gig is all the memmory the jvm can use on linux.
see http://developer.java.sun.com/developer/bugParade/bugs/4435069.html
Fo the lazy this says:
"using Java on linux the maximum amount of memory you can use is -mx1960m,
ie you cannot use a 2GB Java heap. Ie Java -mx2000m -version will display
an error message about lack of heap space
Part of the problem is that linux has previously had restrictions with pthreads
using a 2GB heap even though the stack space per process is 'unlimited'"
my research seems to indicate that the limit is 4gig on sparcs so even suns own hardware has a fairly low limit.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java on linux, setting max heap size (-Xmx)
 
Similar Threads
catalina.out and java.lang.OutOfMemoryError
Memory Managment
java.lang.OutOfMemoryError
OutOfMemoryError during the pdf report generation
java.lang.OutOfMemoryError