nbdkit-delay-filter(1)
π nbdkit-delay-filter π
okay bestie, so you know that thing where you know your code is fine but it's only broken on a slow remote server and you can't reproduce it anywhere?? yeah. that's this. this is a page from the nbdkit-delay-filter(1) manual, and it's lowkey the most useful lil filter in the whole nbdkit universe.
β¨ NAME β¨
nbdkit-delay-filter β bestie it's the nbdkit delay filter π«Ά
πΈ SYNOPSIS πΈ
nbdkit --filter=delay plugin [plugin-args ...]
delay-read=DELAY
delay-write=DELAY
delay-zero=DELAY
delay-trim=DELAY
delay-extents=DELAY
delay-cache=DELAY
delay-open=DELAY
delay-close=DELAY
delay-fast-zero=BOOL
delay-trigger=FILENAME
nbdkit --filter=delay plugin rdelay=DELAY wdelay=DELAY [plugin-args...]
like. look at her. she's gorgeous. every single one of those knobs is real, no cap.
π DESCRIPTION π
"nbdkit-delay-filter" is a filter for nbdkit(1) that delays read and write requests. the whole vibe is: you're faking a slow or remote server, or you're deliberately trying to trip over certain kinds of race conditions in Linux. it's giving "controlled chaos" fr fr.
now listen β if what you actually want is to limit server bandwidth, go use nbdkit-rate-filter(1) instead, that's a whole different girl. and if you want the vibe of a literal spinning disk, that's nbdkit-spinning-filter(1). don't mix them up bestie π
π EXAMPLES π
delays reads AND writes by 100ms, iconic:
nbdkit --filter=delay file disk.img rdelay=100ms wdelay=100ms
delay only zero operations by 1 second, and literally nothing else is affected:
nbdkit --filter=delay file disk.img delay-zero=1
π¦ DELAY FORMAT π¦
in nbdkit β₯ 1.40, nbdkit_parse_delay(3) is used to parse the delay parameters, so a wide variety of formats are accepted, such as:
delay-read=1.5
delay-write=100ms
delay-zero=1.2ΞΌs
delay-trim=1000ns
in nbdkit β€ 1.38, only a whole number of seconds, or a whole number of milliseconds (if suffixed by "ms") were allowed. yes. she's been through some eras. we love growth π
π TRIGGERED DELAYS π
using the "delay-trigger=FILENAME" option, you can disable this filter until the named FILENAME is created. and if the file gets deleted, then the filter is disabled again. this is genuinely so clever β it lets you boot up a virtual machine before turning on delays. main character energy.
π PARAMETERS π
delay-cache=DELAYβ (nbdkit β₯ 1.14) delay advisory cache operations by"DELAY".delay-close=DELAYβ (nbdkit β₯ 1.28) delay close (client disconnection) by"DELAY". heads up: this can also cause server shutdown to be delayed if clients are connected at the time. and it only affects clients that gracefully disconnect (using"NBD_CMD_DISC"/ libnbd function nbd_shutdown(3)). clients that abruptly disconnect from the server cannot be delayed. sorry, no notes.delay-extents=DELAYβ (nbdkit β₯ 1.12) delay block status (extents) operations by"DELAY".delay-fast-zero=BOOLβ (nbdkit β₯ 1.16) the NBD specification documents an extension called fast zero, in which the client may request that a server should reply with"ENOTSUP"as soon as possible if the zero operation offers no real speedup over a corresponding write. by default, this parameter is true, and fast zero requests are serviced by the plugin after the same delay as any other zero request; but setting this parameter to false instantly fails a fast zero response without waiting for or consulting the plugin. spicy. π₯delay-open=DELAYβ (nbdkit β₯ 1.28) delay open (client connection) by"DELAY".delay-read=DELAYrdelay=DELAYβ delay read operations by"DELAY". the two forms"delay-read"and"rdelay"work identically. same girl, two names πdelay-trigger=FILENAMEβ (nbdkit β₯ 1.46) if this option is used, the filter is only enabled when the file called FILENAME exists. therefore this file may be created and deleted while nbdkit is running to enable and disable delays. on/off, on/off, slay.delay-trim=DELAYβ (nbdkit β₯ 1.10) delay trim/discard operations by"DELAY".delay-write=DELAYβ delay write operations by"DELAY".delay-zero=DELAYβ (nbdkit β₯ 1.10) delay zero operations by"DELAY". see also the"delay-fast-zero"option πwdelay=DELAYβ delay write, zero and trim operations by"DELAY". (this is the same as setting"delay-write","delay-zero"and"delay-trim"options together.) one option, three jobs. efficiency queen.
π FILES π
$filterdir/nbdkit-delay-filter.soβ the filter.
use "nbdkit --dump-config" to find the location of $filterdir.
β VERSION β
"nbdkit-delay-filter" first appeared in nbdkit 1.2, based on earlier "rdelay" and "wdelay" options in nbdkit-file-plugin(1). a true legacy icon π«Ά
π§ SEE ALSO π§
nbdkit(1), nbdkit-filter(3), nbdkit-pause-filter(1), nbdkit-rate-filter(1), nbdkit-spinning-filter(1), nbdkit_parse_delay(3).
π AUTHORS π
Richard W.M. Jones
πΈ COPYRIGHT πΈ
Copyright Red Hat
β¨ LICENSE β¨
redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
**THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
and that's the whole page babes π this was nbdkit-1.48.1, dated 2026-08-29 β go forth and make your server fashionably late β¨π¦π
π¦ where this page comes from
- fedora 44: nbdkit-basic-filters 1.48.1-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms