1nbdkit-delay-filter(1)              NBDKIT              nbdkit-delay-filter(1)
2
3
4

NAME

6       nbdkit-delay-filter - nbdkit delay filter
7

SYNOPSIS

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) delay-write=(SECS|NNms)
15                 delay-zero=(SECS|NNms) delay-trim=(SECS|NNms)
16                 delay-extents=(SECS|NNms) delay-cache=(SECS|NNms)
17                 delay-fast-zero=BOOL
18

DESCRIPTION

20       "nbdkit-delay-filter" is a filter that delays read and write requests
21       by some seconds or milliseconds.  This is used to simulate a slow or
22       remote server, or to test certain kinds of race conditions in Linux.
23       To limit server bandwidth use nbdkit-rate-filter(1) instead.
24

EXAMPLES

26       Delays reads and writes by 100ms:
27
28        nbdkit --filter=delay file disk.img rdelay=100ms wdelay=100ms
29
30       Delay only zero operations by 1 second, nothing else is affected:
31
32        nbdkit --filter=delay file disk.img delay-zero=1
33

PARAMETERS

35       rdelay=SECS
36       rdelay=NNms
37       delay-read=SECS
38       delay-read=NNms
39           Delay read operations by "SECS" seconds or "NN" milliseconds.
40
41           The two forms "rdelay" and "delay-read" work identically.
42
43       delay-write=SECS
44       delay-write=NNms
45           Delay write operations by "SECS" seconds or "NN" milliseconds.
46
47       delay-zero=SECS
48       delay-zero=NNms
49           (nbdkit ≥ 1.10)
50
51           Delay zero operations by "SECS" seconds or "NN" milliseconds.  See
52           also delay-fast-zero.
53
54       delay-trim=SECS
55       delay-trim=NNms
56           (nbdkit ≥ 1.10)
57
58           Delay trim/discard operations by "SECS" seconds or "NN"
59           milliseconds.
60
61       delay-extents=SECS
62       delay-extents=NNms
63           (nbdkit ≥ 1.12)
64
65           Delay block status (extents) operations by "SECS" seconds or "NN"
66           milliseconds.
67
68       delay-cache=SECS
69       delay-cache=NNms
70           (nbdkit ≥ 1.14)
71
72           Delay advisory cache operations by "SECS" seconds or "NN"
73           milliseconds.
74
75       wdelay=SECS
76       wdelay=NNms
77           Delay write, zero and trim operations by "SECS" seconds or "NN"
78           milliseconds.
79
80       delay-fast-zero=BOOL
81           (nbdkit ≥ 1.16)
82
83           The NBD specification documents an extension called fast zero, in
84           which the client may request that a server should reply with
85           "ENOTSUP" as soon as possible if the zero operation offers no real
86           speedup over a corresponding write.  By default, this parameter is
87           true, and fast zero requests are serviced by the plugin after the
88           same delay as any other zero request; but setting this parameter to
89           false instantly fails a fast zero response without waiting for or
90           consulting the plugin.
91

FILES

93       $filterdir/nbdkit-delay-filter.so
94           The filter.
95
96           Use "nbdkit --dump-config" to find the location of $filterdir.
97

VERSION

99       "nbdkit-delay-filter" first appeared in nbdkit 1.2, based on earlier
100       "rdelay" and "wdelay" options in nbdkit-file-plugin(1).
101

SEE ALSO

103       nbdkit(1), nbdkit-filter(3), nbdkit-pause-filter(1),
104       nbdkit-rate-filter(1).
105

AUTHORS

107       Richard W.M. Jones
108
110       Copyright (C) 2018 Red Hat Inc.
111

LICENSE

113       Redistribution and use in source and binary forms, with or without
114       modification, are permitted provided that the following conditions are
115       met:
116
117       •   Redistributions of source code must retain the above copyright
118           notice, this list of conditions and the following disclaimer.
119
120       •   Redistributions in binary form must reproduce the above copyright
121           notice, this list of conditions and the following disclaimer in the
122           documentation and/or other materials provided with the
123           distribution.
124
125       •   Neither the name of Red Hat nor the names of its contributors may
126           be used to endorse or promote products derived from this software
127           without specific prior written permission.
128
129       THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
130       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
131       IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
132       PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
133       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
134       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
135       SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
136       BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
137       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
138       OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
139       ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
140
141
142
143nbdkit-1.25.8                     2021-05-25            nbdkit-delay-filter(1)
Impressum