My XU4 has a Samsung Pro 16GB Class 10 UHS-3 Micro SDHC Card https://www.amazon.com/gp/product/B014W1ZL3S which cost me $14. It's one of the fastest sdcards I could find, looking mostly at random write speeds.
My friend has a 64GB eMMC sold by hardkernel. If I had bought a 16GB eMMC it would have cost me $34.
First I tried to compare with the `dd` performance listed on hardkernel's page http://www.hardkernel.com/main/products ... 5628174287
sdcard:
Code: Select all
> sudo dd if=/dev/zero of=/tmp/test oflag=direct bs=8M count=64
64+0 records in
64+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 13.8632 s, 38.7 MB/s
Here's the read test:
> sudo dd if=/tmp/test of=/dev/null iflag=direct bs=8M
64+0 records in
64+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 9.42691 s, 57.0 MB/s
eMMC:
Code: Select all
$ sudo dd if=/dev/zero of=/tmp/test oflag=direct bs=8M count=64
64+0 records in
64+0 records out
536870912 bytes (537 MB) copied, 13.9753 s, 38.4 MB/s
$ sudo dd if=/tmp/test of=/dev/null iflag=direct bs=8M
64+0 records in
64+0 records out
536870912 bytes (537 MB) copied, 4.45892 s, 120 MB/s
sdcard:
Code: Select all
> fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=1G --readwrite=randrw --rwmixread=75
test: (g=0): rw=randrw, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=64
fio-2.2.10
Starting 1 process
test: Laying out IO file(s) (1 file(s) / 1024MB)
Jobs: 1 (f=1): [m(1)] [100.0% done] [263KB/95KB/0KB /s] [65/23/0 iops] [eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=7102: Fri Sep 2 22:22:36 2016
read : io=784996KB, bw=1399.9KB/s, iops=349, runt=560775msec
write: io=263580KB, bw=481308B/s, iops=117, runt=560775msec
cpu : usr=1.27%, sys=8.25%, ctx=247792, majf=0, minf=29
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
issued : total=r=196249/w=65895/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
latency : target=0, window=0, percentile=100.00%, depth=64
Disk stats (read/write):
mmcblk0: ios=194508/66175, merge=1797/254, ticks=26266510/9470115, in_queue=35735885, util=100.00%
Code: Select all
Jobs: 1 (f=1): [m(1)] [100.0% done] [7561KB/2495KB/0KB /s] [1890/623/0 iops] [eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=22137: Sat Sep 3 00:16:51 2016
read : io=784996KB, bw=8311.6KB/s, iops=2077, runt= 94447msec
write: io=263580KB, bw=2790.8KB/s, iops=697, runt= 94447msec
cpu : usr=5.02%, sys=46.55%, ctx=225997, majf=0, minf=21
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
issued : total=r=196249/w=65895/d=0, short=r=0/w=0/d=0
latency : target=0, window=0, percentile=100.00%, depth=64
Disk stats (read/write):
mmcblk0: ios=194962/65703, merge=2272/192, ticks=4469440/1564275, in_queue=6040960, util=100.00%
read bw=1399.9KB/s and write bw=481308B/s
vs.
read bw=8311.6KB/s and write bw=2790.8KB/s
We then tried sequential read/write bandwidth using fio to see how that compares with the dd test:
sdcard:
Code: Select all
> fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=1G --readwrite=rw --rwmixread=75
read : io=784996KB, bw=16697KB/s, iops=4174, runt= 47013msec
write: io=263580KB, bw=5606.6KB/s, iops=1401, runt= 47013msec
Code: Select all
read : io=784996KB, bw=14497KB/s, iops=3624, runt= 54149msec
write: io=263580KB, bw=4867.7KB/s, iops=1216, runt= 54149msec
sdcard:
Code: Select all
read : io=785776KB, bw=32415KB/s, iops=2025, runt= 24241msec
write: io=262800KB, bw=10841KB/s, iops=677, runt= 24241msec
Code: Select all
read : io=785776KB, bw=33857KB/s, iops=2116, runt= 23209msec
write: io=262800KB, bw=11323KB/s, iops=707, runt= 23209msec
Sooooo. I'm not what all to make out of this, but so far I observe:
- harkernel uses a poor sdcard for the comparison
- sequential performance is not that far off between the two, dd shows 2x read performance but fio doesn't, I suspect the 2x isn't there in real life, but it's hard to tell
- the eMMC has a clear performance advantage when it comes to random small I/O, I wonder how much of that has to do with flash&controller vs. bus overhead.
