[Swift-devel] Java memory strangeness

David Kelly davidk at ci.uchicago.edu
Tue Jul 3 12:27:03 CDT 2012


I tried with the default version of Java installed on that system, as well as a version I installed locally and saw the same behavior in both. I ended up just writing a wrapper shell script that calls the real Java binary with a specified heap size. This seems to work well enough for now.

David

----- Original Message -----
> From: "David Kelly" <davidk at ci.uchicago.edu>
> To: "swift-devel Devel" <swift-devel at ci.uchicago.edu>
> Sent: Monday, July 2, 2012 4:49:48 PM
> Subject: [Swift-devel] Java memory strangeness
> 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
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel



More information about the Swift-devel mailing list