# For this sample just like running the command below on the test vm and
# getting benchmark info back to the yardstick.
#
-# sudo fio -filename=/home/ec2-user/data.raw -bs=4k -rw=write -ramp_time=10 \
-# -runtime=60 -name=yardstick-fio -ioengine=libaio -direct=1 \
-# -group_reporting -numjobs=1 -time_based --output=yardstick-fio.log
+# sudo fio -filename=/home/ec2-user/data.raw -bs=4k -ipdepth=1 -rw=write \
+# -ramp_time=10 -runtime=60 -name=yardstick-fio -ioengine=libaio \
+# -direct=1 -group_reporting -numjobs=1 -time_based \
+# --output=yardstick-fio.log
#
# When the above fio command done, the yardstick-fio.log file will contain
# information like below and the benchmark script will take iops, throughput
options:
filename: /home/ec2-user/data.raw
bs: 4k
+ iodepth: 1
rw: write
ramp_time: 10
host: fio.demo
runner:
type: Duration
duration: 60
- interval: 60
+ interval: 1
context:
name: demo
type: int
unit: bytes
default: 4k
+ iodepth - number of iobuffers to keep in flight
+ type: int
+ unit: na
+ default: 1
rw - type of io pattern [read, write, randwrite, randread, rw, randrw]
type: string
unit: na
options = args["options"]
filename = options.get("filename", "/home/ec2-user/data.raw")
bs = options.get("bs", "4k")
+ iodepth = options.get("iodepth", "1")
rw = options.get("rw", "write")
ramp_time = options.get("ramp_time", 20)
name = "yardstick-fio"
else:
runtime = 30
- args = "-filename=%s -bs=%s -rw=%s -ramp_time=%s -runtime=%s -name=%s" \
- % (filename, bs, rw, ramp_time, runtime, name)
+ args = "-filename=%s -bs=%s -iodepth=%s -rw=%s -ramp_time=%s " \
+ "-runtime=%s -name=%s" \
+ % (filename, bs, iodepth, rw, ramp_time, runtime, name)
cmd = "sudo bash fio.sh %s %s %s" \
- % (filename, args, default_args)
+ % (filename, args, default_args)
LOG.debug("Executing command: %s", cmd)
status, stdout, stderr = self.client.execute(cmd)
if status:
options = {
"filename": "/home/ec2-user/data.raw",
"bs": "4k",
+ "iodepth": "1",
"rw": "write",
"ramp_time": 10,
}