2 ms·
That really depends on your overcommit settings. It seems that you describe an overcommit = 2 case, when the total VIRT for all processes will not exceed swap +
by test608481164 9y ago
That really depends on your overcommit settings. It seems that you describe an overcommit = 2 case, when the total VIRT for all processes will not exceed swap + memory * overcommit_ratio%. But that's not default mode (default is overcommit = 0). And you can mitigate this issue in other ways (as enabling swap can lead into some very bad situations when _physical_ memory gets exhausted):
- set overcommit = 1, OOM now comes only when sum(RSS) exhausts swap + memory
- just increase overcommit_ratio if you want to stay under overcommit =2