On 03/03/10 11:43, Jim Meyering wrote:
Pádraig Brady wrote:
On 02/03/10 22:51, Pádraig Brady wrote:
I'll apply the patch with SEQUENTIAL enabled,
and summarise in a comment the results we've uncovered.
I'll push the attached later today, unless there are objections.
Nice work.
Thanks to both of you!
You must have a few small stand-alone tests that run timings.
If you post one or two, I'll run them on a variety of
hardware and newer kernels.
shuf -i 1-100000000 -n 10000000 > file
prep_cache() {
echo 1 > /proc/sys/vm/drop_caches
time sort < /dev/null
}
#This should show benefit on faster flash devices
prep_cache; time LANG=C sort -T/dev/shm < file > /dev/null
#This should show some benefit on all devices
prep_cache; time LANG=C sort -T/dev/shm -S1M < file > /dev/null
cheers,
Pádraig.
p.s. It would be nice to nuke a particular file in the cache
for testing at least. I wonder would a flag on dd be useful.
I previously noticed a /proc/filecache interface for doing this
but it never materialized.