Date: Wed, 02 Jan 2008 22:12:06 -0800 From: Jason Evans <jasone@freebsd.org> To: Joe Marcus Clarke <marcus@FreeBSD.org> Cc: Robert Watson <rwatson@FreeBSD.org>, current <current@FreeBSD.org> Subject: Re: Memory problem with latest malloc.c Message-ID: <477C7CB6.8080701@freebsd.org> In-Reply-To: <1199340028.64371.9.camel@shumai.marcuscom.com> References: <1199314166.9913.63.camel@shumai.marcuscom.com> <477C47BC.1020101@freebsd.org> <1199340028.64371.9.camel@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Joe Marcus Clarke wrote: > On Wed, 2008-01-02 at 18:26 -0800, Jason Evans wrote: >> It would be really helpful to me if you run your program with >> MALLOC_OPTIONS=dM and monitor memory usage. These flags cause mmap to >> be used instead of sbrk, and we can find out from that how much memory >> you really need. If peak memory usage is substantially different when >> using mmap versus sbrk, there's probably a malloc bug. > > Memory climbed up to 976 MB SZ, 974 MB RSS MB with dM > -> /etc/malloc.conf. The file was eventually generated without error. > Again, with Aj -> /etc/malloc.conf, the python2.5 process operating on > the same file planed out at 504 MB SZ, 501 MB RSS. Okay, that indicates that there is not a problem with malloc; you're running into the data segment resource limit. It isn't possible to increase the data segment beyond 512 MB on i386, so your best bet is to use MALLOC_OPTIONS=DM for the memory-intensive program. That will cause the program use all available space in the data segment, then start using mmap as necessary. I'm sorta thinking that MALLOC_OPTIONS=DM should be the default. Robert Watson is the person who talked me into this change, so feel free to give him a hard time about the extra configuration you have to do in order to get work done. =) Thanks, Jason
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?477C7CB6.8080701>