Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: OS X VM memory allocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS X VM memory allocation



At 10:50 AM -0700 8/30/01, Andy Belk wrote:
You found a bug.

Aww, shucks... :-)

...
Invoking a client using

java -mxYm <className>

works fine for values of Y up to 550 on the G4 but somewhere between 550 and 600 invocation results in an immediate bus error.

This is the bug. I filed it on your behalf - #2764646 if you are interested. If you use the -XX:-UseSharedGen flag, the -mx value behaves as one would expect. You'll find the current hard limit around 950MB:

Love it. A scriptable work-around requiring no code mods. Were they all this simple!

...
[/Sources/Hello] java -XX:-UseSharedGen -mx1000M -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
zsh: abort java -XX:-UseSharedGen -mx1000M -version

The latter error is what one should see if there's not enough VM available (yes, we could make it prettier ;-).

It's not too bad - much better than 'bus error'. I will note that trying it on a 1.3.0 build, mixed mode results in a HotSpot internal 640 error at a much lower value - ~700mb. I presume that's of more academic interest, though.

Is there some upper limit on what the VM can handle as a memory specification? Network bandwidth between clients and the servers is my current bottleneck and running fewer, fatter clients would allow me to scale without upgrading the network.

There is currently a hard limit for technical reasons (related to shared library location in VM). This is obviously pathetically small and we will try to raise the limit at some point in the future.

To be truly useful, it would also require raising the 1.5gb limit on a G4's memory configuration, as well. Otherwise, you're just living in thrash land (aka make your G4 behave like an SE).


Also, is there someway I can get the system to allocate more virtual memory (that the JVM could grab)? The UNIX admin in me keeps whispering "allocate additional swap partitions" which obviously doesn't apply here...

Neglecting my comment above, the theoretical limit *should* be something like our total VM space (4GB) minus 256MB, minus space for thread stacks and dylibs.

Given my CPU/memory profile, the current constraint should stand me in good stead until I have a GHz box... say Christmas? ;-)


Hope this helps,

Substantially!

- Dave


References: 
 >Re: OS X VM memory allocation (From: Andy Belk <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.