when i excute the command: ansible-playbook bootstrap.yml to install tidb, i made a mistake:
TASK [machine_benchmark : set fio disk_mix_write_lat facts] ****************************************************************************************************************
fatal: [192.168.19.13]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 1\n\nThe error appears to have been in '/software/tidb-ansible/roles/machine_benchmark/tasks/main.yml': line 56, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: set fio disk_mix_write_lat facts\n ^ here\n"}
# The Default configuration:
benchmark_size: 10G
So I did a manual test:
1`
./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10G -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 | grep -w 'lat (usec)' | grep avg | awk -F'avg=' '{print $2}' | awk -F',' '{print $1}'
8682.70
2、
/fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10000M -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 | grep -w 'lat (usec)' | grep avg | awk -F'avg=' '{print $2}' | awk -F',' '{print $1}'
11420.83
8777.24
3、
./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=1G -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 | grep -w 'lat (usec)' | grep avg | awk -F'avg=' '{print $2}' | awk -F',' '{print $1}'
10060.48
8055.45
for the test detals:**
1、
[tidb@localhost deploy]$ ./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10G -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60
PingCAP: (g=0): rw=randrw, bs=32K-32K/32K-32K/32K-32K, ioengine=libaio, iodepth=4
fio-2.16-4-g3544
Starting 1 thread
Jobs: 1 (f=1): [m(1)] [100.0% done] [6176KB/6912KB/0KB /s] [193/216/0 iops] [eta 00m:00s]
PingCAP: (groupid=0, jobs=1): err= 0: pid=4045: Thu Jun 14 17:45:45 2018
read : io=380416KB, bw=6338.2KB/s, iops=198, runt= 60012msec
slat (usec): min=15, max=106, avg=32.63, stdev= 8.42
clat (msec): min=1, max=207, avg=11.35, stdev= 7.58
lat (msec): min=1, max=207, avg=11.39, stdev= 7.58
clat percentiles (msec):
| 1.00th=[ 3], 5.00th=[ 4], 10.00th=[ 5], 20.00th=[ 7],
| 30.00th=[ 8], 40.00th=[ 9], 50.00th=[ 10], 60.00th=[ 11],
| 70.00th=[ 13], 80.00th=[ 16], 90.00th=[ 20], 95.00th=[ 25],
| 99.00th=[ 39], 99.50th=[ 44], 99.90th=[ 61], 99.95th=[ 67],
| 99.99th=[ 200]
write: io=382208KB, bw=6368.9KB/s, iops=199, runt= 60012msec
slat (usec): min=21, max=102, avg=36.76, stdev= 8.49
clat (usec): min=460, max=212520, avg=8717.90, stdev=5664.26
lat (usec): min=496, max=212544, avg=8754.66, stdev=5664.26
clat percentiles (usec):
| 1.00th=[ 1048], 5.00th=[ 2256], 10.00th=[ 3312], 20.00th=[ 4960],
| 30.00th=[ 6112], 40.00th=[ 6368], 50.00th=[ 7136], 60.00th=[ 8640],
| 70.00th=[10560], 80.00th=[12224], 90.00th=[15424], 95.00th=[18304],
| 99.00th=[24960], 99.50th=[28800], 99.90th=[36096], 99.95th=[41216],
| 99.99th=[205824]
lat (usec) : 500=0.03%, 750=0.19%, 1000=0.26%
lat (msec) : 2=1.50%, 4=8.08%, 10=50.47%, 20=33.14%, 50=6.19%
lat (msec) : 100=0.13%, 250=0.02%
cpu : usr=0.56%, sys=1.89%, ctx=22559, majf=0, minf=11
IO depths : 1=0.1%, 2=0.1%, 4=100.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 : total=r=11888/w=11944/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=4
Run status group 0 (all jobs):
READ: io=380416KB, aggrb=6338KB/s, minb=6338KB/s, maxb=6338KB/s, mint=60012msec, maxt=60012msec
WRITE: io=382208KB, aggrb=6368KB/s, minb=6368KB/s, maxb=6368KB/s, mint=60012msec, maxt=60012msec
Disk stats (read/write):
dm-2: ios=11874/11929, merge=0/0, ticks=134531/103806, in_queue=238355, util=99.89%, aggrios=11888/11948, aggrmerge=0/0, aggrticks=134723/103921, aggrin_queue=238617, aggrutil=99.86%
sda: ios=11888/11948, merge=0/0, ticks=134723/103921, in_queue=238617, util=99.86%
2、
[tidb@localhost deploy]$ ./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10000M -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60
PingCAP: (g=0): rw=randrw, bs=32K-32K/32K-32K/32K-32K, ioengine=libaio, iodepth=4
fio-2.16-4-g3544
Starting 1 thread
PingCAP: Laying out IO file(s) (1 file(s) / 10000MB)
Jobs: 1 (f=1): [m(1)] [100.0% done] [8032KB/8352KB/0KB /s] [251/261/0 iops] [eta 00m:00s]
PingCAP: (groupid=0, jobs=1): err= 0: pid=4148: Thu Jun 14 17:53:12 2018
read : io=489664KB, bw=8160.4KB/s, iops=255, runt= 60005msec
slat (usec): min=16, max=149, avg=35.53, stdev= 7.93
clat (usec): min=310, max=70993, avg=8617.21, stdev=5490.06
lat (usec): min=349, max=71027, avg=8652.73, stdev=5490.01
clat percentiles (usec):
| 1.00th=[ 2064], 5.00th=[ 2800], 10.00th=[ 3440], 20.00th=[ 4576],
| 30.00th=[ 5536], 40.00th=[ 6368], 50.00th=[ 7264], 60.00th=[ 8256],
| 70.00th=[ 9664], 80.00th=[11712], 90.00th=[15040], 95.00th=[19072],
| 99.00th=[28544], 99.50th=[33536], 99.90th=[45312], 99.95th=[49920],
| 99.99th=[70144]
write: io=490976KB, bw=8182.3KB/s, iops=255, runt= 60005msec
slat (usec): min=20, max=138, avg=39.34, stdev= 7.68
clat (usec): min=414, max=65713, avg=6963.41, stdev=4226.16
lat (usec): min=455, max=65745, avg=7002.74, stdev=4226.12
clat percentiles (usec):
| 1.00th=[ 740], 5.00th=[ 1672], 10.00th=[ 2448], 20.00th=[ 3664],
| 30.00th=[ 4768], 40.00th=[ 5728], 50.00th=[ 6176], 60.00th=[ 6496],
| 70.00th=[ 7648], 80.00th=[ 9920], 90.00th=[12352], 95.00th=[15040],
| 99.00th=[20608], 99.50th=[24192], 99.90th=[30336], 99.95th=[34048],
| 99.99th=[42240]
lat (usec) : 500=0.11%, 750=0.41%, 1000=0.45%
lat (msec) : 2=2.90%, 4=14.74%, 10=57.47%, 20=21.32%, 50=2.57%
lat (msec) : 100=0.03%
cpu : usr=0.71%, sys=2.61%, ctx=29794, majf=0, minf=11
IO depths : 1=0.1%, 2=0.1%, 4=100.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 : total=r=15302/w=15343/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=4
Run status group 0 (all jobs):
READ: io=489664KB, aggrb=8160KB/s, minb=8160KB/s, maxb=8160KB/s, mint=60005msec, maxt=60005msec
WRITE: io=490976KB, aggrb=8182KB/s, minb=8182KB/s, maxb=8182KB/s, mint=60005msec, maxt=60005msec
Disk stats (read/write):
dm-2: ios=15273/15320, merge=0/0, ticks=131245/106448, in_queue=237715, util=99.88%, aggrios=15302/15354, aggrmerge=0/1, aggrticks=131457/106704, aggrin_queue=238142, aggrutil=99.86%
sda: ios=15302/15354, merge=0/1, ticks=131457/106704, in_queue=238142, util=99.86%
summary:
in my solutions, when benchmark_size: 10G, i I got only one value
when benchmark_size: 1G or benchmark_size: 10000M or benchmark_size: 10M , i got two values,
so, If I use the default value, the installation process will be wrong and interrupted。
Please test it again, thank you!