Re: OOM

Bernd Paysan (bernd.paysan@gmx.de)
Thu, 29 Jul 1999 13:39:30 +0000


Hi,

Stephen C. Tweedie wrote:
> On Wed, 21 Jul 1999 10:41:00 +0200 (MEST), Bernd Paysan
> <bernd.paysan@gmx.de> said:
>
> > I like aging in principle, I just think the current aging algorithm is not
> > good enough. It isn't easy to design a better one, though ;-).
>
> That's easy to say --- but what do you think is wrong with it? The
> aging algorithm is only one small part of the VM performance, remember.

I discussed this with a friend yesterday, and we concluded that Linux
tries too hard to fulfil requests for new pages. Linux's swap out code
beats the hard disk to the limit, even if sacrifying good, needed pages.

The idea is that you can't get a new page if all the available pages are
more valueable than the new page (that would be a configurable value,
space for swapped in pages probably should have higher priority than
space for newly allocated pages). A process requesting a page in such a
thight memory condition is put to sleep until some other pages age out
and it finally can get the requested page. To be fair, pending requests
should be queued up, and not served randomly.

The current policy is that new pages are worth more than anything else.
That's a bug IMHO. At least it isn't the right policy for a
multitasking, multiuser OS; if you set priorities to run one single task
best ("run my damn'd 300 MB RSS simulation NOW and swap out everything
else that is in the way"), it could be ok.

-- 
Bernd Paysan

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