Speeding up swap

Kristian Koehntopp (kris@koehntopp.de)
Sat, 16 Oct 1999 20:11:01 +0200


A friend of mine has a machine which is being used for certain
numerical problems. The system has 512 MB RAM and another 1.5
Gig of RAM. The memory objects in use are usually contiguous
chunks of memory sized between 2 and 20 MB, which are normally
accessed in a sequential manner.

Benchmarking the harddisk area which is being used for swap, he
can get sustained write rates of 26 MB/sec under Windows NT
4.0SP5 as well as under Linux 2.2.12. Swapping a gigabyte of
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.

The questions are:

1. Why is this so slow compared to the benchmarked data rate?

2. What tools are available under Linux to determine the reason
for the paging activity (i.e. are these only accesses for the
desired memory objects or are we observing some strange
interference between multiple processes?) or to show how
memory objects map to swap area data blocks? Or, formulated
more abstract, what tools are available to debug such
problems?

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
sequential/sequential backward/random so that the system can
optimize its memory access strategy. Where would one search
for documentation on such system calls?

Kristian

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