KDE Neon using tmpfs for /tmp seems like an horrible idea? - eviltoast

I get the idea behind it for sure but why use our available ram for this? I thought whatever init functionality would just wipe clean /tmp at boot.

Right now what I’m looking at is that if a system has 16gbram KDE Neon uses half of it for /tmp.

The thing is applications could output to /tmp for a plethora of reasons that could maximize that. Whether you are a content creator or processing data of some sort leaving trails in /tmp the least I want is my ram being used for this thing regardless.

Basically if you drop-in a 10GB file in /tmp right now (if your setup has tmpfs active) you will see a 10GB usage in your htop. Example in https://imgur.com/a/S9JIz9p

I’m not here to pick a fight but as a new KDE Neon user I’m scratching my head on the why after years in Arch Linux.

  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    7 months ago

    I think, and i’m open to alternative theories, is that using RAM instead of disk is safer when the tmp directory fills up.

    If you have /tmp being a regular directory on your root drive, if you fill your disk witg tmp files, other processes wont be able to save files to disk, resulting in lost data.

    If you have it in a ram disk, when the tmpfs fills up too much, the oom killer can get more space (unsure if oomkiller can wipe tmpfs, but that probably would be ideal?).

    Neither are good, and both can result in data loss, but tmpfs may be safer?