From owner-freebsd-ports@freebsd.org Tue May 5 11:09:10 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F07C22E2092 for ; Tue, 5 May 2020 11:09:10 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49GcRp1dz6z3JHZ for ; Tue, 5 May 2020 11:09:10 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: by mailman.nyi.freebsd.org (Postfix) id 385162E2091; Tue, 5 May 2020 11:09:10 +0000 (UTC) Delivered-To: ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 381682E2090 for ; Tue, 5 May 2020 11:09:10 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 49GcRn6XfNz3JHY; Tue, 5 May 2020 11:09:09 +0000 (UTC) (envelope-from mail@ozzmosis.com) X-Originating-IP: 167.179.139.56 Received: from blizzard.ozzmosis.com (167-179-139-56.a7b38b.mel.nbn.aussiebb.net [167.179.139.56]) (Authenticated sender: ozzmosis@ozzmosis.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 1597AFF807; Tue, 5 May 2020 11:09:06 +0000 (UTC) Received: by blizzard.ozzmosis.com (Postfix, from userid 1001) id 01834EE377; Tue, 5 May 2020 21:09:00 +1000 (AEST) Date: Tue, 5 May 2020 21:09:00 +1000 From: andrew clarke To: Gleb Popov Cc: FreeBSD ports Subject: Re: Out of memory building lang/ghc-8.8.3 Message-ID: <20200505110900.za365npmukedw4x3@ozzmosis.com> References: <20200505093712.5qeyqt7gioolhdyu@ozzmosis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20200501 X-Rspamd-Queue-Id: 49GcRn6XfNz3JHY X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2020 11:09:11 -0000 On 2020-05-05 14:19:50, Gleb Popov (arrowd@freebsd.org) wrote: > On Tue, May 5, 2020 at 1:37 PM andrew clarke wrote: > > > Beware anyone building lang/ghc-8.8.3 from the ports tree. Building it > > here on FreeBSD 12.1-REL AMD64 with Poudriere, the build ran out of swap, > > despite the PC having 8 GB RAM, 8 GB swap and not much else running. > > > > My /usr/local/etc/poudriere.conf: > > > > BASEFS=/poudriere > > ZPOOL=zroot > > FREEBSD_HOST=http://mirror.internode.net/ > > POUDRIERE_DATA=/poudriere/data > > RESOLV_CONF=/etc/resolv.conf > > DISTFILES_CACHE=/usr/ports/distfiles > > USE_TMPFS=yes > > ALLOW_MAKE_JOBS=yes > > KEEP_OLD_PACKAGES=yes > > PARALLEL_JOBS=8 > > > > Maybe I can retune the last three parameters to use less memory. I've not > > tried yet. > > > > This isn't really a whinge, I'm just surprised it failed. I'd have thought > > 8 GB was enough. > > > > (ghc is a build dependency of textproc/hs-pandoc) > > > > Did you have something else building at the same time? > > On my laptop with 16 Gb of RAM I also see OOM failures when building > multiple "heavy" packages (llvmXX, gccX, ghc, rust, libreoffice) > simultaneously. In this case I use -J poudriere option to limit number of > jobs. Nothing else building. This is a headless server, so I've no need to build something the size of libreoffice or chromium. I've noticed llvm10 takes a long time to build, but 8 GB seems plenty of memory for it. The -J option sounds like the way to go, provided I remember to use it next time. Or I could instead set PARALLEL_JOBS=1 in poudriere.conf but then build performance will suffer for every port, which isn't ideal. But perhaps there's an option to limit make jobs just for a single port, set in /usr/local/etc/poudriere.d/make.conf ? That would be nice.