Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] job parallelism reduced because of low free space

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
32 posts
  • Previous
  • 1
  • 2
Author
Message
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Wed Feb 18, 2026 11:45 am

radio_flyer wrote: which sometimes pushed the active builds into the swapfile when it also tried to build multiple behemoth packages at once.
First, this is not how swap works. It's not a simple FIFO queue. Second, you can setup zswap in the kernel. Third, you can configure per-package tmp directory.
Best Regards,
Georgi
Top
axl
Veteran
Veteran
User avatar
Posts: 1147
Joined: Fri Oct 11, 2002 7:42 pm
Location: Romania
Contact:
Contact axl
Website

  • Quote

Post by axl » Thu Feb 19, 2026 12:03 am

I ran into this because I use ramfs instead of zram or tmpfs. It has a bit lower overhead. Slightly faster. But at the same time, can't report size. But I am pretty sure I have enough of it.

Aren't most options in portage opt-in vs opt-out?

I get the logic. But I am just noticing a change in spirit. I thought, failing is a normal outcome when you push limits. I mean a program failing, is something normal imho in gentoo. However portage holding your hand by default, that is something new. At least for me. EMERGE_DEFAULT_OPTS="--jobs-tmpdir-require-free-gb=0" will have to do.

I am not complaining that I had to spend a few minutes to look up what's going on here. And I found a fix. Its fine.

What bothers me, is that portage is making decisions for me, based on faulty data. It can't read how much free space I have where I compile stuff, and sure, my fault. But then it also "can't know" how big a package is. So it doesn't know how much space there is, how much was used, or how much it should be used. But it's making decisions by default. And maybe that is the direction portage should go into. I just never thought of it that way.
Top
sam_
Developer
Developer
User avatar
Posts: 2816
Joined: Fri Aug 14, 2020 12:33 am

  • Quote

Post by sam_ » Thu Feb 19, 2026 11:38 am

axl wrote:I ran into this because I use ramfs instead of zram or tmpfs. It has a bit lower overhead. Slightly faster. But at the same time, can't report size. But I am pretty sure I have enough of it.

Aren't most options in portage opt-in vs opt-out?

I get the logic. But I am just noticing a change in spirit. I thought, failing is a normal outcome when you push limits. I mean a program failing, is something normal imho in gentoo. However portage holding your hand by default, that is something new. At least for me. EMERGE_DEFAULT_OPTS="--jobs-tmpdir-require-free-gb=0" will have to do.

I am not complaining that I had to spend a few minutes to look up what's going on here. And I found a fix. Its fine.

What bothers me, is that portage is making decisions for me, based on faulty data. It can't read how much free space I have where I compile stuff, and sure, my fault. But then it also "can't know" how big a package is. So it doesn't know how much space there is, how much was used, or how much it should be used. But it's making decisions by default. And maybe that is the direction portage should go into. I just never thought of it that way.
This is a fair point and it's something I've been thinking about. I would generally like to make things a little bit friendlier where it is free (or very cheap) to do so, but I agree that this may be too sensitive with the current heuristics to be enabled by default. I'm still not sure yet.

The rationale here was to make it less likely for users to have parallel build failures (which can be not just a inconvenience but a big problem if it's in the middle of a large upgrade).
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Feb 19, 2026 11:49 am

Sam, I don't know how easy or hard would that be, but the temporary contents of the packages waiting to be merged can be deleted while the package is waiting. Only the image is necessary, right? Or is it not that simple?

I'm testing this feature now with a tmpfs temp partition and it works fine when big packages are not involved. Those are not that many, they can easily be configured to not use the tmpfs.

Also one more thing: the binary packages do not need that much space, can that be circumvented somehow?

Best Regards,
Georgi
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Thu Feb 19, 2026 12:19 pm

The most funny thing is that the estimated required space does not even depend on the work queue.
I initially thought it did in a clunky way, but no, even very small packages want 27G out of 19 available. Just like the big packages. Go figure!
What bothers me, is that portage is making decisions for me, based on faulty data. It can't read how much free space I have where I compile stuff, and sure, my fault. But then it also "can't know" how big a package is.
What bothers you is portage _telling_ you it made a decision. And one that does not even change the end result it produces.
Do you know how resolving a dependency on alternatives works? E.g. anything virtual/* ? This one does actually affect what software you have installed, and yet we expect it to just work rather than keep asking about every single little thing.
Make Pipewire a system service
Top
ewildgoose
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Mar 02, 2003 1:39 pm

  • Quote

Post by ewildgoose » Mon Mar 02, 2026 7:24 pm

Thanks for noting the workaround:
--jobs-tmpdir-require-free-gb=0

I build images for Arm under QEMU and ...it's slow...

Getting portage to parallelise as much as possible is helpful, even then it's tough to get a load higher than 1-2...

If you haven't tried this, the issue is that portage is very very slow at installing things under Qemu. Like installing a large bunch of acct-user/xxx packages (which basically are empty packages), takes many 10s of seconds per package. So it's helpful to try and get parallelism as high as I can

The workaround is acceptable to me. Builds are reproducible so we can tweak flags for specific packages.
Top
dalek
Veteran
Veteran
User avatar
Posts: 1354
Joined: Fri Sep 19, 2003 3:35 pm
Location: Mississippi USA

  • Quote

Post by dalek » Tue Mar 03, 2026 1:08 am

I have found in most cases, you can just ignore the message. It will stop for large packages where you don't have enough memory to compile, like emerge has always done. I just ignored this message in my case. The emerge continued on just fine and I couldn't tell any difference in speed of compiles.
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Top
Post Reply

32 posts
  • Previous
  • 1
  • 2

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic