lkml.org 
[lkml]   [2000]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Some questions about linux kernel.
On Thu, 16 Mar 2000, Paul Jakma wrote:

> On Thu, 16 Mar 2000, James Sutherland wrote:
>
> > The problem is, denying memory requests leads to processes dying. This is
> > what we want to avoid.
> >
>
> of course. but there's only so much the kernel can do obviously.
>
> > In fact, last night I more or less killed this machine. I had overcommit
> > turned off,
>
> how did you do that? You can't turn off overcommit on linux.

echo 0 > /proc/sys/vm/overcommit_memory

> > and nothing major loaded (X, WWW server, xmms) and fired up
> > "make -j" on a biggish source tree. After quite some time, just about
> > everything died from lack of memory.
> >
>
> not surprisingly if you did what i think you did (ie echo 1 >
> /proc/sys/vm/overcommit_memory )

No - quite the opposite. I had 0 in /proc/sys/vm/overcommit_memory. All
that happened was the compiler processes grabbed all the VM I had,
malloc() started returning zero, things started dying when they couldn't
get the memory they needed.

> > How would you define "running out" of memory?
>
> sorry, i've been abusing that term again. I mean it more as "finding
> that we don't have the memory that we had hoped for because of
> overcommit".
>
> Running out of memory even when you've accounted for memory (eg older
> no-overcommit/backing store OSs) is just a hardware issue in my book,
> you can't avoid it, it's not interesting.

Ah, we're talking at cross-purposes then. I was meaning "when you can't
allocate any more" - i.e. malloc() starts returning 0, etc. This is a
perfectly "normal" thing to happen, and is what happened to me last night.

Even though I was sitting in front of it at the time, there was nothing I
could have done - I had an open "top" window, and saw my load average pass
the 10 mark, after which the system stopped responding to user input.
Keystrokes were not getting through, so it was just a "sit back and wait"
job. Eventually, everything went pear-shaped, all the processes exited
from lack of memory, and I was able to reload the processes I had lost -
Rik's patch could have made this a lot quicker, though!

IMO, if the kernel suddenly finds it has made promises it can't keep, it
has fscked up - OTOH, it's a bit late to do anything about it :-)


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:0.214 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site