🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #501

Bug#1149922: guess-concurrency: Please consider using MemTotal instead of MemAvailable for --require-mem

#501
From: Aurelien Jarno
Date: Sun, 11 Oct 2026 15:20
44 lines
4323 bytes
Hi Adrian and Helmut,

On 2026-10-10 18:38, Adrian Bunk wrote:
> "not typically" or "not ever"?
> 
> A semantic problem with guess-concurrency is that it is not clear 
> whether it is supposed to estimate typical maximum usage, or whether
> it is supposed to set a hard maximum.

I think most of the confusion comes from here. I see two main use cases:

1) Avoid an OOM on a typical developer laptop with a lot of of cores, 
but not that much memory, especially given there are many other 
processes running. In that case we the number of jobs should really 
determined from the maximum memory used by a single process during the 
build.

2) Optimize the build time by limiting the use of swap for active 
processes. In that case the amount of memory is just a typical maximum 
usage. We accept that some gcc/g++ process will just use swap if it 
still improves the overall build time. This is what we used on the 
buildd so far, they have enough swap that an OOM is almost impossible 
(at least for the official buildds).

It is not fully clear what use case guess-concurrency is designed for. I 
would say for the scenario 2, given it doesn't take the swap into 
account (except for backing tmpfs with the change in git) and it returns 
1 instead of failing if requiring more memory than available.

I then looked at a practical case, the vtk9 package. It makes almost 
11000 calls to gcc/g++ with an average of 215 MiB, and a median of
171 MiB.  Only 22 calls use more than 2GiB and only 3 calls use more 
than 4 GiB, with a maximum of 6.1 GiB. In the scenario 1) we probably 
want to compute the number of jobs using 6.1 GiB, while in the scenario 
2) we probably want to compute the number of jobs using 2 GiB or less as 
the gain of doing most of the build with more jobs it not lost by 
*possibly* running a few big jobs in parallel.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                     http://aurel32.net
Technical Details
Message-ID: <NN3vb-4U93-13@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomod
References: <NKrNn-3tTU-1@gated-at.bofh.it> <NKrNn-3tTU-1@gated-at.bofh.it> <NLk77-3WQi-15@gated-at.bofh.it> <NMjVn-4tFB-5@gated-at.bofh.it> <NMCbD-4FI7-11@gated-at.bofh.it> <NMHuF-4ImP-1@gated-at.bofh.it> <NKrNn-3tTU-1@gated-at.bofh.it> <NMHuF-4ImP-1@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Aurelien Jarno <aurel32@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1149922: guess-concurrency: Please consider using MemTotal instead of MemAvailable for --require-mem
Date: Sun, 11 Oct 2026 17:20:01 +0200
Message-ID: <NN3vb-4U93-13@gated-at.bofh.it>
References: <NKrNn-3tTU-1@gated-at.bofh.it> <NKrNn-3tTU-1@gated-at.bofh.it> <NLk77-3WQi-15@gated-at.bofh.it> <NMjVn-4tFB-5@gated-at.bofh.it> <NMCbD-4FI7-11@gated-at.bofh.it> <NMHuF-4ImP-1@gated-at.bofh.it> <NKrNn-3tTU-1@gated-at.bofh.it> <NMHuF-4ImP-1@gated-at.bofh.it>
X-Original-To: Adrian Bunk <bunk@debian.org>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sun Oct 11 15:11:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.699
Reply-To: Aurelien Jarno <aurel32@debian.org>, 1149922@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: helmut@subdivi.de
X-Debian-Pr-Message: followup 1149922
X-Debian-Pr-Package: src:guess-concurrency
X-Debian-Pr-Source: guess-concurrency
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/2.4.1 (2026-07-04)
X-Debian-User: aurel32
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996260
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 44
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Helmut Grohne <helmut@subdivi.de>, 1149922@bugs.debian.org
X-Original-Date: Sun, 11 Oct 2026 17:08:50 +0200
X-Original-Message-ID: <asumgnuUdnQ4XpQK@aurel32.net>
X-Original-References: <179110986695.1235681.8806750415812659926.reportbug@ohm.local> <179110986695.1235681.8806750415812659926.reportbug@ohm.local> <20261004170411.GB3267@subdivi.de> <asj60euNxKdkuC_V@localhost> <20261009163344.GA2252202@subdivi.de> <aspcAeni-7D-x7QD@localhost> <179110986695.1235681.8806750415812659926.reportbug@ohm.local> <aspcAeni-7D-x7QD@localhost>