Re: OOM Patches: Tests and Results

Andrea Arcangeli (andrea@e-mind.com)
Thu, 8 Oct 1998 22:22:41 +0200 (CEST)


On Thu, 8 Oct 1998, D. Schwingel wrote:

>I have been doing some tests with the proposed patches for better
>management of OOM (out of memory) under Linux and I'm posting the
>results for my configuration.

Thanks.

>**************************************************************
>**************************************************************
>Testing linux 2.1.124 + Andrea's patch version 8

WARNING WARNING all my oom patches had a bug that could cause the system
to crash. My latest patch (the one in the mail I sent to the list where I
said that I am stupid) has that bug fixed (thanks to Linus btw ;-).

>In this test I ran a few instances of aleak (4 to 6) and the system was
>still responsive. However it seemed very near trashing.

To help me understanding what' s happening, you must go in console and
press SHIFT+SROLL-LOCK and tell me how much swap and memory memory free
you had at the trash time.

You must then press CTRL+SCROLL-LOCK and move with SHIFT-PGUP/DOWN to see
which is the most `current' process (easy because you see the word current
in the current process ;-). Note in particular if you see always kswapd as
the current process.

>Then I ran leak and still was able to switch from X to a text console.
>The memory was totally full, I could not log in (can't map libxxx),
>could not run free or any other program.

My system is always able to kill one of my aleak. But could be normal that
you are unable to kill them because maybe you have an unluky combination
of max memory (where all aleak are allowed to run without oom but nothing
more can run at the same time and goes killed). You can play with the size
of the malloc of my aleak to understand if this is really the legitimate
case.

>I switched back to X and the system was responsive for a while but went
>into hard thashing soon. I let the system trashing for 15 minutes to see
>what could happen and during this time I was unable to do anything
>(switch VCs, mouse, CapsLock, NumLock, etc).

Lear how to use SysRQ and you' ll have not to reset anymore.

>The behaviour was near the same as TEST 2. However after some minutes
>trashing, my pograms started closing one after another. All xterms died,
>KDE died, X died and I was returned to $ prompt. (I reported this same
>behaviour with the first Andrea patch).

This is the expected behaviour. Eventually having X killed is not the best
;-) but sure is better to have something killed than lost control over the
system.

>Impressions:
> I don't understand the result of TEST 3 (Andrea?)

They could be all legitimate cases. I need the info from the magic-KEYS to
be sure. TEST 3 is the best.

> For TESTs 1,2 it seems to me that the system behaves theoretically
> perfect. It doesn't deadlock nor crash.

So all is fine ;-).

> However this is not the behaviour I (the user) want, because I want
> to be able to kill a/some process and get control of my system again.

Agreed. Generally an application out of control end up eating more and
more and it should be killed by my patch. But there' s no fix for
malicious programs like the leak that never fault and fill all memory with
my patch. I only want to make things working right now.

> I have seen Andrea claim that his patch enhances Linux MM. I'm not able
> to understand if its true, but I ask Rik to take a close look at it.

The word enhances is not right (I was wrong if I used it) the word "fix"
is more appropriate. Before my patch my aleak was pratically generating a
deadlock. Try to run my aleak with the stock kernel and will see.

>And just to clarify, I'm supporting the idea that an OOM Killer must be
>an option for people who need it and it seems that there are several
>administrator out there who will be happier enabling it (me included).

I know that the end result can be similar but note that the issue of an
OOM killer daemon has a little to do with my patch.

Andrea[s] Arcangeli

-
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/