On 2025-10-09, nomike (they/them) wrote: > Per default Ubuntu is using tmpfs for `/tmp`. As Guix builds > applications in `/tmp/` and those builds can become quite huge this > quickly exhausts all memory causing system instability and build failures. > What I wonder now is whether we should tell this to our users.
I do not think tmpfs is the problem, so much as not having enough space in /tmp; you would have many of the same problems if you had not enough free space and /tmp was on a disk. Using tmpfs on /tmp does trigger other issues if you do not have sufficient ram+swap, sure, though that is not a problem specific to using Guix... > I have two ideas on my mind: > 1. We add a note to the guix manual, telling users to check for tmpfs > being enabled, warning them about the consequences. Ideally it would > also tell them how to disable it or link to some external resource which > explains that. There are checks in guix for insufficient free space, but they might assume that /gnu/store and /tmp are on the same filesystem? I have seen some warnings about insufficient free space where in fact there was not much space in /gnu/store, but plenty of space on /tmp, where the build succeeded despite the alarming warning about insufficient space. Perhaps extending those checks to also check the build directory would be sufficient to help? Apparently guix-daemon respects TMPDIR environment variable, so setting that (maybe in guix-daemon.service?) sp that might be the way to solve that problem. I feel like I have even done that on the fly on an ad-hoc basis somehow, but my memory is vague... > 2. We add a check to guix and print a warning to the console if `/tmp` > is using tmpfs, again hinting the user about what to do (e.g. by > pointing to the relevant section of the Guix manual) On machines that have sufficient ram, I often intentionally go out of my way to use tmpfs for /tmp, as that makes for much faster builds with guix (amoung other benefits)! So I would prefer not to have such a warning... :) But yes, seems like better checks for free space might be in order! live well, vagrant
signature.asc
Description: PGP signature
