1nbdkit-delay-filter(1) NBDKIT nbdkit-delay-filter(1)
2
3
4
6 nbdkit-delay-filter - nbdkit delay filter
7
9 nbdkit --filter=delay plugin rdelay=SECS wdelay=SECS [plugin-args...]
10
11 nbdkit --filter=delay plugin rdelay=NNms wdelay=NNms [plugin-args...]
12
13 nbdkit --filter=delay plugin [plugin-args ...]
14 delay-read=(SECS|NNms)
15 delay-write=(SECS|NNms)
16 delay-zero=(SECS|NNms)
17 delay-trim=(SECS|NNms)
18 delay-extents=(SECS|NNms)
19 delay-cache=(SECS|NNms)
20 delay-fast-zero=BOOL
21 delay-open=(SECS|NNms)
22 delay-close=(SECS|NNms)
23
25 "nbdkit-delay-filter" is a filter that delays read and write requests
26 by some seconds or milliseconds. This is used to simulate a slow or
27 remote server, or to test certain kinds of race conditions in Linux.
28 To limit server bandwidth use nbdkit-rate-filter(1) instead.
29
31 Delays reads and writes by 100ms:
32
33 nbdkit --filter=delay file disk.img rdelay=100ms wdelay=100ms
34
35 Delay only zero operations by 1 second, nothing else is affected:
36
37 nbdkit --filter=delay file disk.img delay-zero=1
38
40 rdelay=SECS
41 rdelay=NNms
42 delay-read=SECS
43 delay-read=NNms
44 Delay read operations by "SECS" seconds or "NN" milliseconds.
45
46 The two forms "rdelay" and "delay-read" work identically.
47
48 delay-write=SECS
49 delay-write=NNms
50 Delay write operations by "SECS" seconds or "NN" milliseconds.
51
52 delay-zero=SECS
53 delay-zero=NNms
54 (nbdkit ≥ 1.10)
55
56 Delay zero operations by "SECS" seconds or "NN" milliseconds. See
57 also delay-fast-zero.
58
59 delay-trim=SECS
60 delay-trim=NNms
61 (nbdkit ≥ 1.10)
62
63 Delay trim/discard operations by "SECS" seconds or "NN"
64 milliseconds.
65
66 delay-extents=SECS
67 delay-extents=NNms
68 (nbdkit ≥ 1.12)
69
70 Delay block status (extents) operations by "SECS" seconds or "NN"
71 milliseconds.
72
73 delay-cache=SECS
74 delay-cache=NNms
75 (nbdkit ≥ 1.14)
76
77 Delay advisory cache operations by "SECS" seconds or "NN"
78 milliseconds.
79
80 wdelay=SECS
81 wdelay=NNms
82 Delay write, zero and trim operations by "SECS" seconds or "NN"
83 milliseconds.
84
85 delay-fast-zero=BOOL
86 (nbdkit ≥ 1.16)
87
88 The NBD specification documents an extension called fast zero, in
89 which the client may request that a server should reply with
90 "ENOTSUP" as soon as possible if the zero operation offers no real
91 speedup over a corresponding write. By default, this parameter is
92 true, and fast zero requests are serviced by the plugin after the
93 same delay as any other zero request; but setting this parameter to
94 false instantly fails a fast zero response without waiting for or
95 consulting the plugin.
96
97 delay-open=SECS
98 delay-open=NNms
99 (nbdkit ≥ 1.28)
100
101 Delay open (client connection) by "SECS" seconds or "NN"
102 milliseconds.
103
104 delay-close=SECS
105 delay-close=NNms
106 (nbdkit ≥ 1.28)
107
108 Delay close (client disconnection) by "SECS" seconds or "NN"
109 milliseconds. This can also cause server shutdown to be delayed if
110 clients are connected at the time. This only affects clients that
111 gracefully disconnect (using "NBD_CMD_DISC" / libnbd function
112 nbd_shutdown(3)). Clients that abruptly disconnect from the server
113 cannot be delayed.
114
116 $filterdir/nbdkit-delay-filter.so
117 The filter.
118
119 Use "nbdkit --dump-config" to find the location of $filterdir.
120
122 "nbdkit-delay-filter" first appeared in nbdkit 1.2, based on earlier
123 "rdelay" and "wdelay" options in nbdkit-file-plugin(1).
124
126 nbdkit(1), nbdkit-filter(3), nbdkit-pause-filter(1),
127 nbdkit-rate-filter(1).
128
130 Richard W.M. Jones
131
133 Copyright Red Hat
134
136 Redistribution and use in source and binary forms, with or without
137 modification, are permitted provided that the following conditions are
138 met:
139
140 • Redistributions of source code must retain the above copyright
141 notice, this list of conditions and the following disclaimer.
142
143 • Redistributions in binary form must reproduce the above copyright
144 notice, this list of conditions and the following disclaimer in the
145 documentation and/or other materials provided with the
146 distribution.
147
148 • Neither the name of Red Hat nor the names of its contributors may
149 be used to endorse or promote products derived from this software
150 without specific prior written permission.
151
152 THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
153 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
154 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
155 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
156 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
157 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
158 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
159 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
160 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
161 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
162 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
163
164
165
166nbdkit-1.36.2 2023-11-26 nbdkit-delay-filter(1)