From nobody Mon Nov 8 18:38:14 2021 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5B1001845E98 for ; Mon, 8 Nov 2021 18:38:22 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 4Hp0HK4Pw0z3QxD; Mon, 8 Nov 2021 18:38:21 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id DBE5A3C0199; Mon, 8 Nov 2021 18:38:14 +0000 (UTC) Date: Mon, 8 Nov 2021 18:38:14 +0000 From: Brooks Davis To: Dimitry Andric Cc: Stephen Montgomery-Smith , FreeBSD Ports Subject: Re: Running out of RAM building devel/llvm13 Message-ID: <20211108183814.GD81740@spindle.one-eyed-alien.net> References: <23a70169-d986-02c0-6763-61db22c75c0b@FreeBSD.org> <7D697030-8E5F-4B4F-B5E8-A8BE609A1CCA@FreeBSD.org> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dTy3Mrz/UPE2dbVg" Content-Disposition: inline In-Reply-To: <7D697030-8E5F-4B4F-B5E8-A8BE609A1CCA@FreeBSD.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 4Hp0HK4Pw0z3QxD X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net X-Spamd-Result: default: False [-3.41 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[brooks]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-0.51)[-0.513]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_COUNT_ZERO(0.00)[0]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_CC(0.00)[gmail.com,FreeBSD.org]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net] X-ThisMailContainsUnwantedMimeParts: N --dTy3Mrz/UPE2dbVg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 07, 2021 at 12:38:20AM +0100, Dimitry Andric wrote: > On 6 Nov 2021, at 23:53, Stephen Montgomery-Smith wrote: > >=20 > > Does anyone else have the problem of running out of RAM when building d= evel/llvm13? I have 6 CPUS, 4G of RAM, and 4G of swap. > >=20 > > I can solve it by building with MAKE_JOBS_UNSAFE=3Dyes, but then the bu= ild is so slow. > >=20 > > It seems that there is a small part of the build which requires a lot o= f RAM, and it would be nice to restrict just that portion of the build to j= ust one CPU. >=20 > Try turning off the FLANG option. In my release testing for llvm 13.0.0 I= found this eats up most of the memory during a build. If you turn of FLANG, I also recommend disabling MLIR. It's nominally a separate thing with other uses, but I believe only flang uses it in tree. If we could isolate which file(s) use too much memory it might be possible for upstream to put in an exception to single-thread around them. BTW, which architecture are you building for? -- Brooks --dTy3Mrz/UPE2dbVg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJhiW6WAAoJEKzQXbSebgfAGMwH+QG3tJN4NMW+RKoceIpzuCSy 3UrV+qoXCuY9EcSjUGA1NRIb1NW7XJH8yHg2JJrXK1UGltjmNUdtihZqABoJKMJV KRoRudnY/4aQkePKh0gH0MFNkh23xvng9Fa0HaVRAL1/cjhBZAgYGLjwxrTZ/bIY 43f6zzqWaVSwBQjKuHy3QlP1CswtOsCv6pAtJKP+epETrRQbsOyIvtOqp9jYMPqo kHxo4gZUY0IovnifCy/f2CVSm0ttF4Y5hxbj+N2p5RTcAJKLsw2P7YLz3T+tb7Y2 ulo2S6GTGXgbWm/Cfa+KUywTBHRaKnRrJ7XFFliXo1/SWGd4DJ8hFQj9xYizQ6Y= =tojc -----END PGP SIGNATURE----- --dTy3Mrz/UPE2dbVg--