Re: Heap size limit in java

From: Doug White <dwhite_at_gumbysoft.com>
Date: Fri, 18 Jun 2004 10:38:21 -0700 (PDT)
On Fri, 18 Jun 2004, Paul Dlug wrote:

> I originally posed to my question to freebsd-java. My issue was that I
> was unable to set a java heap size of more than approx 2000m using java
> (-Xmx2000m), it would fail with the error "COuld not reserve enough
> space for object heap.

What do you have MAXDSIZ set to?

You're running into the limits of 32 bit memory addressing, probably.
FreeBSD reserves ~1.5GB of the 4GB address space for the kernel's use, and
gives the rest to userland.  You can adjust this boundary with the
KVA_PAGES kernel compile option, but you have to do some mean tuning to
avoid running out of KVM.  I have nameservers set up this way, but named
is the only thing running on the system.

On 64 bit platforms (sparc64, amd64), the limit is far enough away that
you won't encounter this specific problem.

The command line in question is:
# /usr/local/jdk1.4.2/bin/java -Xms256m -Xmx2024m
-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite_at_gumbysoft.com          |  www.FreeBSD.org
Received on Fri Jun 18 2004 - 15:38:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:57 UTC