From owner-freebsd-stable@FreeBSD.ORG Sun Mar 3 15:52:43 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1C2B435E for ; Sun, 3 Mar 2013 15:52:43 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 679F9D4B for ; Sun, 3 Mar 2013 15:52:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id r23FqSdY041074; Mon, 4 Mar 2013 02:52:28 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 4 Mar 2013 02:52:28 +1100 (EST) From: Ian Smith To: Darren Pilgrim Subject: Re: Building RELENG_9 (or RELENG_9_*) on a small machine? In-Reply-To: <5131035A.2050803@bluerosetech.com> Message-ID: <20130304001653.U32142@sola.nimnet.asn.au> References: <512EB5BD.1020803@bluerosetech.com> <20130228014635.GB70215@glenbarber.us> <512F23AC.1000003@bluerosetech.com> <20130302042828.J32142@sola.nimnet.asn.au> <5131035A.2050803@bluerosetech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2013 15:52:43 -0000 On Fri, 1 Mar 2013 11:36:58 -0800, Darren Pilgrim wrote: > On 2013-03-01 10:50, Ian Smith wrote: > > At 256MB - the > > minimum earlier that completed installation without disabling CTL - swap > > often sat at ~14MB but blew out to around 165MB building those huge llvm > > libraries - cc1plus 332M, 173M resident was one top I snipped, but I > > can't say I caught the biggest. > > I had top running throughout a build and saw cc1plus reach 460 MB with 171MB > resident, at that point CPU was down to about 4% and the system was hammering > swap. As a testament to FreeBSD's robustness, I could still log in via ssh, > start screened shells, and generally conduct admin tasks while cc1plus beat > the crap out of my VM. Even start and stop other services. After 15 years I expect nothing less; even so I try not to fill swap :) > > Then I added 128MB (to 384MB) and repeated the first buildworld (incl. > > clang) expecting huge savings as it'd only touched swap to about 12MB a > > time or two, mostly having 100MB+ of free memory .. wow, down to 7h02m! Well I was going to bring mine straight up to 768MB, but having a spare 512MB stick and in the interest of science, I tried again with 512MB and nothing in src.conf, but still CAM CTL disabled. After a couple of hours swap was tickled up to 608K and got no higher, finishing at 544K which I suspect was VM getting a bit nervous and making plans at most; still at 544K next day. As mentioned but more precisely, with 256MB buildworld took 7:39:38 with lots of swapping - but only 3:31:49 WITHOUT_CLANG=y, with no swapping - and then with 384MB, 7:02:10 and no more than 14MB swap seen. With 512MB and sub-1MB swap touched it took 7:00:49; the extra 128MB RAM shaved a whole minute 31 seconds off buildworld, 0.15% faster, whoopee! > For 9.x, I changed my notes to "256 MB to run, 768 MB to build". For 8.x, > the numbers were 192 MB to run, 512 MB to build. Without CAM CTL I just managed to install 9.1 in 128MB; with took 256MB. If adrian@ succeeds defaulting CAM CTL off it'll improve matters ~35MB. >From the above I'd say 384MB without CAM CTL or 512MB with will build world with minimal swapping, and 768MB will be fine - though I don't know about building bigger ports in that? I'm not moving my $wholelife to 9.1 till packages become again available, for obvious reasons. Any idea what happens both time- and memorywise from building world with clang rather than gcc? Hopefully All That Code is more efficient? > > Here at least, building llvm libs and clang doubles buildworld time! and > > extends /usr/obj from 675MB to 1GB. > > I'll be doing `make buildkernel buildworld` ET and size comparisons between > RELENG_8_3 and RELENG_9_1 when I test out my buildbox. I'd like to gather > memory usage metrics as well, if someone knows some tricks for that. My > current approach is somewhat crude. :) If there's interest I'll follow up > with the results here. Interest here. My sampling was very crude also, just appending: 'nice top -nS -ores | head 11 | grep -v "^$" ; sleep 60' to a log. Doesn't catch max size or res except by chance, but quite good enough to track movements in swap. I guess parsing the tail of vmstat might be the go? cheers, Ian