Subject: [linux-audio-dev] linux-kernel info: 2.4 Performance bug in read ahead
From: Roger Larsson (roger.larsson_AT_norran.net)
Date: Sat Jul 28 2001 - 13:06:30 EEST
Hi,
I have for some time wondered why reading two big (and identical) files
simultaneously (diff) takes the double time of reading them
sequentially... today I found the cause :-)
Linux limits the read ahead to 1+31 pages (á 4096 bytes = 128 kB) with
modern HD this is read quickly (4.3 ms, with 30 MB/s) then the head has to
move to the other file... (and that might take longer!)
You can hear the head moving when running diff on two big files...
(or running ardour from 24... :-)
Do you get around half the throughput when reading from more than one file?
I sent a patch to linux-kernel that corrects this (I changed the limit to 512
pages = 2MB).
But this can give a latency problem...
S streams reading full amount S*2MB will takes S*60 ms. But the kernel will
adopt a suitable read ahead for each sequential stream...
More about this later (including a patch) when the jury has returned...
/RogerL
-- Roger Larsson Skellefteå Sweden
This archive was generated by hypermail 2b28 : Sat Jul 28 2001 - 13:12:08 EEST