Date: Fri, 9 Nov 2012 10:13:51 -0800 From: David O'Brien <obrien@FreeBSD.org> To: Alfred Perlstein <bright@mu.org> Cc: hackers@freebsd.org Subject: Re: make -jN buildworld on < 512MB ram Message-ID: <20121109181351.GE9916@dragon.NUXI.org> In-Reply-To: <509182DA.8070303@mu.org> References: <509182DA.8070303@mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 31, 2012 at 12:58:18PM -0700, Alfred Perlstein wrote: > It seems like the new compiler likes to get up to ~200+MB resident when > building some basic things in our tree. > Unfortunately this causes smaller machines (VMs) to take days because of > swap thrashing. You could try reducing data seg size (ulimit -d) to something matching "RAM" size. GCC has two parameters to try to keep its memory usage "reasonable": http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Optimize-Options.html 'ggc-min-expand' and 'ggc-min-heapsize'. ggc-min-expand ... If getrlimit is available, the notion of "RAM" is the smallest of actual RAM and RLIMIT_DATA ggc-min-heapsize The default is the smaller of RAM/8, RLIMIT_RSS, or a limit which tries to ensure that RLIMIT_DATA or RLIMIT_AS are not exceeded I don't know if Clang/LLVM has something similar or not. -- -- David (obrien@FreeBSD.org)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121109181351.GE9916>