[PATCH/RFC] readahead applet

Michael Opdenacker michael-lists at free-electrons.com
Mon Aug 21 18:44:34 UTC 2006


Paul Fox wrote:
>  > 
>  > With our new "readahead" command, everything is done in one system call. 
>  > So, almost everything is done in kernel mode, possibly in an optimized 
>  > way between the filesystem and page cache. And of course, no buffer copy 
>  > from kernel-space to user-space is done!
>  > 
>  > To prove this I ran "time readahead" and "time cat" on 2 identical files.
>
> what's the result if you compare with "time dd bs=<some large number>" ?
>   
Here it is:

time dd if=file of=/dev/null bs=40M count=1 (my file is 40M big... it's 
the latest kernel sources)
real    0m1.610s
user    0m0.012s
sys     0m0.188s

time dd if=file of=/dev/null bs=1M count=40
real    0m1.774s
user    0m0.016s
sys     0m0.084s

What I had before:

time cat file-copy > /dev/null

real    0m1.485s
user    0m0.012s
sys     0m0.080s

time readahead file

real    0m1.375s
user    0m0.000s
sys     0m0.028s

:-)

Michael.

-- 
Michael Opdenacker, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1000 pages!)




More information about the busybox mailing list