ProDigit
Posts: 374
Joined: Tue Aug 30, 2011 1:24 am

Re: Update procedure too slow on a Pi 3B+

Fri Aug 16, 2019 6:18 am

Since I now have both the Sandisk MicroSD 64GB A2 as well as the A1 card, I can do a much more precise measurement of both cards on the Pi 3B+ internal card reader.
Both cards are inserted in the exact same Pi 3B+ unit, both cards have Raspbian Buster full desktop version on them.
Both cards are updated to the latest, and here are the test results:

Of the A1:

Code: Select all

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=256M --readwrite=randrw --rwmixread=75
test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=64
fio-3.12
Starting 1 process
test: Laying out IO file (1 file / 256MiB)
Jobs: 1 (f=1): [m(1)][97.9%][r=3227KiB/s,w=1245KiB/s][r=806,w=311 IOPS][eta 00m:01s] 
test: (groupid=0, jobs=1): err= 0: pid=3230: Fri Aug 16 02:14:32 2019
  read: IOPS=1030, BW=4122KiB/s (4221kB/s)(192MiB/47684msec)
   bw (  KiB/s): min= 1984, max= 5040, per=99.88%, avg=4117.05, stdev=545.01, samples=95
   iops        : min=  496, max= 1260, avg=1029.18, stdev=136.22, samples=95
  write: IOPS=343, BW=1375KiB/s (1408kB/s)(64.0MiB/47684msec); 0 zone resets
   bw (  KiB/s): min=  704, max= 1688, per=99.91%, avg=1373.69, stdev=172.62, samples=95
   iops        : min=  176, max=  422, avg=343.40, stdev=43.15, samples=95
  cpu          : usr=2.17%, sys=9.04%, ctx=91147, majf=0, minf=16
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=99.9%
     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 rwts: total=49141,16395,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
   READ: bw=4122KiB/s (4221kB/s), 4122KiB/s-4122KiB/s (4221kB/s-4221kB/s), io=192MiB (201MB), run=47684-47684msec
  WRITE: bw=1375KiB/s (1408kB/s), 1375KiB/s-1375KiB/s (1408kB/s-1408kB/s), io=64.0MiB (67.2MB), run=47684-47684msec

Disk stats (read/write):
  mmcblk0: ios=48399/16333, merge=622/69, ticks=2522336/474228, in_queue=119940, util=99.00%
A2:

Code: Select all

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=256M --readwrite=randrw --rwmixread=75
test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=64
fio-3.12
Starting 1 process
Jobs: 1 (f=0): [f(1)][100.0%][r=4524KiB/s,w=1468KiB/s][r=1131,w=367 IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=850: Fri Aug 16 02:22:31 2019
  read: IOPS=985, BW=3942KiB/s (4036kB/s)(192MiB/49869msec)
   bw (  KiB/s): min= 3088, max= 4736, per=99.81%, avg=3933.55, stdev=217.43, samples=99
   iops        : min=  772, max= 1184, avg=983.38, stdev=54.34, samples=99
  write: IOPS=328, BW=1315KiB/s (1347kB/s)(64.0MiB/49869msec); 0 zone resets
   bw (  KiB/s): min= 1040, max= 1564, per=99.89%, avg=1313.62, stdev=87.58, samples=99
   iops        : min=  260, max=  391, avg=328.36, stdev=21.89, samples=99
  cpu          : usr=3.47%, sys=13.73%, ctx=76508, majf=0, minf=16
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=99.9%
     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 rwts: total=49141,16395,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
   READ: bw=3942KiB/s (4036kB/s), 3942KiB/s-3942KiB/s (4036kB/s-4036kB/s), io=192MiB (201MB), run=49869-49869msec
  WRITE: bw=1315KiB/s (1347kB/s), 1315KiB/s-1315KiB/s (1347kB/s-1347kB/s), io=64.0MiB (67.2MB), run=49869-49869msec

Disk stats (read/write):
  mmcblk0: ios=48255/16297, merge=592/80, ticks=2622927/503435, in_queue=134420, util=99.83%
In this case the A1 was only slightly faster, but the previous numbers from the A2 I thought I posted, the A2 was faster.
The numbers are subjective, but I think it's safe to say that both A2 and A1 MicroSD cards will operate the same on a Raspberry Pi 3B+.

Tomorrow I'll test them out on a Raspberry Pi Zero W, as I have one available.
I currently don't own a Pi 4 yet, so I can't comment on that.

The A2 drives do have much faster burst speeds, than the A1 drives, up to 70MB/s.
This will not do much of anything when the MicroSD card reader is running at USB 2.0 speeds.

ProDigit
Posts: 374
Joined: Tue Aug 30, 2011 1:24 am

Re: Update procedure too slow on a Pi 3B+

Fri Aug 30, 2019 5:52 am

a hardcopy from my Pi zero W on the A1 microSD card FIO:

Code: Select all

fio --name=test --filename=io.fio --randrepeat=1 --size 10M --bs=4k
test: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.12
Starting 1 process
test: Laying out IO file (1 file / 10MiB)

test: (groupid=0, jobs=1): err= 0: pid=12573: Fri Aug 30 01:33:55 2019
  read: IOPS=4391, BW=17.2MiB/s (17.0MB/s)(10.0MiB/583msec)
    clat (usec): min=18, max=28250, avg=204.34, stdev=1439.24
     lat (usec): min=19, max=28252, avg=206.72, stdev=1439.25
    clat percentiles (usec):
     |  1.00th=[   19],  5.00th=[   20], 10.00th=[   20], 20.00th=[   21],
     | 30.00th=[   21], 40.00th=[   21], 50.00th=[   22], 60.00th=[   22],
     | 70.00th=[   22], 80.00th=[   22], 90.00th=[   25], 95.00th=[   40],
     | 99.00th=[ 9634], 99.50th=[10683], 99.90th=[15926], 99.95th=[15926],
     | 99.99th=[28181]
   bw (  KiB/s): min=17376, max=17376, per=98.93%, avg=17376.00, stdev= 0.00, samples=1
   iops        : min= 4344, max= 4344, avg=4344.00, stdev= 0.00, samples=1
  lat (usec)   : 20=14.06%, 50=81.80%, 100=0.47%, 250=0.66%, 500=0.66%
  lat (usec)   : 750=0.59%, 1000=0.08%
  lat (msec)   : 2=0.04%, 4=0.08%, 10=0.74%, 20=0.78%, 50=0.04%
  cpu          : usr=4.98%, sys=15.98%, ctx=128, majf=2, minf=23
  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=2560,0,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):
   READ: bw=17.2MiB/s (17.0MB/s), 17.2MiB/s-17.2MiB/s (17.0MB/s-17.0MB/s), io=10.0MiB (10.5MB), run=583-583msec

Disk stats (read/write):
  mmcblk0: ios=209/1, merge=85/0, ticks=2004/22, in_queue=1100, util=94.46%
ioping on the Zero with A1 card gave:

Code: Select all

min/avg/max/mdev = 2.73 ms / 2.95 ms / 3.06 ms / 46.6 us
The same results for the A2 card on the Zero W for Fio give:

Code: Select all

fio --name=test --filename=io.fio --randrepeat=1 --size=10M --bs=4k
test: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.12
Starting 1 process
test: Laying out IO file (1 file / 10MiB)

test: (groupid=0, jobs=1): err= 0: pid=840: Fri Aug 30 02:10:52 2019
  read: IOPS=5565, BW=21.7MiB/s (22.8MB/s)(10.0MiB/460msec)
    clat (usec): min=23, max=9709, avg=156.12, stdev=997.05
     lat (usec): min=25, max=9711, avg=158.85, stdev=997.04
    clat percentiles (usec):
     |  1.00th=[   24],  5.00th=[   25], 10.00th=[   25], 20.00th=[   26],
     | 30.00th=[   26], 40.00th=[   26], 50.00th=[   28], 60.00th=[   28],
     | 70.00th=[   29], 80.00th=[   29], 90.00th=[   31], 95.00th=[   41],
     | 99.00th=[ 8029], 99.50th=[ 8160], 99.90th=[ 8291], 99.95th=[ 8356],
     | 99.99th=[ 9765]
  lat (usec)   : 50=97.15%, 100=0.66%, 250=0.20%, 500=0.31%
  lat (msec)   : 2=0.08%, 4=0.04%, 10=1.56%
  cpu          : usr=12.85%, sys=19.61%, ctx=59, 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=2560,0,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):
   READ: bw=21.7MiB/s (22.8MB/s), 21.7MiB/s-21.7MiB/s (22.8MB/s-22.8MB/s), io=10.0MiB (10.5MB), run=460-460msec

Disk stats (read/write):
  mmcblk0: ios=24/0, merge=0/0, ticks=360/0, in_queue=380, util=64.71%
ioping on the Zero W and A2 gave:

Code: Select all

min/avg/max/mdev = 946.0 us / 1.09 ms / 1.20 ms / 38.8 us
The Zero seems to benefit from A2 vs A1 cards.
The latency is lower, and throughput is higher

Return to “Raspberry Pi OS”