OpenJDK not ready for virtualized environments
Jaroslav Tulach
Jaroslav.Tulach at Sun.COM
Tue Jul 13 08:07:19 PDT 2010
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. 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? If that helped to
lower the amount of protected memory for everyone in openjdk as well as
classical Oracle JDK, it would be almost perfect.
-jt
More information about the distro-pkg-dev
mailing list