Re:Ubuntu 16.04: “Out of memory” errors after upgrade to 4.4...
by StreamBright on Sunday January 29, 2017 @04:08AM
(#13513210)
Exactly, people in this thread missing the point of the use of RAM. A perfect operating system always going to use as much RAM is available for caching and there are long running processes that can be swapped out to free RAM for more important use cases. Memory management and paging/swapping is an interviewing topic for SREs/systems engineers, and this is not an accident. Oversimplifying the problem does not help.
Re:Ubuntu 16.04: “Out of memory” errors after upgrade to 4.4...
by ahoka on Sunday January 29, 2017 @05:50AM
(#13513557)
It's surprising that many professionals have broken mental models about how an operating system supposed to work. I think they have something like DOS in mind. I was just told last week about how caching static (!) files from web server in redis increase performance in their infrastructure. I was baffled.
Re:Ubuntu 16.04: “Out of memory” errors after upgrade to 4.4...
by mrmondo on Sunday January 29, 2017 @04:54AM
(#13513387)
Yeah it wasn't well announced when the change was made, esentially if you find any linud machines running any kernel dating way back to 3.5 make sure you change vm.swappiness=0 to vm.swappiness=1
I recall a fascinating article / thread years ago about swappiness=0 not actually meaning what people thought it meant, and explaining why it was (generally) a bad idea. A low number, yes, but not 0.
Doing some research now, and found a blog written by someone bitten by this change back in 2014-04 -- referring to the commit that introduced this in 3.5-rc1. Not clear why the change was made, though, as a) it breaks lots of people's understanding / expectation, and b) if you want to never swap out then just forego the creation of a swap file / partition.
[1] https://www.percona.com/blog/2014/04/28/oom-relation-vm-swap...