Live data from Hacker News

A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

lowendbox.com

21–30 of 137 posts

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#21
post #11

The third mitigating feature the article forgot to mention is that tmpfs can get paged out to the swap partition. If you drop a large file there and forget it, it will all end up in the swap partition if applications are demanding more memory.

Which is a great reason to have a big swap file now.

[deleted]

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#22

Using the example from the article, extracting an archive. Surely that use case is entity not possible using in-memory? What happens if you're dealing with a not-unreasonable 100gb archive? Who runs around with 100gb+ of swap?!

Who runs around with a 100gb+ /tmp partition?

Our default server images come with a 4.4GB /tmp partition...

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#23
Swap on servers somewhat defeats the purpose of ECC memory: your program state is now subject to complex IO path that is not end-to-end checksum protected. Also you get unpredictable performance.

So typically: swap off on servers. Do they have a server story?

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#24
post #18

Earlier quoted context omitted.

Which is a great reason to have a big swap file now.

Note though that if you don't have swap now, and enable it, you introduce the risk of thrashing [1] If you have swap already it doesn't matter, but I've encountered enough thrashing that I now disable swap on almost all servers I work with. It's rare but when it happens the server usually becomes completely unresponsive, so you have to hard reset it. I'd rather that the application trying to use too much memory is ki…

This is why I’m running with overcommit 2 and a different ratio per server purpose.

…though I’m not sure why we have to think about this in 2025 at all.

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#25
post #13

Earlier quoted context omitted.

Most systems probably aren't having problems with insufficient RAM nowaday though, do they? And this will reduce wear on your SSD. Also, you can easily disable it: https://www.debian.org/releases/trixie/release-notes/issues....

If you're running it in a VM you might not have all that luxurious RAM. When my Linux VM starts swapping I have to either wait an hour or more to regain control, or just hard restart the VM.

Right, but if it's a VM, it's probably provisioned by something like ansible/terraform? If so, it's quite easy to add an init script that will disable this feature and never have to worry about it again.

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#26
post #18

Earlier quoted context omitted.

Which is a great reason to have a big swap file now.

Note though that if you don't have swap now, and enable it, you introduce the risk of thrashing [1] If you have swap already it doesn't matter, but I've encountered enough thrashing that I now disable swap on almost all servers I work with. It's rare but when it happens the server usually becomes completely unresponsive, so you have to hard reset it. I'd rather that the application trying to use too much memory is ki…

Disabling swap on servers is de-facto standard for serious deployments.

The swap story needs a serious upgrade. I think /tmp in memory is a great idea, but I also think that particular /tmp needs a swap support (ideally with compression, ZSWAP), but not the main system.

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#27
post #23

Swap on servers somewhat defeats the purpose of ECC memory: your program state is now subject to complex IO path that is not end-to-end checksum protected. Also you get unpredictable performance. So typically: swap off on servers. Do they have a server story?

That's a really good point that had never occurred to me.

Edit: I think that the use of ZFS for your /tmp would solve this. You get Error Corrected memory writing to an check-summed file system.

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#28
post #26
post #18

Earlier quoted context omitted.

Note though that if you don't have swap now, and enable it, you introduce the risk of thrashing [1] If you have swap already it doesn't matter, but I've encountered enough thrashing that I now disable swap on almost all servers I work with. It's rare but when it happens the server usually becomes completely unresponsive, so you have to hard reset it. I'd rather that the application trying to use too much memory is ki…

Disabling swap on servers is de-facto standard for serious deployments. The swap story needs a serious upgrade. I think /tmp in memory is a great idea, but I also think that particular /tmp needs a swap support (ideally with compression, ZSWAP), but not the main system.

Swap always seemed more meant for desktop use. Servers you need to give the real memory expected of the application stack.

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#29
post #13

Earlier quoted context omitted.

Most systems probably aren't having problems with insufficient RAM nowaday though, do they? And this will reduce wear on your SSD. Also, you can easily disable it: https://www.debian.org/releases/trixie/release-notes/issues....

If you're running it in a VM you might not have all that luxurious RAM. When my Linux VM starts swapping I have to either wait an hour or more to regain control, or just hard restart the VM.

What distro are you running? systemd-oomd kills processes a bit quicker than what came before (a couple minutes of a slow, stuttery system). Still too slow for a server you'd want to have back online as quickly as possible.

At least now when I run out of memory it kills processes that consume the most memory. A few years back it used to kill my desktop session instead!

Re: A deep dive into Debian 13 /tmp: What's new, and what to do if you don't like it

#30
post #11

The third mitigating feature the article forgot to mention is that tmpfs can get paged out to the swap partition. If you drop a large file there and forget it, it will all end up in the swap partition if applications are demanding more memory.

what swap partition?

I meant this sort of jokingly. I think have a few linux systems that were never configured with swap partitions or swapfiles.

Post reply on HN