Re: Overcommitable memory??

From: James Sutherland (jas88@cam.ac.uk)
Date: Tue Mar 21 2000 - 18:42:52 EST


On 21 Mar 2000 14:40:3 +0100, you wrote:

>Den 19-Mar-00 19:55:47 skrev James Sutherland følgende om "Re: Overcommitable memory??":
>> On 19 Mar 2000 2:49:12 +0100, you wrote:
>>>
>>> That's all theory. Reality is that Linux always overcommits memory
>>>regardless of what you set /proc/sys/vm/overcommit_memory to. Proof:
>
>> (snip sample program which does NOT touch the allocated memory)
>
> No, of course it doesn't. Why should it? The whole point of it was to
>prove that Linux always overcommits memory. It did that. The point was not
>to prove that you can trivially nuke any Linux system without even being
>nasty. We know that already. I didn't see any point in causing greef (lost
>work, etc.) for the other users on that box. Do you?

You didn't prove anything useful, though.

>>> I started 14 processes which each successfully allocated 64 MB. That's
>[cut]
>>>interval. If only overcommitment could be disabled...
>
>> How would this help? You would just allocate the memory you have
>> faster, and run out of memory sooner.
>
> It would have helped because only 3-4 of those processed would have been
>allowed to run, thereby isolating the problem to the remaining 10-11
>processes.

The problem is not the other processes, though! The problem is, your
workload is too high for the system to handle.

>> Anyway - your system crashes to a "big red switch" state when a
>> process grabs all the VM?!?! You have a serious problem there - but it
>> isn't overcommit.
>
> The problem _is_ overcommit. The proof that overcommit is the problem is
>that the kernel's OOM killer sets in.

No. Overcommit doesn't change anything other than HOW the problem
manifests itself in this case. The problem is your workload.

>> Which process is leaking, anyway??
>
> None. We don't have any processes doing anything wrong. We're just so
>unfortunate that we're running a kernel which doesn't have even the most
>basic piece of memory management.

You had a dozen or so processes doing something very wrong - grabbing
all the system's resources. Without overcommit, other processes would
have died because of your malloc bomb. With it, there was no problem.

Overcommit just PREVENTED a problem on your box.

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:35 EST