From owner-freebsd-current@freebsd.org Sun Mar 26 21:36:40 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F038CD1FDD8 for ; Sun, 26 Mar 2017 21:36:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-181.reflexion.net [208.70.211.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B55F71708 for ; Sun, 26 Mar 2017 21:36:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 25830 invoked from network); 26 Mar 2017 21:36:33 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 26 Mar 2017 21:36:33 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.30.2) with SMTP; Sun, 26 Mar 2017 17:36:33 -0400 (EDT) Received: (qmail 6701 invoked from network); 26 Mar 2017 21:36:33 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 26 Mar 2017 21:36:33 -0000 Received: from [192.168.1.119] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id 44100EC770C; Sun, 26 Mar 2017 14:36:32 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: FYI: what it takes for RAM+swap to build devel/llvm40 with 4 processors or cores and WITH__DEBUG= (powerpc64 example) From: Mark Millard In-Reply-To: <3EDEF0B7-59C5-4648-9737-6682E18645BC@dsl-only.net> Date: Sun, 26 Mar 2017 14:36:31 -0700 Cc: FreeBSD Toolchain , FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <39C60316-F905-490D-B0AB-BC24D7F351A2@dsl-only.net> References: <3EDEF0B7-59C5-4648-9737-6682E18645BC@dsl-only.net> To: FreeBSD Ports , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 21:36:41 -0000 [I add some what-it-take-for-an-upgrade information.] On 2017-Mar-12, at 6:53 PM, Mark Millard wrote: > Summary: RAM+(peak swap) was about 26 GiBytes. > Also: about 118 GiByte /usr/obj/. . ./llvm40/ area. > (2 processors, 2 cores each, all in use; > WITH_DEBUG=3D used) >=20 > The peak usage times were when the 4 cores were > each busy running ld at the same time. >=20 > [So far as I know FreeBSD does not report peak swap usage > "since boot". So I do not have a cross check on if I missed > seeing a higher peak then I report in the details below.] >=20 > What all this note spans as part of the build: >=20 > # more /var/db/ports/devel_llvm40/options > # This file is auto-generated by 'make config'. > # Options for llvm40-4.0.0.r4 > _OPTIONS_READ=3Dllvm40-4.0.0.r4 > _FILE_COMPLETE_OPTIONS_LIST=3DCLANG DOCS EXTRAS LIT LLD LLDB > OPTIONS_FILE_SET+=3DCLANG > OPTIONS_FILE_SET+=3DDOCS > OPTIONS_FILE_SET+=3DEXTRAS > OPTIONS_FILE_SET+=3DLIT > OPTIONS_FILE_SET+=3DLLD > OPTIONS_FILE_SET+=3DLLDB >=20 > The system clang 4.0 was used to do the build. A port > binutils was used (-B${LOCALBASE}/bin/ in CFLAGS, > CXXFLAGS, an CPPFLAGS). The kernel was non-debug generally > but buildworld buildkernel did not have MALLOC_PRODUCTION=3D . > The llvm40 build did have MALLOC_PRODUCTION=3D . >=20 > # uname -paKU > FreeBSD FBSDG5L 12.0-CURRENT FreeBSD 12.0-CURRENT r314687M powerpc = powerpc64 1200023 1200023 >=20 > Most of what I have access to for FreeBSD does not have a > big enough configuration to do a WITH_DEBUG=3D build of llvm40 > on a machine with 4 cores, all in use. >=20 > One type of environment that does is an old PowerMac G5 > so-called "Quad Core" that has 16 GiBytes of RAM, 17 GiBytes > of swap, and a 480 GiByte SSD (but extra over provisioned so > it appears even smaller for the file system+swap). >=20 > Watching with top the peak swap usage that I saw was > 56% of the 17 GiByte --so call it 10 GiBytes or so. >=20 > So something like 16 GiBytes RAM + 10 GiBytes swap > and so something like 26 GiByte total. >=20 > I used portmaster with -DK. Afterwards the /usr/obj/ > sub-area for llvm40 used totaled to a size of: >=20 > # du -sg /usr/obj/portswork/usr/ports/devel/llvm40 > 118 /usr/obj/portswork/usr/ports/devel/llvm40 >=20 > So around 118 GiBytes of disk space. >=20 > Showing the major space usage contributions: >=20 > # du -sg /usr/obj/portswork/usr/ports/devel/llvm40/work/.build/* = /usr/obj/portswork/usr/ports/devel/llvm40/work/stage/usr/local/llvm40/* > . . . > 29 /usr/obj/portswork/usr/ports/devel/llvm40/work/.build/bin > . . . > 29 /usr/obj/portswork/usr/ports/devel/llvm40/work/.build/lib > . . . > 12 /usr/obj/portswork/usr/ports/devel/llvm40/work/.build/tools > . . . > 26 = /usr/obj/portswork/usr/ports/devel/llvm40/work/stage/usr/local/llvm40/bin > . . . > 24 = /usr/obj/portswork/usr/ports/devel/llvm40/work/stage/usr/local/llvm40/lib > . . . >=20 >=20 >=20 > Side notes that are more system specific: >=20 > The timestamps on the script output file indicate that > the build took about 8 hours 24 minutes. >=20 > The powerpc64 system used was built with the system clang > 4.0 compiler and a port-based binutils. This is despite that > clang 4.0 produces code that has any thrown C++ exceptions > completely non-functional for powerpc64 (program crashes > via signals reporting problems). I upgraded from llvm40 r4 to final. An interesting result was its creation of a backup package for llvm40-4.0.0.r4: about 13 cpu-core-hours running pkg create (Remember: I've been building with WITH_DEBUG=3D ) Its single-threaded status stands out via elapsed time approximately matching. I'll note that it was somewhat under 6 elapsed hours for staging to have been populated (-j4 with 4 cores present helps for this part). (Of course these elapsed-time figures are rather system dependent, although the ratio might be more stable.) Also interesting was: Installed packages to be REMOVED: llvm40-4.0.0.r4 Number of packages to be removed: 1 The operation will free 49 GiB. =3D=3D=3D Mark Millard markmi at dsl-only.net