SD Card vs. eMMC Benchmarks

I ran benchmarks on SD card and eMMC using Flexible I/O tester. The following results show that eMMC is an order of magnitude better than SD card for some use cases like application performance (involving random write).

SD Card - Random Write: 1690KiB/s

root@freedombox:/mnt# fio --name=randwrite --ioengine=libaio --iodepth=1 --rw=randwrite --bs=4k --direct=0 --size=512M --runtime=240
randwrite: (g=0): rw=randwrite, bs=® 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [w(1)][100.0%][w=56KiB/s][w=14 IOPS][eta 00m:00s]
randwrite: (groupid=0, jobs=1): err= 0: pid=1226: Tue Jul 23 02:41:46 2019
write: IOPS=422, BW=1690KiB/s (1731kB/s)(396MiB/240039msec); 0 zone resets
slat (usec): min=33, max=17945k, avg=2352.64, stdev=104531.54
clat (nsec): min=0, max=2334.5k, avg=5240.29, stdev=9819.29
lat (usec): min=38, max=17945k, avg=2359.23, stdev=104531.94
clat percentiles (usec):
| 1.00th=[ 4], 5.00th=[ 4], 10.00th=[ 4], 20.00th=[ 5],
| 30.00th=[ 5], 40.00th=[ 5], 50.00th=[ 5], 60.00th=[ 5],
| 70.00th=[ 5], 80.00th=[ 5], 90.00th=[ 6], 95.00th=[ 13],
| 99.00th=[ 22], 99.50th=[ 28], 99.90th=[ 55], 99.95th=[ 80],
| 99.99th=[ 330]
bw ( KiB/s): min= 16, max=56008, per=100.00%, avg=3205.98, stdev=8813.08, samples=253
iops : min= 4, max=14002, avg=801.46, stdev=2203.28, samples=253
lat (nsec) : 2=0.01%
lat (usec) : 4=18.41%, 10=74.11%, 20=6.41%, 50=0.93%, 100=0.10%
lat (usec) : 250=0.03%, 500=0.01%, 750=0.01%
lat (msec) : 4=0.01%
cpu : usr=0.55%, sys=2.90%, ctx=42248, majf=0, minf=43
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwts: total=0,101421,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
WRITE: bw=1690KiB/s (1731kB/s), 1690KiB/s-1690KiB/s (1731kB/s-1731kB/s), io=396MiB (415MB), run=240039-240039msec

SD Card - Sequential Write: 11.0MiB/s
root@freedombox:/mnt# fio --name=write --ioengine=libaio --iodepth=1 --rw=write --bs=4k --direct=0 --size=512M --runtime=240 
write: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [W(1)][97.7%][w=19.9MiB/s][w=5093 IOPS][eta 00m:01s]
write: (groupid=0, jobs=1): err= 0: pid=1301: Tue Jul 23 02:45:15 2019
  write: IOPS=3064, BW=11.0MiB/s (12.6MB/s)(512MiB/42771msec); 0 zone resets
    slat (usec): min=29, max=430596, avg=315.49, stdev=2342.69
    clat (usec): min=3, max=315, avg= 3.65, stdev= 1.17
     lat (usec): min=33, max=430617, avg=320.10, stdev=2343.06
    clat percentiles (nsec):
     |  1.00th=[ 3376],  5.00th=[ 3408], 10.00th=[ 3472], 20.00th=[ 3504],
     | 30.00th=[ 3536], 40.00th=[ 3536], 50.00th=[ 3568], 60.00th=[ 3600],
     | 70.00th=[ 3632], 80.00th=[ 3664], 90.00th=[ 3760], 95.00th=[ 3888],
     | 99.00th=[ 4832], 99.50th=[ 5792], 99.90th=[13504], 99.95th=[19328],
     | 99.99th=[42240]
   bw (  KiB/s): min= 1024, max=40872, per=99.52%, avg=12198.66, stdev=4651.74, samples=85
   iops        : min=  256, max=10218, avg=3049.62, stdev=1162.94, samples=85
  lat (usec)   : 4=96.03%, 10=3.82%, 20=0.11%, 50=0.04%, 100=0.01%
  lat (usec)   : 500=0.01%
  cpu          : usr=1.44%, sys=12.07%, ctx=14615, majf=0, minf=49
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
     issued rwts: total=0,131072,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: bw=11.0MiB/s (12.6MB/s), 11.0MiB/s-11.0MiB/s (12.6MB/s-12.6MB/s), io=512MiB (537MB), run=42771-42771msec
eMMC - Random Write: 23.1MiB/s
root@freedombox:/media/root/526376b5-9685-44b4-a3ad-fb0100da48d8# fio --name=randwrite --ioengine=libaio --iodepth=1 --rw=randwrite --bs=4k --direct=0 --size=512M --runtime=240
randwrite: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [w(1)][100.0%][w=29.0MiB/s][w=7427 IOPS][eta 00m:00s]
randwrite: (groupid=0, jobs=1): err= 0: pid=1262: Tue Jul 23 02:54:59 2019
  write: IOPS=5901, BW=23.1MiB/s (24.2MB/s)(512MiB/22211msec); 0 zone resets
    slat (usec): min=31, max=692392, avg=155.01, stdev=5013.11
    clat (usec): min=3, max=1785, avg= 4.82, stdev=13.31
     lat (usec): min=36, max=692417, avg=161.07, stdev=5013.49
    clat percentiles (usec):
     |  1.00th=[    4],  5.00th=[    4], 10.00th=[    4], 20.00th=[    4],
     | 30.00th=[    5], 40.00th=[    5], 50.00th=[    5], 60.00th=[    5],
     | 70.00th=[    5], 80.00th=[    5], 90.00th=[    5], 95.00th=[    6],
     | 99.00th=[   14], 99.50th=[   20], 99.90th=[  130], 99.95th=[  202],
     | 99.99th=[  619]
   bw (  KiB/s): min=   72, max=56904, per=100.00%, avg=23970.91, stdev=10487.72, samples=43
   iops        : min=   18, max=14226, avg=5992.67, stdev=2621.91, samples=43
  lat (usec)   : 4=24.05%, 10=74.37%, 20=1.14%, 50=0.22%, 100=0.11%
  lat (usec)   : 250=0.09%, 500=0.02%, 750=0.01%, 1000=0.01%
  lat (msec)   : 2=0.01%
  cpu          : usr=7.39%, sys=40.44%, ctx=39919, majf=0, minf=30
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
     issued rwts: total=0,131072,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: bw=23.1MiB/s (24.2MB/s), 23.1MiB/s-23.1MiB/s (24.2MB/s-24.2MB/s), io=512MiB (537MB), run=22211-22211msec
eMMC - Sequential Write: 74.5MiB/s
root@freedombox:/mnt/emmc# fio --name=write --ioengine=libaio --iodepth=1 --rw=write --bs=4k --direct=0 --size=512M --runtime=240 
write: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [W(1)][100.0%][w=73.1MiB/s][w=18.7k IOPS][eta 00m:00s]
write: (groupid=0, jobs=1): err= 0: pid=1347: Tue Jul 23 02:47:44 2019
  write: IOPS=19.1k, BW=74.5MiB/s (78.1MB/s)(512MiB/6877msec); 0 zone resets
    slat (usec): min=29, max=77610, avg=42.43, stdev=391.69
    clat (usec): min=3, max=850, avg= 3.75, stdev= 6.01
     lat (usec): min=33, max=77629, avg=47.10, stdev=391.96
    clat percentiles (nsec):
     |  1.00th=[ 3408],  5.00th=[ 3472], 10.00th=[ 3504], 20.00th=[ 3536],
     | 30.00th=[ 3568], 40.00th=[ 3600], 50.00th=[ 3632], 60.00th=[ 3664],
     | 70.00th=[ 3664], 80.00th=[ 3696], 90.00th=[ 3792], 95.00th=[ 3888],
     | 99.00th=[ 4448], 99.50th=[ 4768], 99.90th=[25216], 99.95th=[51456],
     | 99.99th=[69120]
   bw (  KiB/s): min=72512, max=96928, per=100.00%, avg=76298.85, stdev=6571.88, samples=13
   iops        : min=18128, max=24232, avg=19074.69, stdev=1642.98, samples=13
  lat (usec)   : 4=96.64%, 10=3.21%, 20=0.04%, 50=0.05%, 100=0.05%
  lat (usec)   : 250=0.01%, 750=0.01%, 1000=0.01%
  cpu          : usr=18.19%, sys=63.37%, ctx=270, majf=0, minf=24
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
     issued rwts: total=0,131072,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: bw=74.5MiB/s (78.1MB/s), 74.5MiB/s-74.5MiB/s (78.1MB/s-78.1MB/s), io=512MiB (537MB), run=6877-6877msec

These tests were done on an A64 Olinuxino and btrfs filesystem. The SD card a Samsung 32GB EVO Plus card. eMMC is 16GB shipped with A64-OLinuXino-1Ge16GW.

1 Like