lkml.org 
[lkml]   [1999]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[PATCH] MM fix & improvement
From
Date
OK, here it goes. Patch is unbelievably small, and improvement is
BIG.

Two things:

1) Til' now, writing to swap files & partitions was clustered
in 128kb chunks which is too small, especially now when we have swapin
readahead (default 64kb). Fragmentation of swap file with such a value
is big, so swapin readahead hit rate is probably small. Thus first
improvement is in increasing on-disk cluster size to much bigger
value. I chose 512, and it works very well, indeed (see below). All
this is completely safe.

2) There was an artificial limit in swapin readahead code, that is
completely unnecessary, and also kills performance a big time. It also
makes trouble with two thrashing tasks, because swapin readahead
doesn't work very well in such low memory condition. I removed it
alltogether, and swapping quite improved.

If you don't believe, look at benchmarks I made for your eyes only
(swap cache statistics is after both runs):

pre6 + MM cleanup (needed for swap cache hit rate)

hogmem 100 3 - 10.75 MB/sec
2 x hogmem 50 3 - 2.01 + 1.97 MB/sec (disk thrashing)
swap cache - add 194431 find 13315/194300 (6.9% hit rate)

pre6 + MM cleanup + patch below

hogmem 100 3 - 13.27 MB/sec
2 x hogmem 50 3 - 6.15 + 5.77 MB/sec (perfect)
swap cache - add 175887 find 76003/237711 (32% hit rate)

Notice how swap cache done it's job much better with changes applied!!!

Both tests were run in single user mode, after reboot, on 64MB
machine. Don't be disappointed if you get smaller numbers, I have two
swap partitions on different disks and transports (IDE + SCSI). :)

[unhandled content-type:application/octet-stream]
--
Zlatko
\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.051 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site