From owner-freebsd-performance@FreeBSD.ORG Wed Nov 23 18:21:18 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 428E916A420 for ; Wed, 23 Nov 2005 18:21:18 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: from web30301.mail.mud.yahoo.com (web30301.mail.mud.yahoo.com [68.142.200.94]) by mx1.FreeBSD.org (Postfix) with SMTP id 1983543D6E for ; Wed, 23 Nov 2005 18:20:59 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 99672 invoked by uid 60001); 23 Nov 2005 18:20:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jEcJsRrKR4w4r68dn/t3FIwIJdlkCE9k0VmpGmuqO4xYQtTfFjL+yg7phAFl2D7qaNePxT+xfjephBVPUjjCqiyRVCtb8ofeFpbrNYghEvPR420ZxDKVCArMhYKCdPKuKhGFvgodFU4kCeX+nx363pkeuMgFhuOzIrsjL9ScYHE= ; Message-ID: <20051123182049.99670.qmail@web30301.mail.mud.yahoo.com> Received: from [213.54.79.72] by web30301.mail.mud.yahoo.com via HTTP; Wed, 23 Nov 2005 10:20:49 PST Date: Wed, 23 Nov 2005 10:20:49 -0800 (PST) From: Arne "Wörner" To: Michael Conlen In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 18:21:18 -0000 --- Michael Conlen wrote: > On Nov 23, 2005, at 12:11 PM, Arne Wörner 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=(1024UL*1024*1024) > > % options MAXSSIZ=(128UL*1024*1024) > > % options DFLDSIZ=(1024UL*1024*1024) > > apropriately. > > > > E. g. in your /sys//conf/ > > options MAXDSIZ=(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 = 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 __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com