▲ | vbezhenar 4 days ago | |||||||
I've always created swap of 1.5x - 4x RAM size on every Linux computer I've had to manage and never had any issues with it. That's my rule that I learned many years ago, follow to this day and will follow. Worst thing: I left 5% of my SSD unused which will actually be used for garbage collection and other staff. That's OK. What I don't understand is why modern Linux is so shy of touching swap. With old kernels, Linux happily pushed unused pages to a swap, so even if you don't eat memory, your swap will be filled with tens or hundreds MB of memory and that's a great thing. Modern kernel just keeps swap usage at 0, until memory is exhausted. | ||||||||
▲ | bawolff 4 days ago | parent | next [-] | |||||||
> What I don't understand is why modern Linux is so shy of touching swap. With old kernels, Linux happily pushed unused pages to a swap, so even if you don't eat memory, your swap will be filled with tens or hundreds MB of memory and that's a great thing. Modern kernel just keeps swap usage at 0, until memory is exhausted. The article has the answer. | ||||||||
▲ | creshal 4 days ago | parent | prev | next [-] | |||||||
> I've always created swap of 1.5x - 4x RAM size on every Linux computer I've had to manage and never had any issues with it. That's a couple terabyte of swap on servers these days, and even on laptops I wouldn't want to deal with 300-ish GB swap. | ||||||||
▲ | kevin_thibedeau 4 days ago | parent | prev [-] | |||||||
I haven't used swap for 15 years. You have to be judicious about heavy app usage with only 16GiB. With 32GiB, I've never triggered OOM. | ||||||||
|