lkml.org 
[lkml]   [1998]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: unexpected paging during large file reads in 2.1.127
From
Date
"David J. Fred" <djf@ic.net> writes:

> Hi there,
>
> Summary: When doing large file reads from disk the system pages
> unexpectedly causing moderate to severe degradation in I/O
> and overall system performance even though there is plenty of
> memory.
>
>
> Has anyone else noticed and/or characterized this specific behavior in
> the 2.1 kernels? I found some messages in the archives where Linus
> suggested a two line patch to mm/vmscan.c for what seemed to be a
> related problem, but that failed to fix the problem for me.
>
> I've been playing around without any instrumentation more
> sophisticated than vmstat, but it's pretty clear something unwanted is
> going on. It sort of looks like the problem crops up either when
> cache is getting bigger than max_percent or buffers are falling below
> min_percent. That's just a wildass guess (tm) based on the behavior
> of the system after tweaking various things /proc/sys/vm/*.
>

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
--- 126.2/mm/filemap.c Tue, 27 Oct 1998 14:47:22 +0100 zcalusic (linux-2.1/y/b/29_filemap.c 1.2 644)
+++ 126.3/mm/filemap.c Tue, 27 Oct 1998 14:53:32 +0100 zcalusic (linux-2.1/y/b/29_filemap.c 1.3 644)
@@ -176,6 +176,11 @@
touch_page(page);
break;
}
+ /* Age named pages aggresively, so page cache
+ * doesn't grow too fast. -zcalusic
+ */
+ age_page(page);
+ age_page(page);
age_page(page);
if (page->age)
break;

Try that and report results, please!

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).

Regards,
--
Posted by Zlatko Calusic E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
I feel so inar-inar-inar tic-u-late.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.079 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site