Re:In defence of swap: common misconceptions
by JdeBP on Monday January 15, 2018 @02:17AM
(#16149091)
Well the article does suggest a mechanism to apply.
As for the problem with SSH and login: You might well find that it is not the fork that is the problem. You might well be surprised at how much chaff is run by a login shell, or even by non-login shells.
A case in point: I recently reduced the load on a server system that involved lots of SCP activity by noticing that, thanks to RedHat bug #810161, every SCP session even though it was a non-login non-interactive shell was first running a program to enumerate the PCI bus, to fix a problem with a Cirrus graphics adapter card that the machine did not have on a desktop environment that the machine did not have. This driven by /etc/bashrc sourcing /etc/profile.d/* .
* https://github.com/FedoraKDE/kde-settings/blob/F-26/etc/prof...
Re:In defence of swap: common misconceptions
by rfjakob on Sunday January 14, 2018 @05:56PM
(#16147027)
There's a userspace daemon that does that: https://github.com/rfjakob/earlyoom (I am the author)
Re:In defence of swap: common misconceptions
by XorNot on Sunday January 14, 2018 @05:36PM
(#16146918)
Swap iotime quotas maybe? I suspect the solution is a lot more complicated though - what I really want is a way to wall off my UI so it stays responsive during swap thrashing and let's me react to the situation.
Re:In defence of swap: common misconceptions
by codesnik on Monday January 15, 2018 @12:24AM
(#16148680)
I remember not being able to SSH on the box too, but this stopped be the case (for me at least) some five years ago - I was able to login to heavy swap trashing boxes without any problem. I thought that something was changed in contemporary linux distros. Either login shell was given much more priority or something like that.
Somehow that doesn't resonate with my experience. I tend to remember the cases where I can't even SSH into the box, because the fork in sshd takes minutes, as does spawning the login shell.
I'd really like some way to have swap, but still loosen the OOM killer on the biggest memory hog when the system slows down to a crawl. I haven't found that magic configuration yet.