From owner-freebsd-performance@FreeBSD.ORG Wed Nov 23 19:32:46 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 A263716A41F for ; Wed, 23 Nov 2005 19:32:46 +0000 (GMT) (envelope-from m@obmail.net) Received: from stewie.obfuscated.net (stewie.obfuscated.net [66.118.188.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 909C743D6D for ; Wed, 23 Nov 2005 19:32:42 +0000 (GMT) (envelope-from m@obmail.net) Received: from [192.168.1.100] (unknown [66.118.181.116]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by stewie.obfuscated.net (Postfix) with ESMTP id A7EEE6141; Wed, 23 Nov 2005 14:32:41 -0500 (EST) In-Reply-To: <20051123182049.99670.qmail@web30301.mail.mud.yahoo.com> References: <20051123182049.99670.qmail@web30301.mail.mud.yahoo.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <86229116-3E10-4277-B93D-3A9436C2F37A@obmail.net> Content-Transfer-Encoding: quoted-printable From: Michael Conlen Date: Wed, 23 Nov 2005 14:32:40 -0500 To: =?ISO-8859-1?Q?Arne_W=F6rner?= X-Mailer: Apple Mail (2.746.2) 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 19:32:46 -0000 On Nov 23, 2005, at 1:20 PM, Arne W=F6rner wrote: > --- Michael Conlen wrote: >> On Nov 23, 2005, at 12:11 PM, Arne W=F6rner wrote: >>> --- Michael Conlen wrote: >>>> I'm trying to tune the system to allow very large >>>> mmap()'s in a >>>> >>> I had a similar problem with shared memory. >>> >>> I found an option in /sys/conf/NOTES. >>> >>> I think it could help in your case, if u increase >>> % options MAXDSIZ=3D(1024UL*1024*1024) >>> % options MAXSSIZ=3D(128UL*1024*1024) >>> % options DFLDSIZ=3D(1024UL*1024*1024) >>> apropriately. >>> >>> E. g. in your /sys//conf/ >>> options MAXDSIZ=3D(2000UL*1024*1024) >>> >>> But I dont know, if that is a good idea... Maybe >>> you should use nextboot(8) in case your box does >>> not like the new kernel... :-) >> >> I've made those changes which are reflected in the >> output from limit. >> > Oh... Ok... That sounds plausible... > > Maybe the stack size matters in ur case somehow? I can see, that > it is limited to 1GB, isn't it? > > I found something funny, too: >> limit > cputime unlimited > filesize unlimited > datasize 524288 kbytes > stacksize 65536 kbytes > coredumpsize unlimited > memoryuse unlimited > vmemoryuse unlimited > descriptors 6861 > memorylocked unlimited > maxproc 3430 > sbsize unlimited >> c++ -o mmap mmap.c >> ./mmap 757254143 > sz2d22c7ff00000 r673435648 errno0 >> cat mmap.c > #include > #include > #include > #include > > int main(const int argc, char ** argv) { > void * r =3D > mmap(0,atoi(argv[argc-1])*1024LL*1024,0,MAP_ANON|MAP_PRIVATE,-1,0); > printf("sz%llx r%d > errno%d\n",atoi(argv[argc-1])*1024LL*1024,r,errno); > return 0; > } > > > -Arne > At this point I have updated the kernel to include 2 GB for stack and =20= data size and edited the loader.conf to include those options as well =20= with the same result. I really believe the system is being limited =20 elsewhere. -- Michael Conlen=