[Swift-devel] Java memory strangeness

David Kelly davidk at ci.uchicago.edu
Mon Jul 2 16:49:48 CDT 2012


Hello,

I installed Sun Java on a new machine I am working on. When I try to run it I see this:

-bash-3.2$ java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

The machine has 27G of memory free. 

When I specify a value of -Xmx it seems to work fine until I get somewhere around between 4 and 8 gigs. From what I've read, the default heap size is 1/4th of the total memory up to 1 gig, so I have no idea why it's failing here.

I can run Swift manually from this machine because the swift shell script explicitly sets the heap size. 

But, I run into problems when I use ssh:pbs to the machine.

How is the heap size determined when using ssh/coasters/bootstrapping? I've tried setting SWIFT_MAX_HEAP and COG_OPTS in my bashrc but that didn't seem to help. I might be able to get around this by creating some kind of java wrapper that explicitly sets heap size.. just curious how it currently gets set in this situation.

Thanks,
David



More information about the Swift-devel mailing list