On Sonntag, 27. März 2011 Arnd Bergmann wrote:
Note that the number for 96 KB is actually higher than the one for 768 KB that you pointed out. We already know that 32 KB is much faster than 16 KB here, and 96 is the lowest multiple of 32 in 3*2^n.
Right: # dd if=/dev/zero of=/dev/sde1 bs=96K oflag=direct count=2730 2730+0 records in 2730+0 records out 268369920 bytes (268 MB) copied, 10.4203 s, 25.8 MB/s
So this is the Red Bull for my stick ;-)
Please run
# ./flashbench --open-au --random --open-au-nr=5 --erasesize=$[3 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 3MiB 17.2M/s 1.5MiB 6.3M/s 768KiB 2.53M/s 384KiB 1.17M/s 192KiB 568K/s 96KiB 283K/s 48KiB 140K/s 24KiB 69.5K/s # ./flashbench --open-au --random --open-au-nr=5 --erasesize=$[6 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 6MiB 8.99M/s 3MiB 7.43M/s 1.5MiB 4.47M/s 768KiB 2.22M/s 384KiB 1.11M/s 192KiB 558K/s 96KiB 282K/s 48KiB 141K/s 24KiB 70.1K/s # ./flashbench --open-au --random --open-au-nr=5 --erasesize=$[12 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 12MiB 13.1M/s 6MiB 14.9M/s 3MiB 7.74M/s 1.5MiB 4.39M/s 768KiB 2.39M/s 384KiB 1.12M/s 192KiB 560K/s 96KiB 283K/s 48KiB 142K/s 24KiB 70.6K/s # nice --20 ./flashbench --open-au --random --open-au-nr=6 --erasesize=$[3 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 3MiB 9.01M/s 1.5MiB 6.26M/s 768KiB 2.56M/s 384KiB 1.19M/s 192KiB 576K/s 96KiB 286K/s 48KiB 142K/s 24KiB 70.3K/s
Then I tried some other values too:
# nice --20 ./flashbench --open-au --random --open-au-nr=4 --erasesize=$[3 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 3MiB 7.64M/s 1.5MiB 6.73M/s 768KiB 2.59M/s ^C # nice --20 ./flashbench --open-au --random --open-au-nr=4 --erasesize=$[12 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 12MiB 22.8M/s 6MiB 15.7M/s 3MiB 7.76M/s 1.5MiB 4.45M/s 768KiB 2.46M/s 384KiB 1.13M/s 192KiB 562K/s 96KiB 284K/s 48KiB 142K/s 24KiB 70.6K/s # nice --20 ./flashbench --open-au --random --open-au-nr=3 --erasesize=$[12 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 12MiB 12.5M/s 6MiB 15.4M/s 3MiB 9.6M/s 1.5MiB 5.11M/s 768KiB 2.75M/s ^C # nice --20 ./flashbench --open-au --random --open-au-nr=2 --erasesize=$[12 * 1024 * 1024] /dev/sde --blocksize=$[24 * 1024] --offset=$[24 * 1024 * 1024] sched_setscheduler: Operation not permitted 12MiB 9.28M/s 6MiB 11.7M/s 3MiB 10.4M/s ^C
The goal is to find the minimum value for --erasesize= and the maximum value for --open-au-nr= that can give the full bandwidth of 20+MB/s, which I'm guessing will be 12 MB and 5, but it would be helpful to know for sure.
OK, seems au=4 and erasesize=12M is the best.
In any case, it's a good idea to align the partition to the start of the erase block (6 or 12 MB), not the 4 MB that I told you before.
Recreated with 12MB offset, thx.