Added you to CC, Arnd, in case you missed it on the list.
Am Samstag, 1. Dezember 2012 schrieb Martin Steigerwald:
Hi!
My first results:
martin@merkaba:~/Artikel/LinuxNewMedia/Flash/Recherche/flashbench> ./flashreport /dev/mmcblk0
===> MMC card detected with erase block size of 524288 bytes <=== ==> find /sys/block/mmcblk0/device/ -maxdepth 1 -type f | xargs head <==
==> /sys/block/mmcblk0/device/cid <== 1b534d30303030301014a60ddf00b600
==> /sys/block/mmcblk0/device/csd <== 400e00325b590000787d7f800a400000
==> /sys/block/mmcblk0/device/scr <== 0235800000000000
==> /sys/block/mmcblk0/device/date <== 06/2011
==> /sys/block/mmcblk0/device/name <== 00000
==> /sys/block/mmcblk0/device/type <== SD
==> /sys/block/mmcblk0/device/preferred_erase_size <== 4194304
==> /sys/block/mmcblk0/device/fwrev <== 0x0
==> /sys/block/mmcblk0/device/hwrev <== 0x1
==> /sys/block/mmcblk0/device/oemid <== 0x534d
==> /sys/block/mmcblk0/device/manfid <== 0x00001b
==> /sys/block/mmcblk0/device/serial <== 0x14a60ddf
==> /sys/block/mmcblk0/device/uevent <== DRIVER=mmcblk MMC_TYPE=SD MMC_NAME=00000 MODALIAS=mmc:block
==> /sys/block/mmcblk0/device/erase_size <== 512
==> fdisk -lu <==
Disk /dev/mmcblk0: 16.2 GB, 16172187648 bytes 40 heads, 57 sectors/track, 13853 cylinders, total 31586304 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 31586303 15789056 c W95 FAT32 (LBA)
==> sfdisk -d <== # partition table of /dev/mmcblk0 unit: sectors
/dev/mmcblk0p1 : start= 8192, size= 31578112, Id= c /dev/mmcblk0p2 : start= 0, size= 0, Id= 0 /dev/mmcblk0p3 : start= 0, size= 0, Id= 0 /dev/mmcblk0p4 : start= 0, size= 0, Id= 0
===> Partition details <===
==> file -sk /dev/mmcblk0 <== /dev/mmcblk0: sticky x86 boot sector; partition 1: ID=0xc, starthead 130, startsector 8192, 31578112 sectors, extended partition table (last)\011, code offset 0x0
==> file -sk /dev/mmcblk0p1 <== /dev/mmcblk0p1: sticky x86 boot sector, code offset 0x0, OEM-ID " ", sectors/cluster 64, reserved sectors 484, Media descriptor 0xf8, heads 255, hidden sectors 8192, sectors 31578112 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 3854, reserved3 0x800000, serial number 0xfc303da9, unlabeled
==> head -c20M | hexdump -C<== 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 |................| 000001c0 03 00 0c 27 f9 ae 00 20 00 00 00 d8 e1 01 00 00 |...'... ........| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00400000 eb 00 90 20 20 20 20 20 20 20 20 00 02 40 e4 01 |... ..@..| 00400010 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 20 00 00 |........?.... ..| 00400020 00 d8 e1 01 0e 0f 00 00 00 00 00 00 02 00 00 00 |................| 00400030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00400040 80 00 29 a9 3d 30 fc 4e 4f 20 4e 41 4d 45 20 20 |..).=0.NO NAME | 00400050 20 20 46 41 54 33 32 20 20 20 00 00 00 00 00 00 | FAT32 ......| 00400060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00400200 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 |RRaA............| 00400210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
004003e0 00 00 00 00 72 72 41 61 ff ff ff ff 02 00 00 00 |....rrAa........| 004003f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00400400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
004005f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00400600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00400c00 eb 00 90 20 20 20 20 20 20 20 20 00 02 40 e4 01 |... ..@..| 00400c10 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 20 00 00 |........?.... ..| 00400c20 00 d8 e1 01 0e 0f 00 00 00 00 00 00 02 00 00 00 |................| 00400c30 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00400c40 80 00 29 a9 3d 30 fc 4e 4f 20 4e 41 4d 45 20 20 |..).=0.NO NAME | 00400c50 20 20 46 41 54 33 32 20 20 20 00 00 00 00 00 00 | FAT32 ......| 00400c60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00400df0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00400e00 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 |RRaA............| 00400e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00400fe0 00 00 00 00 72 72 41 61 ff ff ff ff 02 00 00 00 |....rrAa........| 00400ff0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00401000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
004011f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00401200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0043c800 f8 ff ff 0f ff ff ff 0f ff ff ff 0f 00 00 00 00 |................| 0043c810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0061e400 f8 ff ff 0f ff ff ff 0f ff ff ff 0f 00 00 00 00 |................| 0061e410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
01400000
===> Trying to find erase block size by read tests <===
==> sudo flashbench -a --count=100 --blocksize=1024 /dev/mmcblk0 <== align 4294967296 pre 959µs on 1.24ms post 1.11ms diff 204µs align 2147483648 pre 936µs on 1.29ms post 1.08ms diff 280µs align 1073741824 pre 975µs on 1.3ms post 1.1ms diff 261µs align 536870912 pre 847µs on 1.16ms post 1.11ms diff 187µs align 268435456 pre 853µs on 1.16ms post 1.11ms diff 179µs align 134217728 pre 851µs on 1.15ms post 1.11ms diff 169µs align 67108864 pre 854µs on 1.16ms post 1.1ms diff 182µs align 33554432 pre 863µs on 1.15ms post 1.1ms diff 174µs align 16777216 pre 848µs on 1.15ms post 1.11ms diff 173µs align 8388608 pre 854µs on 1.15ms post 1.11ms diff 168µs align 4194304 pre 826µs on 1.14ms post 1.1ms diff 181µs align 2097152 pre 821µs on 1.07ms post 1.08ms diff 114µs align 1048576 pre 823µs on 1.07ms post 1.08ms diff 119µs align 524288 pre 832µs on 1.08ms post 1.08ms diff 126µs align 262144 pre 829µs on 1.08ms post 1.09ms diff 118µs align 131072 pre 815µs on 1.08ms post 1.09ms diff 127µs align 65536 pre 817µs on 1.07ms post 1.07ms diff 129µs align 32768 pre 823µs on 1.08ms post 1.07ms diff 135µs align 16384 pre 841µs on 1.09ms post 1.09ms diff 123µs align 8192 pre 827µs on 1.1ms post 1.1ms diff 133µs align 4096 pre 980µs on 987µs post 945µs diff 24.6µs align 2048 pre 1.05ms on 1.05ms post 1.02ms diff 16µs
(See README for an explaination on how to interpret the values.) \nMedium is a memory card which reports 524288 bytes as erase block size and 4194304 bytes as preferred erase size.
===> Suggestions for further benchmarking <===
Further tests can show the number of open erase blocks the medium can support.
BEWARE: These tests write onto the device! Make a backup first!
Further tests could look as follows: flashbench --open-au --open-au-nr=3 --erasesize=524288 --blocksize=1024 /dev/mmcblk0 --offset=$[24*1024*1024] flashbench --open-au --open-au-nr=5 --erasesize=524288 --blocksize=1024 /dev/mmcblk0 --offset=$[24*1024*1024] flashbench --open-au --open-au-nr=7 --erasesize=524288 --blocksize=1024 /dev/mmcblk0 --offset=$[24*1024*1024] flashbench --open-au --open-au-nr=13 --erasesize=524288 --blocksize=1024 /dev/mmcblk0 --offset=$[24*1024*1024]
(Consult the README for further suggestions.)
Arnd, would above suggestions by my script make some sense? I have seen you testing a 32 GB Samsung Micro SDHC with 30 and 31 erase blocks on this list.
Please advice as to meaning ful tests for this device.
What is the best for offset? I understand it makes sense for it to be dividable by erase block size.
And what is about preferred erase size? What is the difference to erase block size?
(Will post git repo for flashreport script in next post. Script is not yet tested for USB sticks :)
Thanks,
Ping?