3 ms·
Ahh now I understand why people disable swap on Linux boxes. I came from a SunOS/Solaris & HP-UX background (late 90s) where we routinely configured swap for t
by WantonQuantum 4y ago
Ahh now I understand why people disable swap on Linux boxes.
I came from a SunOS/Solaris & HP-UX background (late 90s) where we routinely configured swap for the machines.
Later on I encountered Linux admins who refused to configure even a small amount of swap and they couldn't explain why. It seemed very odd to me. Nobody ever said the simple "swap sucks in the Linux kernel" to me.
- throw0101a 4y ago> I came from a SunOS/Solaris & HP-UX background (late 90s) where we routinely configured swap for the machines. Most non-Linux Unixes also do/did not allow memory (RAM+swap) over-commit by default, which may have coloured behaviours.
- linsomniac 4y agoIndeed. At a past job we had this million dollar cluster of HP machines (T520s), and one of the managers wanted to do some end of year spending, so they upgraded the memory in the cluster from 2GB to 4GB (back when that was an insane amount of memory, ~1995). But, we had not storage to back that new memory. They purchased 2GB per machine for god knows what, but didn't add 2GB discs. So we literally couldn't use it (because of how storage was allocated on that cluster, we couldn't just re-carve it to get an extra 2GB swap, it had dedicated 2GB drives for the swap).
- jstanley 4y agoWhy couldn't you use memory without corresponding swap space?
- linsomniac 4y agoThe HP-UX kernel required at least as much swap as RAM, due to the way it handled memory and swap. I used to know the details of those algorithms, but have freed those portions of my memory for other uses. It was something like: The algorithms HP-UX uses for virtual memory consider that memory based on swap, and the RAM is kind of like a cache layer in front of the swap. This makes the handling of allocation and swapping easier because you know where everything would go before you start trying to swap.
- emmelaich 4y agoBack in the 90s memory was small compared to disk, so it was fine. There's no way you'd enable swap equal to memory size these days, for large memory machines.
- throw0101a 4y agoDisk are still much bigger than memory on the majority systems. I can buy >16TB disks: I don't think I've deployed a machine with more than 1TB of RAM. (Maybe 2-4 (out of hundreds) in an HPC environment at previous employer had 1.5T?)
- emmelaich 4y agoIt's more about the speed; if you have 1Tb of swap, mostly used then the situation is so serious it's basically fatal.