example: add a zoned block device write example with GC by trim workload
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 15 Dec 2022 01:56:06 +0000 (10:56 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Dec 2022 19:42:12 +0000 (12:42 -0700)
Add an example job file which shows how to simulate garbage collection
of zoned block devices using a job with trim workload and flow options.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
examples/zbd-rand-write-trim-gc.fio [new file with mode: 0644]
examples/zbd-rand-write-trim-gc.png [new file with mode: 0644]

diff --git a/examples/zbd-rand-write-trim-gc.fio b/examples/zbd-rand-write-trim-gc.fio
new file mode 100644 (file)
index 0000000..139d2c4
--- /dev/null
@@ -0,0 +1,43 @@
+; Using the libaio ioengine, random write to a (zoned) block device. Write
+; target zones are chosen randomly among the first 128 zones starting from
+; device offset corresponding to the 524th zone of the device (524 x 256 MB).
+; For first 3 seconds, run only random write. After that, run random write job
+; and garbage collection simulation job in parallel. The garbage collection
+; simulation job runs trim workload to reset the 128 zones randomly. Use flow
+; option to make the zone resets happen every 128 blocks writes by the other
+; job. This example does not specify max_open_zones. The limit of maximum
+; open zones is obtained from the target block device.
+
+[global]
+group_reporting
+zonemode=zbd
+zonesize=256M
+direct=1
+time_based
+runtime=30
+
+filename=/dev/sdb
+offset=524z
+
+[warmup]
+rw=randwrite
+bs=2M
+size=128z
+ioengine=libaio
+runtime=3
+
+[wjob]
+wait_for=warmup
+rw=randwrite
+bs=2M
+size=128z
+ioengine=libaio
+flow=128
+
+[trimjob]
+wait_for=warmup
+rw=randtrim
+bs=256M
+size=128z
+ioengine=psync
+flow=1
diff --git a/examples/zbd-rand-write-trim-gc.png b/examples/zbd-rand-write-trim-gc.png
new file mode 100644 (file)
index 0000000..f58dd41
Binary files /dev/null and b/examples/zbd-rand-write-trim-gc.png differ