From nobody Mon Sep 25 21:41:07 2023 X-Original-To: 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 4Rvbsm5WChz4v6WT for ; Mon, 25 Sep 2023 21:41:16 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rvbsm2nVkz4Jw2 for ; Mon, 25 Sep 2023 21:41:16 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.16.1/8.16.1) with ESMTPS id 38PLf7UY008830 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 25 Sep 2023 23:41:07 +0200 (CEST) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.16.1/8.16.1/Submit) id 38PLf7P5008829; Mon, 25 Sep 2023 23:41:07 +0200 (CEST) (envelope-from fuz) Date: Mon, 25 Sep 2023 23:41:07 +0200 From: Robert Clausecker To: "Edward Sanford Sutton, III" Cc: ports@freebsd.org Subject: Re: dns/bind916 builds rust unexpectedly Message-ID: References: <1e05be67-cb15-964e-c78b-e74e714257a9@FreeBSD.org> <11aede54-89d0-9b46-28f8-1931571b8917@m5p.com> <6fd5dbf4-3fc5-a728-d751-d58deeabe933@m5p.com> 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Queue-Id: 4Rvbsm2nVkz4Jw2 Am Mon, Sep 25, 2023 at 02:15:19PM -0700 schrieb Edward Sanford Sutton, III: > Poudriere still causes crashes in my experience depending on hardware, > poudriere configuration, and what you tell it to build; I have to change > defaults to use it and then it is fine. With only 32GB of RAM, if I have it > operate the whole build process in RAM > (USE_TMPFS=all>/usr/local/etc/poudriere) then I have to limit myself to 2 > build jobs (PARALLEL_JOBS=2, though I specify it on the poudriere command > line) or I 'may' have issues. Within that I can have multiple jobs per build > (ALLOW_MAKE_JOBS=yes>/usr/local/etc/poudriere, > MAKE_JOBS_NUMBER=4>/usr/local/etc/poudriere.d/make.conf) which gets through > each compile job much faster so no one job is as likely to be running > 'alone' holding up other jobs while cores sit idle. Ports tend to eat more and more storage for their source and dependencies these days. I encountered the same issue you had. A simple fix is to switch to USE_TMPFS="data localbase" which keeps the source code and objects of the package to be built on disk while placing dependencies into RAM. This does not actually reduce performance by much as the biggest spike in disk usage is when dependencies are installed and the distfile is extracted. This setting helps with the former while not doing much to the latter. During the build, compilers infrequently write small objects to disk, which gets handled very well by the write cache, so having the WRKDIR on disk doesn't hurt. The cache also quickly picks up on frequently needed source files, so there's little penalty in having to read them from disk every once in a while. After I configured Poudriere like this, I never had any whole-system crashes again. As for the number of jubs, I recommend overcommitting by a factor of 1.5. So for n CPUs, 1.5n jobs should run in total. E.g. on an 8 CPU machine I use PARALLEL_JOBS=6 with MAKE_JOBS_NUMBER=2. This works well for when there are many small packages, but can be a bit annoying if you are only waiting for one big dependency (like LLVM) to build. Enabling ccache can help here. I hope this helps you improve your setup. Yours, Robert Clausecker -- () ascii ribbon campaign - for an 8-bit clean world /\ - against html email - against proprietary attachments