From owner-freebsd-performance@FreeBSD.ORG Wed Nov 23 22:21:49 2005 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27C9B16A41F for ; Wed, 23 Nov 2005 22:21:49 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2B0743D49 for ; Wed, 23 Nov 2005 22:21:48 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id D68FC46B89; Wed, 23 Nov 2005 17:21:47 -0500 (EST) Date: Wed, 23 Nov 2005 22:21:47 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Michael Conlen In-Reply-To: <6C48A943-1AB3-4DF4-B8CC-CD75B9F36E98@obmail.net> Message-ID: <20051123221952.D32130@fledge.watson.org> References: <6C48A943-1AB3-4DF4-B8CC-CD75B9F36E98@obmail.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-performance@freebsd.org Subject: Re: mmap() X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 22:21:49 -0000 On Wed, 23 Nov 2005, Michael Conlen wrote: > Sorry if this is the wrong place for this, but I haven't been getting > answers elsewhere. > > I'm trying to tune the system to allow very large mmap()'s in a single > process space, something on the order of 1.5 GB so I can pass very large > values for -Xms and -Xmx to java. I know I had been able to do this on > FreeBSD in the past but recent versions of either Java or FreeBSD aren't > playing nicely. currently.. BTW, you may find it useful to use procfs to inspect the address space layout of your process. You can d: mkdir /proc mount -t procfs proc /proc cd /proc/pid dd if=map of=/dev/stdout bs=20k This can help you look for fragmentation of process address space, among other things. Robert N M Watson > > I'm running > > FreeBSD host 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Tue Nov 22 00:22:53 EST 2005 > root@host:/usr/obj/usr/src/sys/WWW i386 > > I've also tried the following under 5.4-p1... > > I try > > rc = mmap(0, (891*1024*1024 + 0), 0, MAP_ANON | MAP_PRIVATE, -1, 0); > > and it works but If I try > > rc = mmap(0, (892*1024*1024 + 0), 0, MAP_ANON | MAP_PRIVATE, -1, 0); > > it fails returning ENOMEM. > > limit returns > > cputime unlimited > filesize unlimited > datasize 2096128 kbytes > stacksize 1048576 kbytes > coredumpsize unlimited > memoryuse unlimited > vmemoryuse unlimited > descriptors 11095 > memorylocked unlimited > maxproc 5547 > sbsize unlimited > > If the program isn't doing anything else but that is there any reason I'm > getting limited in the amount of memory I can mmap() at about 892 MB? Ideally > I'd like to be able to mmap most of the 2 GB available to user procs. > > Oh, yes, there's plenty of free memory and swap. > > Thanks > > > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to > "freebsd-performance-unsubscribe@freebsd.org" >