OpenJDK and boxes with lots of RAM
David Holmes
david.holmes at oracle.com
Fri Nov 18 04:02:37 PST 2011
On 18/11/2011 9:08 PM, Jan Just Keijser wrote:
> David Holmes wrote:
>> Hi Jan,
>>
>> You can use the environment variable _JAVA_OPTIONS to set -Xmx.
>>
>> The other option is to use your own wrapper script for launching the
>> VM that contains whatever flags you need.
>>
>>
> we would really like to avoid a wrapper script. The env var
> _JAVA_OPTIONS is a nice workaround, although I'm not thrilled about the
> fact that I now see
>
> $ java -version
> Picked up _JAVA_OPTIONS: -Xmx256M
> java version "1.6.0_20"
> OpenJDK Runtime Environment (IcedTea6 1.9.10)
> (rhel-1.23.1.9.10.el5_7-x86_64)
> OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
>
>
> Is there any way to get rid of that message?
No - we've complained about it ourselves. I guess it is trying to ensure
that any implicit options picked up from _JAVA_OPTIONS is made explicit
but it is somewhat annoying.
David
>
> thx,
>
> JJK / Jan Just Keijser
>
>> On 17/11/2011 11:28 PM, Jan Just Keijser wrote:
>>> hi all,
>>>
>>> I would like to report an issue with OpenJDK 1.6 (and Oracle Java 6u29)
>>> that we have run into on our grid computing farm:
>>>
>>> the latest&greatest worker nodes have 12 cores and 48 GB of RAM ; we
>>> offer a maximum 12 jobs slots on these worker nodes, in order to
>>> accomodate small and large jobs (users can requests 1 - 12 cores). To
>>> ensure that the different jobs don't interfere with each other we also
>>> set a VMEM limit for each job slot. The current VMEM limit is 48 / 12 =
>>> 4 GB RAM per job slot. Each single core job that starts has a 'ulimit
>>> -v' of 4,000,000 .
>>>
>>> On these boxes OpenJDK 'java' refuses to start:
>>>
>>> $ java -version
>>> Error occurred during initialization of VM
>>> Could not reserve enough space for object heap
>>> Could not create the Java virtual machine.
>>>
>>> After some debugging I found that this is caused by the default maximum
>>> heap size which java allocates: it scans /proc/meminfo to extrac the
>>> amount of RAM installed and divides it by 4 ; an 'strace' shows that
>>> indeed 'java' tries to do an 'mmap' call for 12 GB of RAM !
>>>
>>> A work around is to always specify '-Xmx2GB' or something similar but
>>> this does not work for all software that we use , plus , I find it
>>> annoying that I have to tell this to all my users.
>>>
>>> What I would like to see is a system-wide setting for the initial
>>> maximum heap size, so that
>>> java -version
>>> "just works" . Is this possible?
>>>
>>> thanks in advance,
>>>
>>> JJK / Jan Just Keijser
>>>
>>>
>
More information about the jdk6-dev
mailing list