From: Linus Torvalds (torvalds@klaava.Helsinki.FI)
Date: 01/23/93


From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
Subject: Re: Freeze up on X
Date: 23 Jan 1993 09:15:50 GMT

In article <1993Jan23.002154.17904@novell.com> dvogt@novell.com (David Vogt) writes:
>
>I have had a number of problems with X freezing when pushed too hard.
>I have 16M ram + 16M swap and have experienced lockups when swap approachs
>0k.

Yes - apart from the bug in pl3 which did result in some lockups for
some people, there is actually a problem when swap-space is exhausted
(or nearly so). It's not something I have put a lot of thought in: it's
hard to handle gracefully, and my general opinion has been "add more
swapspace" (yes, it's possible to have more than 16MB swap even with the
current kernel: you'll just have to spread it out over several
swap-areas) or just "don't do that then" :)

When swap-space is completely exhausted, linux usually handles memory
management pretty badly: it *should* actually kill off a couple of
processes eventually to free up some memory, but the keyword here is
"eventually". I've gotten reports that it can take up to an hour before
linux decides to kill off processes due to lack of memory, and even then
the processes killed are essentially random (ie it could be the X
server). So it's best to try to avoid the "out of memory" problem
entirely, and not count on linux working without enough mem.

                Linus