Re: unexpected paging during large file reads in 2.1.127

Zlatko Calusic (Zlatko.Calusic@CARNet.hr)
16 Nov 1998 23:05:56 +0100


"David J. Fred" <djf@ic.net> writes:

> >
> >Page cache is definitely too aggressive on recent kernels. I developed
> >a small patch that avoids excessive swapouts. It helps kswapd to have
> >less trouble reusing pages from page cache.
> >
> >Index: 126.2/mm/filemap.c
> >[...]
> >+ /* Age named pages aggresively, so page cache
> >+ * doesn't grow too fast. -zcalusic
> >+ */
> >+ age_page(page);
> >+ age_page(page);
> >
> >Try that and report results, please!
>
>
> While it didn't solve the problem completely it definitely helped.
> With the extra age_page() calls I didn't see anything resembling the
> thrashing I saw before. However very regularly, every 15-18 seconds
> or so, I still got little bursts of swapouts. It was nothing that
> impacted the system overall but it still did mildly interfere with
> uniform read performance.

Yes, that is exactly how I see it.

Now, system is swapping out occasionally which shouldn't affect read
performance *that* bad. But still it has some impact. At least, I can
live with it.

>
> >Other, more drastic thing to do is to completely remove the if clause
> >above. That defeats page aging completely and returns you to 2.0
> >behaviour. In that case, it would probably be good to return two
> >constants in shrink_mmap() (mm/filemap.c) to their old smaller values:
> >
> > count_max = (limit<<2) >> (priority>>1);
> > count_min = (limit<<2) >> (priority);
> >
> >Just change both (limit<<2) to (limit<<1).
>
> This "more drastic" method cleared up the swapping during file reads,
> but from what you say is apparently a regression of sorts.
>

Yup!

>
> I guess my main concern was that nobody had noticed this behavior. It
> sounds like solutions are being pondered, which is heartening.
> Incidentally, if you'd like me to test any other proposed solutions on
> a relatively large memory (256M) machine, just let me know.
>

I don't have any other solutions.

You're free to apply any of two mentioned, whichever suits you
better. Both are perfectly stable and only problem is that you have to
patch your kernel manually.

I do it all the time. :)

Regards,

-- 
Posted by Zlatko Calusic           E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
	    10 out of 5 doctors feel it's OK to be skitzo!

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