My sd card is Transcend SD MICRO 32GB HC Class10 TS32GUSDHC10
Read/write shows the following speeds:
osmc@osmc:~$ dd if=/dev/zero of=obrisi.tmp bs=500K count=1024;dd if=obrisi.tmp of=/dev/null bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 162,611 s, 3,2 MB/s
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 12,0072 s, 43,7 MB/s
As you can see, writting is to slow and reading is to fast for class 10 sd card on raspberry pi 2?
According to the:
cd /sys/class/mmc_host/mmc?/mmc?:*
echo "man:$(cat manfid) oem:$(cat oemid) name:$(cat name) hwrev:$(cat hwrev) fwrev:$(cat fwrev)"
my card is reported as:
man:0x000074 oem:0x4a45 name:USD hwrev:0x1 fwrev:0x0
Am I measuring read/write wrongly?
Yep - you are trying to measure read performance by reading back in the file you just wrote, and without using O_DIRECT to bypass the page cache, so you will get a bogus read speed as you are just reading back from cache. There is no way that your card can read at 43.7MB/sec - it will be more like 20MB/sec at the most.
If you want to get useful benchmarks, install iozone3 and run the following:
iozone -e -I -a -s 50M -r 4k -r 512k -i 0 -i 1 -i 2 | tail -4 | head -2 | awk '{print "Block Size " $2"k", "Write " $3/1024, "Rewrite " $4/1024, "Read " $5/1024, "Reread " $6/1024, "Random Read " $7/1024, "Random Write "$8/1024}'
For good usability in Kodi random 4K/512K read/write performance is more important than large contiguous writes.
Nice you saved me time finding that command, I wrote that command a long time ago then lost it and was going to have to look for it again.
Here is what I got:
Block Size 4k Write 0.679688 Rewrite 1.14258 Read 6.13867 Reread 6.21289 Random Read 5.30957 Random Write 0.00683594
Block Size 512k Write 2.30664 Rewrite 2.61035 Read 19.1865 Reread 11.7012 Random Read 19.6748 Random Write 0.608398
That is very poor random write performance. I would not expect Kodi (or OSMC in general) to perform well on your card.
Here is the result I get on a Samsung Evo 64GB card:
Block Size 4k Write 1.08301 Rewrite 1.82031 Read 8.18848 Reread 8.14941 Random Read 8.23535 Random Write 2.0166
Block Size 512k Write 15.5469 Rewrite 15.7383 Read 20.8535 Reread 20.8389 Random Read 20.8506 Random Write 11.9893