Re: MMC quirks relating to performance/lifetime.

Andrei Warkentin
2011-02-18T22:40:19Z

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

On Fri, Feb 18, 2011 at 1:47 PM, Andrei Warkentin <andreiw@motorola.com> wrote:
> On Fri, Feb 18, 2011 at 7:44 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> I'm curious. Neither the manfid nor the oemid fields of either card
>> match what I have seen on SD cards, I would expect them to be
>>
>> Sandisk: manfid 0x000003, oemid 0x5344
>> Toshiba: manfid 0x000002, oemid 0x544d
>>
>> I have not actually seen any Toshiba SD cards, but I assume that they
>> use the same controllers as Kingston.
>>
>> Does anyone know if the IDs have any correlation between MMC and SD
>> controllers?
>>
>>        Arnd
>>
>
> I'm unsure about the older scheme (assigned by MMCA), but ever since
> MMC is now JEDEC-controlled, the IDs have changed. Sandisk's new id
> will be 0x45, and Toshiba I guess will be 0x11.
>

Flashbench timings for both Sandisk and Toshiba cards. Attaching due to size.

Some interesting things that I don't understand. For the align test, I
extended it to do a write align test (-A). I tried two partitions that
I could write over, and both read and writes behaved differently for
the two partitions on same device. Odd. They are both 4MB aligned.

On the sandisk it was the write align that made the page size stand
out. The read align had pretty constant results.

On the toshiba the results varied wildly for the two partitions. For
partition 6, there was a clear pattern in the diff values for read
align. For 9, it was all over the place. For 9 with the write align,
8K and 16K the crossing writes took ~115ms!! Look in attached files
for all the data.

The AU tests were interesting too, especially how with several open
AUs the throughput is higher for certain smaller sizes on sandisk, but
if I interpret it correctly both cards have at least 4 AUs, as I
didn't see yet a significant drop for small sizes. The larger ones I
am running now on mmcblk0p9 which is sufficiently larger for these
tests... (mmcblk0p6 is only 40mb, p9 is 314 mb)

Thanks,
A

[-- Attachment #2: toshiba.txt --]
[-- Type: text/plain, Size: 5447 bytes --]

/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p9/start
643072
/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p9/size
346112
/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p6/start
77824
/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p6/size
24576
# ./flashbench -a -b 1024 /dev/block/mmcblk0p6
align 524288 pre 613Âµs on 801Âµs post 570Âµs diff 210Âµs
align 262144 pre 739Âµs on 988Âµs post 767Âµs diff 235Âµs
align 131072 pre 740Âµs on 990Âµs post 767Âµs diff 236Âµs
align 65536 pre 749Âµs on 998Âµs post 767Âµs diff 240Âµs
align 32768 pre 761Âµs on 992Âµs post 746Âµs diff 238Âµs
align 16384 pre 755Âµs on 982Âµs post 755Âµs diff 227Âµs
align 8192 pre 748Âµs on 750Âµs post 748Âµs diff 1.94Âµs
align 4096 pre 747Âµs on 749Âµs post 747Âµs diff 1.41Âµs
align 2048 pre 747Âµs on 747Âµs post 748Âµs diff -93ns
# ./flashbench -a -b 1024 /dev/block/mmcblk0p9
align 8388608 pre 527Âµs on 743Âµs post 476Âµs diff 242Âµs
align 4194304 pre 544Âµs on 730Âµs post 543Âµs diff 187Âµs
align 2097152 pre 551Âµs on 714Âµs post 485Âµs diff 196Âµs
align 1048576 pre 742Âµs on 864Âµs post 745Âµs diff 120Âµs
align 524288 pre 760Âµs on 822Âµs post 789Âµs diff 47.9Âµs
align 262144 pre 760Âµs on 816Âµs post 789Âµs diff 42Âµs
align 131072 pre 760Âµs on 822Âµs post 789Âµs diff 47.8Âµs
align 65536 pre 758Âµs on 821Âµs post 789Âµs diff 48Âµs
align 32768 pre 771Âµs on 828Âµs post 760Âµs diff 62.7Âµs
align 16384 pre 672Âµs on 939Âµs post 771Âµs diff 217Âµs
align 8192 pre 668Âµs on 806Âµs post 671Âµs diff 136Âµs
align 4096 pre 671Âµs on 672Âµs post 670Âµs diff 1.5Âµs
align 2048 pre 671Âµs on 670Âµs post 671Âµs diff -859ns
# ./flashbench -A -b 1024 /dev/block/mmcblk0p6
write align 524288 pre 3.59ms on 6.74ms post 3.73ms diff 3.08ms
write align 262144 pre 3.69ms on 7.11ms post 3.69ms diff 3.42ms
write align 131072 pre 3.71ms on 17.4ms post 3.72ms diff 13.7ms
write align 65536 pre 3.72ms on 7.18ms post 3.52ms diff 3.56ms
write align 32768 pre 3.73ms on 11.9ms post 3.7ms diff 8.24ms
write align 16384 pre 3.93ms on 5.01ms post 4.6ms diff 745Âµs
write align 8192 pre 4.9ms on 4.89ms post 4.87ms diff 4.77Âµs
write align 4096 pre 5.03ms on 5.02ms post 5.01ms diff -437ns
write align 2048 pre 5.08ms on 5.08ms post 5.06ms diff 12.3Âµs
# ./flashbench -A -b 1024 /dev/block/mmcblk0p9
write align 8388608 pre 3.76ms on 7.07ms post 4.05ms diff 3.16ms
write align 4194304 pre 3.62ms on 6.5ms post 3.63ms diff 2.88ms
write align 2097152 pre 3.91ms on 6.84ms post 3.7ms diff 3.04ms
write align 1048576 pre 3.88ms on 6.96ms post 3.96ms diff 3.04ms
write align 524288 pre 3.93ms on 7.07ms post 4.05ms diff 3.08ms
write align 262144 pre 3.94ms on 7.07ms post 4.05ms diff 3.07ms
write align 131072 pre 3.95ms on 7.05ms post 4.05ms diff 3.05ms
write align 65536 pre 3.94ms on 7.07ms post 4.05ms diff 3.07ms
write align 32768 pre 3.95ms on 7.07ms post 4.04ms diff 3.07ms
write align 16384 pre 4.48ms on 117ms post 3.81ms diff 113ms
write align 8192 pre 3.61ms on 114ms post 3.58ms diff 110ms
write align 4096 pre 3.88ms on 3.87ms post 3.86ms diff 1.87Âµs
write align 2048 pre 3.88ms on 3.89ms post 3.89ms diff 3.11Âµs

./flashbench -O -0 1 -b 512 /dev/block/mmcblk0p6
4MiB 7.17M/s
2MiB 7.91M/s
1MiB 9.23M/s
512KiB 10.3M/s
256KiB 10.5M/s
128KiB 10.4M/s
64KiB 9.81M/s
32KiB 9.09M/s
16KiB 3.71M/s
8KiB 1.73M/s
4KiB 845K/s
2KiB 418K/s
1KiB 208K/s
512B 103K/s
./flashbench -O -0 1 -r -b 512 /dev/block/mmcblk0p6
4MiB 6.58M/s
2MiB 7.98M/s
1MiB 9.33M/s
512KiB 10.4M/s
256KiB 10.9M/s
128KiB 10.5M/s
64KiB 9.94M/s
32KiB 9.11M/s
16KiB 3.72M/s
8KiB 1.75M/s
4KiB 853K/s
2KiB 419K/s
1KiB 207K/s
512B 102K/s
./flashbench -O -0 2 -b 512 /dev/block/mmcblk0p6
4MiB 8.95M/s
2MiB 9.44M/s
1MiB 10.3M/s
512KiB 10.9M/s
256KiB 10.8M/s
128KiB 10.5M/s
64KiB 9.91M/s
32KiB 8.79M/s
16KiB 3.65M/s
8KiB 1.75M/s
4KiB 851K/s
2KiB 419K/s
1KiB 208K/s
512B 103K/s
./flashbench -O -0 2 -r -b 512 /dev/block/mmcblk0p6
4MiB 9.06M/s
2MiB 9.68M/s
1MiB 10.3M/s
512KiB 10.5M/s
256KiB 9.94M/s
128KiB 10.1M/s
64KiB 9.41M/s
32KiB 7.99M/s
16KiB 3.5M/s
8KiB 1.64M/s
4KiB 798K/s
2KiB 393K/s
1KiB 196K/s
512B 96.5K/s
./flashbench -O -0 3 -b 512 /dev/block/mmcblk0p6
4MiB 8.07M/s
2MiB 9.07M/s
1MiB 9.88M/s
512KiB 10.1M/s
256KiB 10M/s
128KiB 9.83M/s
64KiB 8.68M/s
32KiB 7.1M/s
16KiB 3.09M/s
8KiB 1.49M/s
4KiB 726K/s
2KiB 357K/s
1KiB 178K/s
512B 88.5K/s
./flashbench -O -0 3 -r -b 512 /dev/block/mmcblk0p6
4MiB 8.12M/s
2MiB 9.28M/s
1MiB 9.83M/s
512KiB 10M/s
256KiB 9.97M/s
128KiB 9.91M/s
64KiB 8.9M/s
32KiB 7.3M/s
16KiB 3.2M/s
8KiB 1.54M/s
4KiB 751K/s
2KiB 367K/s
1KiB 183K/s
512B 90.3K/s
./flashbench -O -0 4 -b 512 /dev/block/mmcblk0p6
4MiB 5.87M/s
2MiB 8.71M/s
1MiB 9.11M/s
512KiB 10.3M/s
256KiB 10.5M/s
128KiB 10M/s
64KiB 9.09M/s
32KiB 7.5M/s
16KiB 3.28M/s
8KiB 1.56M/s
4KiB 758K/s
2KiB 372K/s
1KiB 185K/s
512B 92.3K/s
./flashbench -O -0 4 -r -b 512 /dev/block/mmcblk0p6
4MiB 7.57M/s
2MiB 7.23M/s
1MiB 9.71M/s
512KiB 10M/s
256KiB 9.98M/s
128KiB 9.82M/s
64KiB 9.07M/s
32KiB 7.62M/s
16KiB 3.34M/s
8KiB 1.58M/s
4KiB 776K/s
2KiB 379K/s
1KiB 188K/s
512B 92.7K/s

[-- Attachment #3: sandisk.txt --]
[-- Type: text/plain, Size: 5529 bytes --]

/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p9/start
647168
/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p9/size
346112
/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p6/start
81920
/data # cat /sys/block/mmcblk0/device/block/mmcblk0/mmcblk0p6/size
24576
/data # ./flashbench -a -b 1024 /dev/block/mmcblk0p6
align 524288 pre 1.01ms on 1.03ms post 858Âµs diff 93.5Âµs
align 262144 pre 1.16ms on 1.2ms post 926Âµs diff 153Âµs
align 131072 pre 1.16ms on 1.2ms post 924Âµs diff 151Âµs
align 65536 pre 1.15ms on 1.12ms post 919Âµs diff 84.9Âµs
align 32768 pre 1.16ms on 1.2ms post 923Âµs diff 154Âµs
align 16384 pre 1.16ms on 1.21ms post 941Âµs diff 162Âµs
align 8192 pre 1.15ms on 1.09ms post 874Âµs diff 80.2Âµs
align 4096 pre 1.16ms on 1.17ms post 902Âµs diff 138Âµs
align 2048 pre 1.16ms on 1.17ms post 903Âµs diff 135Âµs
/data # ./flashbench -a -b 1024 /dev/block/mmcblk0p9
align 8388608 pre 1.07ms on 1.1ms post 933Âµs diff 92.9Âµs
align 4194304 pre 1.28ms on 1.29ms post 1.05ms diff 129Âµs
align 2097152 pre 1.28ms on 1.31ms post 1.07ms diff 132Âµs
align 1048576 pre 1.27ms on 1.32ms post 1.07ms diff 147Âµs
align 524288 pre 1.38ms on 1.38ms post 1.12ms diff 135Âµs
align 262144 pre 1.27ms on 1.3ms post 1.04ms diff 140Âµs
align 131072 pre 1.28ms on 1.31ms post 1.02ms diff 164Âµs
align 65536 pre 1.38ms on 1.38ms post 1.12ms diff 135Âµs
align 32768 pre 1.38ms on 1.38ms post 1.12ms diff 134Âµs
align 16384 pre 1.38ms on 1.38ms post 1.11ms diff 135Âµs
align 8192 pre 1.38ms on 1.38ms post 1.11ms diff 134Âµs
align 4096 pre 1.38ms on 1.38ms post 1.11ms diff 136Âµs
align 2048 pre 1.38ms on 1.38ms post 1.11ms diff 134Âµs
/data # ./flashbench -A -b 1024 /dev/block/mmcblk0p6
write align 524288 pre 1.69ms on 2.38ms post 1.78ms diff 653Âµs
write align 262144 pre 1.87ms on 2.59ms post 1.86ms diff 723Âµs
write align 131072 pre 1.88ms on 2.61ms post 1.89ms diff 729Âµs
write align 65536 pre 1.86ms on 2.65ms post 1.83ms diff 805Âµs
write align 32768 pre 1.88ms on 2.61ms post 1.92ms diff 710Âµs
write align 16384 pre 1.8ms on 2.57ms post 1.95ms diff 701Âµs
write align 8192 pre 1.66ms on 1.71ms post 1.64ms diff 55Âµs
write align 4096 pre 1.67ms on 1.71ms post 1.64ms diff 51.9Âµs
write align 2048 pre 1.67ms on 1.71ms post 1.61ms diff 68.7Âµs
/data # ./flashbench -A -b 1024 /dev/block/mmcblk0p9
write align 8388608 pre 1.83ms on 2.62ms post 1.91ms diff 750Âµs
write align 4194304 pre 1.89ms on 2.87ms post 2.06ms diff 892Âµs
write align 2097152 pre 2.08ms on 2.86ms post 2.13ms diff 751Âµs
write align 1048576 pre 2.06ms on 2.93ms post 2.17ms diff 818Âµs
write align 524288 pre 2.07ms on 2.85ms post 2.18ms diff 724Âµs
write align 262144 pre 2.07ms on 2.85ms post 2.15ms diff 741Âµs
write align 131072 pre 2.05ms on 2.93ms post 2.19ms diff 809Âµs
write align 65536 pre 1.86ms on 2.77ms post 1.9ms diff 888Âµs
write align 32768 pre 2.06ms on 2.91ms post 2.19ms diff 783Âµs
write align 16384 pre 2.05ms on 2.76ms post 1.8ms diff 835Âµs
write align 8192 pre 1.83ms on 1.89ms post 1.8ms diff 72.9Âµs
write align 4096 pre 1.84ms on 1.9ms post 1.8ms diff 75Âµs
write align 2048 pre 1.84ms on 1.89ms post 1.8ms diff 70.8Âµs
/data # ./flashbench -O -0 1 -b 512 /dev/block/mmcblk0p6
4MiB 10.5M/s
2MiB 10.1M/s
1MiB 10.6M/s
512KiB 10.5M/s
256KiB 8.94M/s
128KiB 7.74M/s
64KiB 6.04M/s
32KiB 4.13M/s
16KiB 3.2M/s
8KiB 3.87M/s
4KiB 1.86M/s
2KiB 1.16M/s
1KiB 667K/s
512B 396K/s
/data # ./flashbench -O -0 1 -r -b 512 /dev/block/mmcblk0p6
4MiB 10.7M/s
2MiB 10.3M/s
1MiB 10.4M/s
512KiB 16.3M/s
256KiB 16.6M/s
128KiB 16.1M/s
64KiB 14M/s
32KiB 11.1M/s
16KiB 6.77M/s
8KiB 3.15M/s
4KiB 1.77M/s
2KiB 1.01M/s
1KiB 523K/s
512B 296K/s
/data # ./flashbench -O -0 2 -b 512 /dev/block/mmcblk0p6
4MiB 11.5M/s
2MiB 11.3M/s
1MiB 11.5M/s
512KiB 11.6M/s
256KiB 10.8M/s
128KiB 9.84M/s
64KiB 7.88M/s
32KiB 5.65M/s
16KiB 4.14M/s
8KiB 1.99M/s
4KiB 1.42M/s
2KiB 760K/s
1KiB 392K/s
512B 213K/s
/data # ./flashbench -O -0 2 -r -b 512 /dev/block/mmcblk0p6
4MiB 10.3M/s
2MiB 10.2M/s
1MiB 10.1M/s
512KiB 16M/s
256KiB 15.8M/s
128KiB 14.6M/s
64KiB 11.4M/s
32KiB 8.07M/s
16KiB 5.12M/s
8KiB 2.65M/s
4KiB 1.43M/s
2KiB 768K/s
1KiB 395K/s
512B 212K/s
/data # ./flashbench -O -0 3 -b 512 /dev/block/mmcblk0p6
4MiB 11.3M/s
2MiB 11.5M/s
1MiB 11.5M/s
512KiB 11.5M/s
256KiB 10.4M/s
128KiB 9.1M/s
64KiB 7.3M/s
32KiB 5.21M/s
16KiB 3.78M/s
8KiB 2.08M/s
4KiB 1.42M/s
2KiB 792K/s
1KiB 418K/s
512B 217K/s
/data/flashbench -O -0 3 -r -b 512 /dev/block/mmcblk0p6
4MiB 10.7M/s
2MiB 10.5M/s
1MiB 10.2M/s
512KiB 17.3M/s
256KiB 16.3M/s
128KiB 14.5M/s
64KiB 11.4M/s
32KiB 8.12M/s
16KiB 4.98M/s
8KiB 2.62M/s
4KiB 1.4M/s
2KiB 768K/s
1KiB 390K/s
512B 212K/s
./flashbench -O -0 4 -b 512 /dev/block/mmcblk0p6
4MiB 14.4M/s
2MiB 14M/s
1MiB 13.9M/s
512KiB 14.2M/s
256KiB 13.5M/s
128KiB 11.9M/s
64KiB 9.8M/s
32KiB 7.35M/s
16KiB 5.1M/s
8KiB 2.69M/s
4KiB 1.58M/s
2KiB 877K/s
1KiB 476K/s
512B 268K/s
./flashbench -O -0 4 -r -b 512 /dev/block/mmcblk0p6
4MiB 10.4M/s
2MiB 10.5M/s
1MiB 14.3M/s
512KiB 17.7M/s
256KiB 16.9M/s
128KiB 15.5M/s
64KiB 12.4M/s
32KiB 9.36M/s
16KiB 5.62M/s
8KiB 3M/s
4KiB 1.62M/s
2KiB 880K/s
1KiB 462K/s
512B 261K/s