3 nbdkit-delay-filter - nbdkit delay filter
7 nbdkit --filter=delay plugin rdelay=SECS wdelay=SECS [plugin-args...]
11 nbdkit --filter=delay plugin rdelay=NNms wdelay=NNms [plugin-args...]
15 nbdkit --filter=delay plugin [plugin-args ...]
16 delay-read=(SECS|NNms)
17 delay-write=(SECS|NNms)
18 delay-zero=(SECS|NNms)
19 delay-trim=(SECS|NNms)
20 delay-extents=(SECS|NNms)
21 delay-cache=(SECS|NNms)
23 delay-open=(SECS|NNms)
24 delay-close=(SECS|NNms)
28 C<nbdkit-delay-filter> is a filter that delays read and write requests
29 by some seconds or milliseconds. This is used to simulate a slow or
30 remote server, or to test certain kinds of race conditions in Linux.
31 To limit server bandwidth use L<nbdkit-rate-filter(1)> instead.
35 Delays reads and writes by 100ms:
37 nbdkit --filter=delay file disk.img rdelay=100ms wdelay=100ms
39 Delay only zero operations by 1 second, nothing else is affected:
41 nbdkit --filter=delay file disk.img delay-zero=1
49 =item B<rdelay=>NNB<ms>
51 =item B<delay-read=>SECS
53 =item B<delay-read=>NNB<ms>
55 Delay read operations by C<SECS> seconds or C<NN> milliseconds.
57 The two forms C<rdelay> and C<delay-read> work identically.
59 =item B<delay-write=>SECS
61 =item B<delay-write=>NNB<ms>
63 Delay write operations by C<SECS> seconds or C<NN> milliseconds.
65 =item B<delay-zero=>SECS
67 =item B<delay-zero=>NNB<ms>
71 Delay zero operations by C<SECS> seconds or C<NN> milliseconds. See
72 also B<delay-fast-zero>.
74 =item B<delay-trim=>SECS
76 =item B<delay-trim=>NNB<ms>
80 Delay trim/discard operations by C<SECS> seconds or C<NN> milliseconds.
82 =item B<delay-extents=>SECS
84 =item B<delay-extents=>NNB<ms>
88 Delay block status (extents) operations by C<SECS> seconds or C<NN>
91 =item B<delay-cache=>SECS
93 =item B<delay-cache=>NNB<ms>
97 Delay advisory cache operations by C<SECS> seconds or C<NN>
102 =item B<wdelay=>NNB<ms>
104 Delay write, zero and trim operations by C<SECS> seconds or C<NN>
107 =item B<delay-fast-zero=>BOOL
111 The NBD specification documents an extension called fast zero, in
112 which the client may request that a server should reply with
113 C<ENOTSUP> as soon as possible if the zero operation offers no real
114 speedup over a corresponding write. By default, this parameter is
115 true, and fast zero requests are serviced by the plugin after the same
116 delay as any other zero request; but setting this parameter to false
117 instantly fails a fast zero response without waiting for or consulting
120 =item B<delay-open=>SECS
122 =item B<delay-open=>NNB<ms>
126 Delay open (client connection) by C<SECS> seconds or C<NN>
129 =item B<delay-close=>SECS
131 =item B<delay-close=>NNB<ms>
135 Delay close (client disconnection) by C<SECS> seconds or C<NN>
136 milliseconds. This can also cause server shutdown to be delayed if
137 clients are connected at the time. This only affects clients that
138 gracefully disconnect (using C<NBD_CMD_DISC> / libnbd function
139 L<nbd_shutdown(3)>). Clients that abruptly disconnect from the server
148 =item F<$filterdir/nbdkit-delay-filter.so>
152 Use C<nbdkit --dump-config> to find the location of C<$filterdir>.
158 C<nbdkit-delay-filter> first appeared in nbdkit 1.2, based on earlier
159 C<rdelay> and C<wdelay> options in L<nbdkit-file-plugin(1)>.
165 L<nbdkit-pause-filter(1)>,
166 L<nbdkit-rate-filter(1)>.