▲ | mickeyp 4 days ago | |
That assumes the OOM killer kills the right thing. It may well choose to kill something ancillary, which causes your OOM program to just hang or misbehave wildly. The real danger in all of this, swap or no, is the shitty OOMKiller in Linux. | ||
▲ | kijin 4 days ago | parent | next [-] | |
The OOM killer will be just as shitty whether you have swap or not. But the more swap you have, the longer your program will be allowed to misbehave. I prefer a quick and painless death. | ||
▲ | xdfgh1112 4 days ago | parent | prev | next [-] | |
You can apply memory quotas to the individual processes with cgroups. You can also adjust how likely a process is to be killed. | ||
▲ | man8alexd 4 days ago | parent | prev [-] | |
Nowadays, the OOM killer always chooses the largest process in the system/cgroup by default. |