Re: Overcommitable memory??

From: James Sutherland (jas88@cam.ac.uk)
Date: Thu Mar 16 2000 - 10:08:24 EST


On 15 Mar 2000, Rask Ingemann Lambertsen wrote:

> Den 14-Mar-00 18:32:49 skrev Rik van Riel følgende om "Re: Overcommitable memory??":
> > On 13 Mar 2000, Rask Ingemann Lambertsen wrote:
>
> [program crash because demand loading fails due to no memory]
> >> Without overcommit that just can not happen. There will be
> >> either a free page of memory or a free page of swap into which
> >> you can swap something else out.
>
> > Without overcommit it can still happen, unless you reserve one
> > page of swap space for every page of data that gets mmap()ed...
>
> Not having swap or RAM for every page of mmap()ed data means that you
> are overcommitting memory. If you're mmap()ing a file, then that file can
> count as swap too. Files with "holes" in them may be a problem.

Overcommitting memory is not the problem I have in mind here.

> >> Please realize that the only gain from overcomitting memory
> >> is that yoy may get away with having less swap space. The
> >> downside you get is random program crashes, lost work, etc.
>
> > Not really. Without overcommit you may still have random program
> > crashes and lost work...
>
> Yes, really. Maybe I should have said "additional lost work" instead of
> just "lost work". Without overcommit, program crashes will only happen due
> software bugs or hardware problems. Lost work will only happen due to user
> errors, software bugs or hardware problems. If you overcommit memory, you
> can lose the file you were editing in emacs simply because someone sent you
> an email and the MTA needed a bit of memory to deliver it to you. Some
> people, myself included, just don't find that acceptable at all.

You can still run out of memory, with or without COW, overcommit etc. I
think we are talking at cross purposes here: By running out of memory, I
mean there isn't any free memory to give to apps requesting it (via
malloc() etc.)

If Netscape blows up and grabs all my memory, other applications can't get
any - so I have problems. I need Netscape to be killed to fix the problem
- and I can't log in to do it manually. THIS is the OOM situation I am
thinking of, not a kernel-level problem of being unable to handle a page
fault.

James.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:18 EST