To verify disk performance for etcd

Steps
 

As the root user, enter the following:

mkdir /var/lib/test

fio --rw=write --ioengine=sync --fdatasync=1 --directory=/var/lib/test --size=22m --bs=3200 --name=mytest ↵


The command produces output like the following:

Starting 1 process

mytest: Laying out IO file (1 file / 22MiB)

Jobs: 1 (f=1)

mytest: (groupid=0, jobs=1): err= 0: pid=40944: Mon Jun 15 10:23:23 2020

  write: IOPS=7574, BW=16.6MiB/s (17.4MB/s)(21.0MiB/1324msec)

    clat (usec): min=4, max=261, avg= 9.50, stdev= 4.11

     lat (usec): min=4, max=262, avg= 9.67, stdev= 4.12

    clat percentiles (nsec):

     |  1.00th=[ 5536],  5.00th=[ 5728], 10.00th=[ 5920], 20.00th=[ 6176],

     | 30.00th=[ 7584], 40.00th=[ 8896], 50.00th=[ 9408], 60.00th=[ 9792],

     | 70.00th=[10432], 80.00th=[11584], 90.00th=[12864], 95.00th=[14528],

     | 99.00th=[20352], 99.50th=[23168], 99.90th=[28800], 99.95th=[42752],

     | 99.99th=[60672]

   bw (  KiB/s): min=16868, max=17258, per=100.00%, avg=17063.00, stdev=275.77, samples=2

   iops        : min= 7510, max= 7684, avg=7597.00, stdev=123.04, samples=2

  lat (usec)   : 10=64.21%, 20=34.68%, 50=1.08%, 100=0.02%, 500=0.01%


In the second block of output, which is shown below, the 99th percentile durations must be less than 10ms. In this block, each durations is less than 1ms.

fsync/fdatasync/sync_file_range:

    sync (usec): min=39, max=1174, avg=120.71, stdev=63.89

    sync percentiles (usec):

     |  1.00th=[   42],  5.00th=[   45], 10.00th=[   46], 20.00th=[   48],

     | 30.00th=[   52], 40.00th=[   71], 50.00th=[  153], 60.00th=[  159],

     | 70.00th=[  167], 80.00th=[  178], 90.00th=[  192], 95.00th=[  206],

| 99.00th=[ 229], 99.50th=[ 239], 99.90th=[ 355], 99.95th=[ 416],

| 99.99th=[ 445]

  cpu          : usr=2.95%, sys=29.93%, ctx=15663, majf=0, minf=35

  IO depths    : 1=200.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,10029,0,0 short=10029,0,0,0 dropped=0,0,0,0

     latency   : target=0, window=0, percentile=100.00%, depth=1

End of steps