guess_concurrency(1)

πŸ“¦
version 0+20260511 Β· 2 versions
, in ubuntu stonking

πŸ‘‘ guess_concurrency(1) πŸ’…

okay so bestie, this is a page from the User Contributed Perl Documentation section, and it's literally here to help you figure out how many things you can run at once without your machine having a full-on meltdown πŸ’€βœ¨


✨ NAME ✨

guess_concurrency β€” Estimate suitable workload concurrency 🧚


🌸 SYNOPSIS 🌸

guess_concurrency [-h] [--detect METHOD] [--max N] [--min N]
[--require-mem MEMLIST]

πŸ’– DESCRIPTION πŸ’–

So the whole vibe here is: you wanna guess a suitable concurrency level given whatever constraints your runtime environment is throwing at you 🫢

It peeks at environment variables like DEB_BUILD_OPTIONS, RPM_BUILD_NCPUS and CMAKE_BUILD_PARALLEL_LEVEL for an initial guess, and when those don't come through it falls back to querying the operating system to suss out a suitable concurrency level πŸ”βœ¨

And you, the main character, can further restrict the concurrency that gets emitted by handing it a minimum or a maximum πŸŽ€ β€” and also by requiring that there be sufficient memory available to actually support that level of concurrency. no cap, it checks. πŸ‘‘

ngl there's a lil typo in the original ("concurreny") and we're keeping the energy, but the meaning is clear: enough RAM needs to be there for the number of cores you're claiming πŸ’œ

πŸ”₯ OPTIONS πŸ”₯

  • --detect METHOD β€” supply a processor count, OR pick a detection method from (nproc, python, cores) πŸ•΅οΈβœ¨
  • --max N β€” limit the number of detected cores to a given maximum βœ‹
  • --min N β€” limit the number of detected cores to a given minimum 🫢
  • --require-mem MEMLIST β€” specify per-core required memory as a comma separated list πŸ“ Each entry says how much additional RAM is needed for the next process. Numbers can be floating point, optionally suffixed with a case-insensitive binary suffix (k/m/g/t/e). A completely empty spot copies the previous number πŸ‘―β€β™€οΈ A concurrency N is considered acceptable if the sum of the first N entries of this list does not exceed the available RAM πŸ’…

πŸ¦‹ EXAMPLES πŸ¦‹

Example 1: Ensure that there is at least 4GB per used core πŸŽ€

guess_concurrency --require-mem 4G

Example 2: Two linker processes may consume 6GB each and they may run concurrently πŸ”₯ All other concurrent processes are expected to not use more than 2GB each 😌

guess_concurrency --require-mem 6G,,2G

🌈 SEE ALSO 🌈


and that's the whole thing bestie, you ate πŸ’…βœ¨ this page is running under perl v5.40.1, dated 2026-05-11 β€” mwah, iconic, periodt πŸŽ€πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from