Is there a way to turn file caching off ?

Laurent Chavet (lchavet@av.com)
Tue, 17 Apr 2001 09:37:24 -0700


Hi,

I'm running on a machine with 2GB of memory and dual PIII 550MHZ.
Just after boot with "nothing else running":
I run a program that almost like dd if=/dev/null of=/local/test
count=10000 bs=1000000
Except that there is a thread for reading and a thread for writing.
The program itself almost doesn't take any CPU.
What's going on is top showing:
First cache grows to the size of RAM (2GB) with transfer rate
slowing down as the cache grows.
Then the transfer rates drops a lot (2 to 3 time slower than the
drive capacity) and there is a very high CPU usage of system time (more
than a CPU) used by bdflush and kswapd (and some others like kupdated).

Of course my real application doesn't go from /dev/zero to file but it
still only does sequential access, and it seems that I pay a high price
for the file caching when I'm not using it at all.

Is there a way to turn file caching off, or at least limit its size ?

Thanks,

Laurent Chavet

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/