Hi, I have for some time wondered why reading two big (and identical) files takes the double time of comparing them... 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... You can hear the head moving when running diff on two big files... 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
