--- Michael Conlen <[EMAIL PROTECTED]> wrote:
> On Nov 23, 2005, at 12:11 PM, Arne Wörner wrote:
> > --- Michael Conlen <[EMAIL PROTECTED]> 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/<arch>/conf/<kernel name>
> > 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 <sys/mman.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>

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;
}
<EOF>

-Arne



                
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
_______________________________________________
freebsd-performance@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to