lkml.org 
[lkml]   [2000]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Avoiding OOM on overcommit...?
Date
On 21 Mar 2000 20:33:16 +0100, you wrote:

>Den 19-Mar-00 22:25:46 skrev James Sutherland følgende om "Re: Avoiding OOM on overcommit...?":
>> On 18 Mar 2000 01:11:59 -0500, you wrote:
>
>>>I agree with you Michael. This would make it possible to write
>>>applications which are robust about memory allocation, since they will
>>>know at malloc time whether they have the memory they requested and can do
>>>intelligent things (e.g., purge buffers, alert the user, wait, etc.)
>>>beyond merely catching SIGTERM and exiting gracefully.
>
>> You get this behaviour anyway if you just touch the memory when you
>> allocate it - perhaps using a wrapper or a patched C library?
>
> You're the one with the 20 Apache processes of 40 MB each, right? Just
>imagine what happens when glibc starts touching all malloc()ed memory.
>You'll lose the swap savings you like overcommitment for. In addition,
>you'll lose some system performance when all those 800 MB have to be
>touched. Requiring programs to touch the memory they have allocated will
>only make things worse in every possible way. That in addition to violating
>standards and thus breaking backward compatibility.

Most of the problems you describe are the result of (partially)
disabling overcommit. I will be throwing away a few hundred Mb of
otherwise perfectly usable swap space (thereby increasing the chances
of OOM situations).

I know it's not a bright idea to disable overcommit in this way. I
never wanted to disable it at all. We have seen cases where systems
work BECAUSE of overcommit, where they would fail without it. If
someone can now come up with an example of a system failing WITH
overcommit in circumstances where they would not fail without it, I'll
be interested.

Until then, I will continue to regard overcommit as a feature, not a
problem.


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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:1.184 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site