Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Dec 16, 2022

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 70eb71e682b90078db6f361936933b88f71ad5fd:

t/io_uring: adjust IORING_REGISTER_MAP_BUFFERS value (2022-12-12 16:58:32 -0700)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to a5000c864aa8e7b5525f51fa6fecec75c518b013:

example: add a zoned block device write example with GC by trim workload (2022-12-15 12:42:12 -0700)

----------------------------------------------------------------
Shin'ichiro Kawasaki (4):
man: fix troff warning
HOWTO/man: improve descriptions of max open zones options
example: add a zoned block device write example with GC by zone resets
example: add a zoned block device write example with GC by trim workload

 HOWTO.rst                                 |  27 ++++++++++++++-----
 examples/zbd-rand-write-trim-gc.fio       |  43 ++++++++++++++++++++++++++++++
 examples/zbd-rand-write-trim-gc.png       | Bin 0 -> 104661 bytes
 examples/zbd-rand-write-zone-reset-gc.fio |  27 +++++++++++++++++++
 examples/zbd-rand-write-zone-reset-gc.png | Bin 0 -> 59186 bytes
 fio.1                                     |  25 ++++++++++++-----
 6 files changed, 108 insertions(+), 14 deletions(-)
 create mode 100644 examples/zbd-rand-write-trim-gc.fio
 create mode 100644 examples/zbd-rand-write-trim-gc.png
 create mode 100644 examples/zbd-rand-write-zone-reset-gc.fio
 create mode 100644 examples/zbd-rand-write-zone-reset-gc.png

---

Diff of recent changes:

HOWTO.rst +20 -7
index 5a5263c3..97fe5350 100644
@@ -1052,16 +1052,29 @@ Target file/device
 
 .. option:: max_open_zones=int
 
-	When running a random write test across an entire drive many more
-	zones will be open than in a typical application workload. Hence this
-	command line option that allows one to limit the number of open zones. The
-	number of open zones is defined as the number of zones to which write
-	commands are issued.
+	A zone of a zoned block device is in the open state when it is partially
+	written (i.e. not all sectors of the zone have been written). Zoned
+	block devices may have a limit on the total number of zones that can
+	be simultaneously in the open state, that is, the number of zones that
+	can be written to simultaneously. The :option:`max_open_zones` parameter
+	limits the number of zones to which write commands are issued by all fio
+	jobs, that is, limits the number of zones that will be in the open
+	state. This parameter is relevant only if the :option:`zonemode` =zbd is
+	used. The default value is always equal to maximum number of open zones
+	of the target zoned block device and a value higher than this limit
+	cannot be specified by users unless the option
+	:option:`ignore_zone_limits` is specified. When
+	:option:`ignore_zone_limits` is specified or the target device has no
+	limit on the number of zones that can be in an open state,
+	:option:`max_open_zones` can specify 0 to disable any limit on the
+	number of zones that can be simultaneously written to by all jobs.
 
 .. option:: job_max_open_zones=int
 
-	Limit on the number of simultaneously opened zones per single
-	thread/process.
+	In the same manner as :option:`max_open_zones`, limit the number of open
+	zones per fio job, that is, the number of zones that a single job can
+	simultaneously write to. A value of zero indicates no limit.
+	Default: zero.
 
 .. option:: ignore_zone_limits=bool
 
examples/zbd-rand-write-trim-gc.fio new file +43 -0

43 lines not on this page · raw message

examples/zbd-rand-write-trim-gc.png new file binary +0 -0
new file mode 100644
index 00000000..f58dd412
Binary files /dev/null and b/examples/zbd-rand-write-trim-gc.png differ
examples/zbd-rand-write-zone-reset-gc.fio new file +27 -0
new file mode 100644
index 00000000..8f77baf3
@@ -0,0 +1,27 @@
+; Using the psync ioengine, random write to a (zoned) block device. Write
+; target zones are chosen randomly among the first 8 zones starting from device
+; offset corresponding to the 524th zone of the device (524 x 256 MB). Simulate
+; garbage collection operation using zone_reset_threshold and
+; zone_reset_frequency options. The zone resets happen when total written data
+; bytes is beyond 70% of 8 zones, and 8 = 1 / 0.125 blocks are written. This
+; example does not specify max_open_zones. The limit of maximum open zones is
+; obtained from the target block device.
+
+[global]
+name=zbd-rand-write-gc
+group_reporting
+rw=randwrite
+zonemode=zbd
+zonesize=256M
+bs=32M
+direct=1
+time_based
+runtime=40
+
+[dev1]
+filename=/dev/sdb
+size=8z
+offset=524z
+ioengine=psync
+zone_reset_threshold=0.7
+zone_reset_frequency=0.125
examples/zbd-rand-write-zone-reset-gc.png new file binary +0 -0
new file mode 100644
index 00000000..b10acc80
Binary files /dev/null and b/examples/zbd-rand-write-zone-reset-gc.png differ
fio.1 +18 -7
index 7a153731..1074b52a 100644
@@ -828,14 +828,25 @@ numbers fio only reads beyond the write pointer if explicitly told to do
 so. Default: false.
 .TP
 .BI max_open_zones \fR=\fPint
-When running a random write test across an entire drive many more zones will be
-open than in a typical application workload. Hence this command line option
-that allows one to limit the number of open zones. The number of open zones is
-defined as the number of zones to which write commands are issued by all
-threads/processes.
+A zone of a zoned block device is in the open state when it is partially written
+(i.e. not all sectors of the zone have been written). Zoned block devices may
+have limit a on the total number of zones that can be simultaneously in the
+open state, that is, the number of zones that can be written to simultaneously.
+The \fBmax_open_zones\fR parameter limits the number of zones to which write
+commands are issued by all fio jobs, that is, limits the number of zones that
+will be in the open state. This parameter is relevant only if the
+\fBzonemode=zbd\fR is used. The default value is always equal to maximum number
+of open zones of the target zoned block device and a value higher than this
+limit cannot be specified by users unless the option \fBignore_zone_limits\fR is
+specified. When \fBignore_zone_limits\fR is specified or the target device has
+no limit on the number of zones that can be in an open state,
+\fBmax_open_zones\fR can specify 0 to disable any limit on the number of zones
+that can be simultaneously written to by all jobs.
 .TP
 .BI job_max_open_zones \fR=\fPint
-Limit on the number of simultaneously opened zones per single thread/process.
+In the same manner as \fBmax_open_zones\fR, limit the number of open zones per
+fio job, that is, the number of zones that a single job can simultaneously write
+to. A value of zero indicates no limit. Default: zero.
 .TP
 .BI ignore_zone_limits \fR=\fPbool
 If this option is used, fio will ignore the maximum number of open zones limit
@@ -2544,7 +2555,7 @@ replaced by the name of the job
 .BI (exec)grace_time\fR=\fPint
 Defines the time between the SIGTERM and SIGKILL signals. Default is 1 second.
 .TP
-.BI (exec)std_redirect\fR=\fbool
+.BI (exec)std_redirect\fR=\fPbool
 If set, stdout and stderr streams are redirected to files named from the job name. Default is true.
 .TP
 .BI (xnvme)xnvme_async\fR=\fPstr