1nbdkit-nocache-filter(1) NBDKIT nbdkit-nocache-filter(1)
2
3
4
6 nbdkit-nocache-filter - nbdkit nocache filter
7
9 nbdkit --filter=nocache plugin [cachemode=MODE] [plugin-args...]
10
12 "nbdkit-nocache-filter" is a filter that intentionally disables
13 efficient handling of advisory client cache requests across the NBD
14 protocol. It is mainly useful for evaluating timing differences to
15 determine the impact of caching requests.
16
17 Note that the effects of this filter (in crippling handling of client
18 cache requests) is somewhat orthogonal from that of the
19 nbdkit-cache-filter(1) (adding local caching of client read/write
20 requests); the two filters can be run together to experiment with
21 timings.
22
24 cachemode=none
25 cachemode=emulate
26 cachemode=nop
27 Optional, controls which mode the filter will use. Mode none
28 (default) means that cache support is not advertised to the client.
29 Mode emulate means that cache support is emulated by the filter
30 using the plugin's "pread" callback, regardless of whether the
31 plugin itself implemented the "cache" callback. Mode nop means that
32 cache requests are always accepted and immediately ignored, rather
33 than having any actual impact.
34
36 Serve the file disk.img, but prevent "NBD_CMD_CACHE" requests
37 altogether, to get a baseline timing of behavior when the client is
38 unable to make cache requests:
39
40 nbdkit --filter=nocache file disk.img
41
42 Serve the file disk.img, but with cache requests silently ignored,
43 rather than being forwarded on to the file plugin (which attempts to
44 use posix_fadvise(3)), to compare against the timings without the
45 filter and determine whether the file plugin caching was worthwhile:
46
47 nbdkit --filter=nocache file disk.img cachemode=nop
48
50 $filterdir/nbdkit-nocache-filter.so
51 The filter.
52
53 Use "nbdkit --dump-config" to find the location of $filterdir.
54
56 "nbdkit-nocache-filter" first appeared in nbdkit 1.14.
57
59 nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3),
60 nbdkit-cache-filter(1), nbdkit-fua-filter(1),
61 nbdkit-multi-conn-filter(1), nbdkit-noextents-filter(1),
62 nbdkit-noparallel-filter(1), nbdkit-nozero-filter(1).
63
65 Eric Blake
66
68 Copyright (C) 2019 Red Hat Inc.
69
71 Redistribution and use in source and binary forms, with or without
72 modification, are permitted provided that the following conditions are
73 met:
74
75 • Redistributions of source code must retain the above copyright
76 notice, this list of conditions and the following disclaimer.
77
78 • Redistributions in binary form must reproduce the above copyright
79 notice, this list of conditions and the following disclaimer in the
80 documentation and/or other materials provided with the
81 distribution.
82
83 • Neither the name of Red Hat nor the names of its contributors may
84 be used to endorse or promote products derived from this software
85 without specific prior written permission.
86
87 THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
88 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
89 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
90 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
91 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
92 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
93 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
94 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
95 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
96 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
97 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
98
99
100
101nbdkit-1.25.8 2021-05-25 nbdkit-nocache-filter(1)