Re:Sslip.io: A Valid SSL Certificate for Every IP Address
by aidenn0 on Tuesday September 08, 2015 @03:38PM
(#10187756)
Thrashing the page cache is typically much less horrible than swap thrashing, so swap off is still an improvement.
If you want a canary, why not just directly monitor the page cache size?
Re:Sslip.io: A Valid SSL Certificate for Every IP Address
by Dylan16807 on Tuesday September 08, 2015 @05:40PM
(#10188364)
I suppose it depends how big your binaries are, but once those are getting culled from memory things are not pretty.
Keep in mind that if your swap is not huge, it will very often fill will cold data and you won't have swap thrashing despite running out of memory.
Good point about measuring the page cache directly.
It's more complicated than just turning off swap. Even without swap, when you run extremely low on memory the page cache will be squeezed to nothing and you'll thrash. And I don't think there's a way to set a minimum page cache on Linux.
So in other words, I would not rely on the OOM killer ever kicking in.
In a situation with more memory use over time a small swap can act as a canary, letting you know you're nearing a performance drop, while a swapless server could suddenly hit a molasses wall without dying.