OpenJDK not ready for virtualized environments

Andrew Haley aph at redhat.com
Tue Jul 13 08:39:25 PDT 2010


On 07/13/2010 04:07 PM, Jaroslav Tulach wrote:
> Thanks for your comment Florian.
> 
> Dne úterý 06 
ervence 2010 15:55:32 Florian Weimer napsal(a):
>> * Jaroslav Tulach:
>>> After a discussion at #openjdk it looks like like a result of changing
>>> the defaults in amount of heap size and perm gen size. I believe the
>>> change is wrong. It shall rather check the # of available memory and if
>>> lower than 1GB stick with old defaults.
>>
>> Actually, the correct fix would be to reserve the address space
>> initially (so that you get one contiguous chunk), and allocate backing
>> store only as needed.
> 
> That would definitely be an improvement.

That's what it does already.

> On the other hand, do you think it makes sense to allocate more than
> is physically available? I have just 384MB or physical
> RAM. Requesting 640MB of virtual space looks too greedy to me.

>> On Linux, you can do this by specifying PROT_NONE to mmap() and use
>> mprotect() later. (MAP_NORESERVE is different, and difficult to get
>> right because the garbage collector must be prepared to deal with
>> SIGSEGV when the used portion of the heap expands during GC.)
> 
> This would be a change in upstream openjdk code, right?

No, that's what it does already.  We need to know why it's not working
for you.  See my message of July 6.

Andrew.



More information about the distro-pkg-dev mailing list