Messages in this thread | ![/](/images/icornerl.gif) | | Date | Wed, 18 Apr 2001 13:49:24 +0200 (MET DST) | From | Bjorn Wesen <> | Subject | Re: Is there a way to turn file caching off ? |
| |
A similar phenomenon happens when you simply copy a file - file A is read into the cache and file B is written to the cache, until the memory runs out. Then both start to flush at the same time, creating a horrible performance hit (especially if A and B are on the same disk :)
I don't know a way to fix this except having the kernel correctly identify the access pattern and optimize for it (i.e. if it recognizes that cache pages are flushed in order to make room for more pages from the same inode, then it's probably a suboptimal caching pattern and instead it should probably increase the readahead and flush bigger chunks of pages at the same time). I don't think anything can be done to the writing queue (except maybe make the kernel understand that seek-time is more expensive than transfer-time, so it does not schedule the read/writeing each odd page..)
I'm still using 2.4.0 though so maybe this behaviour has been fixed to the better in later kernels..
As a sidenote, try the same thing on an WinNT box and watch it die :) Like unpacking a 1 GB file on a machine with 128 MB ram.. after it has unpacked the first 100 MB's or so, performance drops to 1% or something..
-BW
On Tue, 17 Apr 2001, Laurent Chavet wrote: > 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).
- 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/
| ![\](/images/icornerr.gif) |