On Mon, Mar 07, 2011 at 06:03:05PM +0100, Arnd Bergmann wrote:
On Monday 07 March 2011 16:31:36 Philippe De Muyter wrote:
Of course it works better now, but I cannot get rid of an error message at startup :
tmp179:/home/lcr/flashbench # ./flashbench -a -b 1024 /dev/sdb sched_setscheduler: Operation not permitted
I think on some distros, doing a simple 'su' will not give you all the capabilies. Try 'su -' or 'sudo -s' instead.
I am really logged as 'root'.
align 67108864 pre 339µs on 338µs post 339µs diff -694ns align 33554432 pre 340µs on 338µs post 337µs diff -687ns align 16777216 pre 339µs on 338µs post 338µs diff -768ns align 8388608 pre 337µs on 337µs post 339µs diff -686ns align 4194304 pre 340µs on 341µs post 341µs diff 77ns align 2097152 pre 339µs on 340µs post 337µs diff 2.23µs align 1048576 pre 340µs on 341µs post 339µs diff 2.09µs align 524288 pre 338µs on 341µs post 339µs diff 2.21µs align 262144 pre 341µs on 340µs post 339µs diff 572ns align 131072 pre 341µs on 339µs post 339µs diff -211ns align 65536 pre 340µs on 341µs post 337µs diff 2.29µs align 32768 pre 341µs on 343µs post 342µs diff 1.69µs align 16384 pre 342µs on 343µs post 341µs diff 1.97µs align 8192 pre 340µs on 341µs post 339µs diff 1.43µs align 4096 pre 342µs on 343µs post 340µs diff 2.22µs align 2048 pre 342µs on 343µs post 342µs diff 1.41µs tmp179:/home/lcr/flashbench #
I have stopped apparmor, but that didn't make the message disappear. Are the outputs still meaningfull ?
The output is slightly strange, but not unheard of. The last column is the interesting one, and it shows that alignments over 8MB are different from alignments under 8 MB. I would assume that this device has an 8MB erase block, so you should pass --erasesize=$[8 * 1024 * 1024] to the other tests. You could run the -a test repeatedly and with other (larger) values of -b to be sure.
The most interesting test is the --open-au test. Try variations of
flashbench --open-au --open-au-nr=<NR> --erasesize=$[8 * 1024 * 1024] /dev/sdb [--random]
to find out the maximum value of <NR> that gives you the best performance, with and without --random.
Here are the results :
tmp179:/home/lcr/flashbench # ./flashbench -a -b 8192 /dev/sdb sched_setscheduler: Operation not permitted align 67108864 pre 1.49ms on 1.49ms post 1.49ms diff -2556ns align 33554432 pre 1.49ms on 1.49ms post 1.49ms diff -1001ns align 16777216 pre 1.49ms on 1.49ms post 1.49ms diff 1.29µs align 8388608 pre 1.49ms on 1.49ms post 1.48ms diff 1.52µs align 4194304 pre 1.49ms on 1.49ms post 1.49ms diff -3275ns align 2097152 pre 1.49ms on 1.49ms post 1.49ms diff -1312ns align 1048576 pre 1.49ms on 1.49ms post 1.49ms diff -70ns align 524288 pre 1.49ms on 1.49ms post 1.49ms diff -1565ns align 262144 pre 1.49ms on 1.49ms post 1.49ms diff 505ns align 131072 pre 1.49ms on 1.49ms post 1.49ms diff 582ns align 65536 pre 1.49ms on 1.49ms post 1.49ms diff 604ns align 32768 pre 1.49ms on 1.49ms post 1.49ms diff -2350ns align 16384 pre 1.49ms on 1.49ms post 1.49ms diff 3.01µs tmp179:/home/lcr/flashbench # ./flashbench -a -b 8192 /dev/sdb sched_setscheduler: Operation not permitted align 67108864 pre 1.49ms on 1.49ms post 1.49ms diff -2419ns align 33554432 pre 1.49ms on 1.49ms post 1.49ms diff -55ns align 16777216 pre 1.49ms on 1.49ms post 1.49ms diff -885ns align 8388608 pre 1.49ms on 1.49ms post 1.49ms diff -83ns align 4194304 pre 1.48ms on 1.49ms post 1.49ms diff 3.28µs align 2097152 pre 1.49ms on 1.49ms post 1.49ms diff -2336ns align 1048576 pre 1.49ms on 1.49ms post 1.49ms diff -762ns align 524288 pre 1.49ms on 1.49ms post 1.49ms diff 2.57µs align 262144 pre 1.49ms on 1.49ms post 1.49ms diff 1.53µs align 131072 pre 1.49ms on 1.49ms post 1.49ms diff 992ns align 65536 pre 1.49ms on 1.49ms post 1.49ms diff -936ns align 32768 pre 1.49ms on 1.49ms post 1.49ms diff -798ns align 16384 pre 1.49ms on 1.49ms post 1.49ms diff 1.36µs tmp179:/home/lcr/flashbench # ./flashbench -a -b 32768 /dev/sdb sched_setscheduler: Operation not permitted align 67108864 pre 5.41ms on 5.41ms post 5.41ms diff 2.23µs align 33554432 pre 5.42ms on 5.42ms post 5.41ms diff 2.13µs align 16777216 pre 5.41ms on 5.41ms post 5.41ms diff 2.23µs align 8388608 pre 5.41ms on 5.41ms post 5.41ms diff -3227ns align 4194304 pre 5.41ms on 5.41ms post 5.41ms diff 1.18µs align 2097152 pre 5.41ms on 5.41ms post 5.42ms diff -1046ns align 1048576 pre 5.41ms on 5.42ms post 5.42ms diff 1.78µs align 524288 pre 5.42ms on 5.42ms post 5.41ms diff 1.01µs try_align: Unknown error 86581938 tmp179:/home/lcr/flashbench # ./flashbench -a -b 32768 /dev/sdb sched_setscheduler: Operation not permitted align 67108864 pre 5.42ms on 5.42ms post 5.41ms diff 2.73µs align 33554432 pre 5.41ms on 5.41ms post 5.41ms diff 2.79µs align 16777216 pre 5.41ms on 5.41ms post 5.41ms diff -520ns align 8388608 pre 5.42ms on 5.41ms post 5.41ms diff -2059ns align 4194304 pre 5.41ms on 5.42ms post 5.41ms diff 4.26µs align 2097152 pre 5.41ms on 5.41ms post 5.41ms diff -1450ns align 1048576 pre 5.41ms on 5.41ms post 5.41ms diff 1.23µs align 524288 pre 5.41ms on 5.41ms post 5.41ms diff 2.67µs align 262144 pre 5.41ms on 5.42ms post 5.41ms diff 2.58µs align 131072 pre 5.41ms on 5.41ms post 5.41ms diff -143ns align 65536 pre 5.42ms on 5.42ms post 5.42ms diff 2.49µs tmp179:/home/lcr/flashbench # ./flashbench -a -b 65536 /dev/sdb sched_setscheduler: Operation not permitted align 67108864 pre 10.7ms on 10.7ms post 10.7ms diff 6.15µs align 33554432 pre 10.7ms on 10.7ms post 10.7ms diff 218ns align 16777216 pre 10.7ms on 10.7ms post 10.7ms diff -1817ns align 8388608 pre 10.7ms on 10.7ms post 10.7ms diff -3450ns align 4194304 pre 10.7ms on 10.7ms post 10.7ms diff 794ns align 2097152 pre 10.7ms on 10.7ms post 10.7ms diff 3.33µs align 1048576 pre 10.7ms on 10.7ms post 10.7ms diff -1295ns align 524288 pre 10.7ms on 10.7ms post 10.7ms diff 906ns align 262144 pre 10.7ms on 10.7ms post 10.7ms diff 617ns align 131072 pre 10.7ms on 10.7ms post 10.7ms diff 548ns tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=1 --erasesize=$[8 * 1024 * 1024] /dev/sdb sched_setscheduler: Operation not permitted 8MiB 5.53M/s 4MiB 5.57M/s 2MiB 5.57M/s 1MiB 5.57M/s 512KiB 5.57M/s 256KiB 5.56M/s 128KiB 5.56M/s 64KiB 5.47M/s 32KiB 5.31M/s 16KiB 5M/s tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=2 --erasesize=$[8 * 1024 * 1024] /dev/sdb sched_setscheduler: Operation not permitted 8MiB 5.55M/s 4MiB 5.52M/s 2MiB 5.56M/s 1MiB 5.57M/s 512KiB 5.56M/s 256KiB 5.56M/s 128KiB 5.56M/s 64KiB 5.45M/s 32KiB 5.31M/s 16KiB 5M/s tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=3 --erasesize=$[8 * 1024 * 1024] /dev/sdb sched_setscheduler: Operation not permitted 8MiB 2.7M/s 4MiB 4.44M/s 2MiB 5.06M/s 1MiB 5.32M/s 512KiB 5.48M/s 256KiB 5.51M/s 128KiB 5.53M/s 64KiB 5.46M/s 32KiB 5.3M/s 16KiB 4.99M/s tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=4 --erasesize=$[8 * 1024 * 1024] /dev/sdb sched_setscheduler: Operation not permitted 8MiB 3.42M/s 4MiB 4.72M/s 2MiB 5.18M/s 1MiB 5.38M/s 512KiB 5.12M/s 256KiB 4.06M/s 128KiB 2.89M/s 64KiB 1.8M/s 32KiB 1.02M/s 16KiB 546K/s tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=1 --erasesize=$[8 * 1024 * 1024] /dev/sdb --random sched_setscheduler: Operation not permitted 8MiB 5.57M/s 4MiB 5.57M/s 2MiB 5.57M/s 1MiB 5.57M/s 512KiB 5.09M/s 256KiB 4.39M/s 128KiB 4.31M/s 64KiB 3.57M/s 32KiB 3.18M/s 16KiB 2.66M/s tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=2 --erasesize=$[8 * 1024 * 1024] /dev/sdb --random sched_setscheduler: Operation not permitted 8MiB 5.2M/s 4MiB 5.39M/s 2MiB 5.53M/s 1MiB 5.53M/s 512KiB 4.79M/s 256KiB 3.95M/s 128KiB 3.37M/s 64KiB 2.49M/s 32KiB 1.95M/s 16KiB 1.48M/s tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=3 --erasesize=$[8 * 1024 * 1024] /dev/sdb --random sched_setscheduler: Operation not permitted 8MiB 2.56M/s 4MiB 4.33M/s 2MiB 5.07M/s 1MiB 5.33M/s 512KiB 4.81M/s 256KiB 3.93M/s 128KiB 3.17M/s 64KiB 2.32M/s 32KiB 1.51M/s 16KiB 1.22M/s tmp179:/home/lcr/flashbench # ./flashbench --open-au --open-au-nr=4 --erasesize=$[8 * 1024 * 1024] /dev/sdb --random sched_setscheduler: Operation not permitted 8MiB 3.32M/s 4MiB 4.64M/s 2MiB 5.17M/s 1MiB 5.39M/s 512KiB 4.73M/s 256KiB 3.68M/s 128KiB 2.84M/s 64KiB 2.05M/s 32KiB 1.36M/s 16KiB 972K/s tmp179:/home/lcr/flashbench #
Philippe