Random file I/O regressions on stock Linux kernelsUpdate: 05/05/2004: Andrew Morton posted on the linux-kernel mailing list the read-ahead patch against 2.6.6-rc3 that cuts the regression down to about 10% . The results of the patched 2.6.6-rc3 have been added to the results table below.
I ran the SysBench random file I/O test on stock 2.4 and 2.6 kernels and found significant regressions for 2.6 kernels that I failed to explain.
Test setupThe workloads were created by the SysBench fileio test with the following parameters:
The fileio test configured in this way creates 16 worker threads, each running random read/write I/O requests in blocks of 16 KB with a read/write ratio of 1.5. All I/O operations are evenly distributed among 128 files with a total file size of 3 GB. Each 100 requests, an fsync() operation is performed sequentially on each file. The total number of requests is limited by 10000.
The SysBench command line arguments for this configuration are the following:
sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw runThe filesystem used for the test runs was ext3 with data=ordered.
HardwareThe benchmarks hardware is an AMD Athlon 800 MHz with 640 MB RAM and an IBM IC35L040 IDE hard drive.
Kernel versionsI tested vanilla 2.4.25 (config), 2.6.5-bk2 (config) and 2.6.6-rc3 (config) (+ read-ahead patch) kernels with a default I/O scheduler for 2.4.25 kernel and anticipatory, deadline, CFQ and "noop" schedulers for 2.6.x kernels.
ResultsThe following table shows the results of the tests. Values represent the number of seconds required for the test to complete (lower is better).