Re: Speeding up swap

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 16 Oct 1999 21:55:56 +0100 (BST)


> data takes 6 min under NT and 11 min under Linux, resulting in a
> data rate of 6 MB/sec under NT and 3 MB/sec under Linux. During
> paging operations heavy seeking is audible.
>
> 1. Why is this so slow compared to the benchmarked data rate?

Because of the seeking. The data is being swapped out in chunks but these
are not linear chunks in swap

> 3. Are there any system calls available which can be utilized to
> advise the system that a certain area of memory will always
> be accessed as a contigous chunk of memory that should be
> grouped contigously in a swap area if possible and to advise
> the system that all memory accesses to this area will be

BSD has madvise() but Linux doesnt yet have this facility.

One thing you might want to do is to bump up the swap cluster size if you
are using 2.2.x. You can do this via /proc/sys - see Documentatuon/proc.txt

Tuning these values should get you a lot closer to the disk speed

Alan

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