|
|
Subscribe / Log in / New account

Taming the OOM killer

Taming the OOM killer

Posted Jul 16, 2014 12:18 UTC (Wed) by dgm (subscriber, #49227)
In reply to: Taming the OOM killer by dgm
Parent article: Taming the OOM killer

Not to mention that overcommit is not the same as CoW. You can keep CoW and still disable overcommit (there's even a knob for that).


to post comments

Taming the OOM killer

Posted Jul 16, 2014 15:07 UTC (Wed) by nybble41 (subscriber, #55106) [Link]

> Not to mention that overcommit is not the same as CoW. You can keep CoW and still disable overcommit....

CoW is still a form of overcommit, even if it's not referred to as such. In the one case you commit to allocating a new page in the future, on the first write, and pre-filling it with a copy of an existing page. In the other case you commit to allocating a new page in the future, probably on the first write, and pre-filling it with zeros. In both cases you're writing an IOU for memory which may not actually exist when it's needed.

You could pre-allocate memory for CoW while deferring the actual copy, but that would only be a performance optimization. You'd still have the problem that fork() may fail in a large process for lack of available memory even though the child isn't going to need most of it.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds