From owner-freebsd-current@FreeBSD.ORG Fri Jun 18 17:38:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9ECE16A4CE for ; Fri, 18 Jun 2004 17:38:21 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9152E43D55 for ; Fri, 18 Jun 2004 17:38:21 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 8371972DF2; Fri, 18 Jun 2004 10:38:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 7E44672DB5; Fri, 18 Jun 2004 10:38:21 -0700 (PDT) Date: Fri, 18 Jun 2004 10:38:21 -0700 (PDT) From: Doug White To: Paul Dlug In-Reply-To: <487C4BD2-C141-11D8-9D52-000393BB3E22@aps.org> Message-ID: <20040618103353.L36931@carver.gumbysoft.com> References: <487C4BD2-C141-11D8-9D52-000393BB3E22@aps.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: Panagiotis Astithas Subject: Re: Heap size limit in java X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2004 17:38:21 -0000 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@gumbysoft.com | www.FreeBSD.org