[geeks] Upper Memory Limit - Java

Francois Dion francois.dion at gmail.com
Wed Jan 30 13:26:59 CST 2008


On Jan 30, 2008 12:34 PM, Doug McLaren <dougmc at frenzied.us> wrote:
> On Tue, Jan 29, 2008 at 01:56:46PM -0800, Brian Dunbar wrote:
>
> | We have an EDI program (it's new) that blows up when 'many large files'*
> | are run through it.
> |
> | But I'm not here to complain about that.  During troubleshooting the
> | vendor rep mentioned that Java has an upper memory limit and you can't
> | allocate any more memory to it than X.
> |
> | Indeed we're giving the JVM 3850m of ram on startup
> |
> | /vendor-dir/bin/java -Xms3850m -Xmx3850m
> |
> | And it won't start with any more than that.
> |
> | But .. an upper memory limit on Java?  I can believe there is a point past
> | where it's simply not wise to allocate ram but .. is she mis-informed?
>
> No, she's not.  Though it's generally not about `not being wise' -- it
> just breaks.
>
> 32 bit JVMs tend to blow up with -Xmx set at 2 GB or higher.  Of
> course, in general, on a 32 bit platform, no process can allocate more
> than 4 GB of memory, and your OS has to jump through some hoops to
> even have that much memory available.

Under windows the 32 bit JVM will only allow allocation of up to 1.6GB
or so due to windows limitations. Under solaris 32 bit JVM, it will be
2GB. Under solaris 64 bit, but with the 32 bit JVM, it will be almost
4GB, but not quite. Brian's experience seems quite normal.

To address > you will need a 64 bit JVM, but then the app will
probably need a new build.

Francois



More information about the geeks mailing list