←back to thread

150 points shaunpud | 1 comments | | HN request time: 0s | source
Show context
nrdvana ◴[] No.45060203[source]
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.
replies(3): >>45060224 #>>45060756 #>>45061403 #
buckle8017 ◴[] No.45060224[source]
Which is a great reason to have a big swap file now.
replies(2): >>45060524 #>>45060578 #
gnyman ◴[] No.45060524[source]
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 killed by the oom manager and I can ssh in and fix that.

[1] https://docs.redhat.com/en/documentation/red_hat_enterprise_...

replies(4): >>45060599 #>>45060656 #>>45060800 #>>45061646 #
1. ◴[] No.45060800{3}[source]