2001-12-31 17:15:11

by M.H.VanLeeuwen

[permalink] [raw]
Subject: Re: [PATCH] [2.4.17/18pre] VM and swap - it's really unusable

Andreas,

Glad you liked oom2 patch ;)

I split of the patch into 2 pieces, mostly because the OOM killer tamer isn't
really needed anymore with the characteristics of the vmscan/cache recovery
changes. Both are a little different then before.

a. bug fixed oom killer that looked at whether or not cache was shrinking.
A greater or equal check should have been a greater then check only...unless
you were severely stressing your system you probably wouldn't have hit this
and because vmscan/cache recovery is working quite well.

b. removed nr_swap_pages from the check before deciding to goto swap_out. it seems
that we really do need to go to swap_out even for systems w/o any swap to clean
up various resources before some cache can be recovered. Unless you run out of
swap space or have no swap device you probably didn't hit this problem either.

I'm a little concerned about the amount of pages we are potentially throwing between
the active and inactive (refill_inactive) and back again once max_mapped is hit, but
a few experiments with limiting page movement between lists just seemed to make
near OOM performance much worse (lengthly system pauses & mouse freezes).

Anyone else have any comments on the patch(es)?

Do they make any since, if so, should either/both patches or pieces therof be
pushed to Marcello?

Martin
--------------------------------------------------------------------------------------
OOM tamer patch:

a. if cache continues to shrink, we're not OOM, just reset OOM variables and exit
b. instead of waiting 1 second, wait variable time based on Mb of cache, thus the
larger the cache the longer we wait to start killing processes. eg 10 megs of
cache causes OOM killer to wait 10 seconds before starting "c" below.
c. instead of fixed 10 occurrances after the N second wait above, wait 10 * Mb cache.

vmscan patch:

a. instead of calling swap_out as soon as max_mapped is reached, continue to try
to free pages. this reduces the number of times we hit try_to_free_pages() and
swap_out().
b. once max_mapped count is reached move any Referenced pages to the active list, until
enough pages have been freed or there are no more pages that can be freed.
c. only call swap_out() if both max_mapped is reached and we fail to free enough pages.


Attachments:
oom.patch.2.4.17 (1.25 kB)
vmscan.patch.2.4.17 (1.88 kB)
Download all attachments

2001-12-31 17:54:33

by Stephan von Krawczynski

[permalink] [raw]
Subject: Re: [PATCH] [2.4.17/18pre] VM and swap - it's really unusable

On Mon, 31 Dec 2001 11:14:04 -0600
"M.H.VanLeeuwen" <[email protected]> wrote:

> [...]
> vmscan patch:
>
> a. instead of calling swap_out as soon as max_mapped is reached, continue to
try> to free pages. this reduces the number of times we hit
try_to_free_pages() and> swap_out().

I experimented with this some time ago, but found out it hit performance and
(to my own surprise) did not do any good at all. Have you tried this
stand-alone/on top of the rest to view its results?

Regards,
Stephan