The limitation you are hitting is one of the 32 bit operating system.
Only 3GB of the possible 4GB available to a 32 bit process is available
with the other 1GB used for mapping the kernel and other operating
system areas. Then the o/s and java have their own overheads reducing
that 3GB by a bit more - around 300MB in our environment here and a
little bit more for you.

In all cases here we are talking about the *virtual* memory available to
each process not the amount of physical memory in the machine.

The easiest solution would be to switch to a 64 bit version of RHEL5 as
that removes the 3:1GB user:kernel split and allows use of the full 4GB
(more or less). Now your 32 bit process can use that extra 1GB and that
raises the amount of virtual memory available to your java process by
about 1GB. That should let you use a -Xmx3660m value (or thereabouts).

You can run a 32 bit JVM on 64 bit Linux with no problems in my experience.

If you need more memory than ~3.7GB then you have to change to use the
64 bit JVM on a 64 bit Linux. There you will find your only limits are
the amount of RAM/swapspace available to you.

[tre...@here ~]$ java -Xmx8900000m -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
[tre...@here ~]$

Looks like I miscounted the number of zeros involved, that's 'only' 8.9TB :)

Jay wrote:
> Trevor
>  
> Thank you for your reply. In our installation we are seeing:
>  
> Running 32 bit java on 32 bit RHEL5 you will get up to about 2660MB.
>  
> With a Kernel patch, our RHEL5 (Tikanga) is able to access 16 GB of RAM.
>  
>  
> If 32 bit JRE is not able to access more than 2700 MB, would like to
> know, if it is the limitation of JRE or the OS ?
>  
> Would like to know, if there is there any patch to circumvent this
> problem ?
>  
> Thanks
>  
>
> --- On *Mon, 1/11/10, Trevor Hemsley /<[email protected]>/*
> wrote:
>
>
>     From: Trevor Hemsley <[email protected]>
>     Subject: Re: [rhelv5-list] Max address space for a process in 32
>     bit version of Linux
>     To: [email protected], "Red Hat Enterprise Linux 5 (Tikanga)
>     discussion mailing-list" <[email protected]>
>     Date: Monday, January 11, 2010, 10:55 AM
>
>     Running 32 bit java on 32 bit RHEL5 you will get up to about
>     2700MB on a good day.
>     Running 32 bit java on 64 bit RHEL5 you will get up to 3700MB
>     Running 64 bit java on 64 bit RHEL5 you will get something
>     ridiculous like 89TB.
>
>     To test you can run
>
>     java -Xmx2700m -version
>
>     and if it does not work, reduce the number by a fairly large
>     amount then binary search the difference.
>
>     On 10/01/2010 17:49, Jay wrote:
>>     Hello
>>      
>>     OS : Redhat Enterprise Linux Ver 5 (Tikanga)
>>      
>>     Would like to know what is the maximum memory that a java process
>>     can access ?
>>      
>>     $ java -version
>>     java version "1.6.0_14"
>>     Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
>>     Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
>>     Thanks
>>
>>
>>
>>     _______________________________________________
>>     rhelv5-list mailing list
>>     [email protected]
>>     https://www.redhat.com/mailman/listinfo/rhelv5-list
>>       
>
>     -- 
>
>     Trevor Hemsley
>     Infrastructure Engineer
>     .................................................
>     *C A L Y P S O
>     *Brighton, UK   
>
>     OFFICE    +44 (0) 1273 666 350
>     FAX       +44 (0) 1273 666 351
>
>     .................................................
>     www.calypso.com
>
>     This electronic-mail might contain confidential information
>     intended only for the use by the entity named. If the reader of
>     this message is not the intended recipient, the reader is hereby
>     notified that any dissemination, distribution or copying is
>     strictly prohibited.
>
>     *P */*/Please consider the environment before printing this e-mail /*/
>
>

-- 

Trevor Hemsley
Infrastructure Engineer
.................................................
* C A L Y P S O
* 4th Floor, Tower Point,
44 North Road,
Brighton, BN1 1YR, UK   

OFFICE  +44 (0) 1273 666 350
FAX     +44 (0) 1273 666 351

.................................................
www.calypso.com

This electronic-mail might contain confidential information intended
only for the use by the entity named. If the reader of this message is
not the intended recipient, the reader is hereby notified that any
dissemination, distribution or copying is strictly prohibited.

* P * /*/ Please consider the environment before printing this e-mail /*/

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to