1=head1 NAME
2
3nbdkit-nocache-filter - nbdkit nocache filter
4
5=head1 SYNOPSIS
6
7 nbdkit --filter=nocache plugin [cachemode=MODE] [plugin-args...]
8
9=head1 DESCRIPTION
10
11C<nbdkit-nocache-filter> is a filter that intentionally disables
12efficient handling of advisory client cache requests across the NBD
13protocol.  It is mainly useful for evaluating timing differences to
14determine the impact of caching requests.
15
16Note that the effects of this filter (in crippling handling of client
17cache requests) is somewhat orthogonal from that of the
18L<nbdkit-cache-filter(1)> (adding local caching of client read/write
19requests); the two filters can be run together to experiment with
20timings.
21
22=head1 PARAMETERS
23
24=over 4
25
26=item B<cachemode=none>
27
28=item B<cachemode=emulate>
29
30=item B<cachemode=nop>
31
32Optional, controls which mode the filter will use.  Mode B<none>
33(default) means that cache support is not advertised to the
34client. Mode B<emulate> means that cache support is emulated by the
35filter using the plugin's C<pread> callback, regardless of whether the
36plugin itself implemented the C<cache> callback. Mode B<nop> means
37that cache requests are always accepted and immediately ignored,
38rather than having any actual impact.
39
40=back
41
42=head1 EXAMPLES
43
44Serve the file F<disk.img>, but prevent C<NBD_CMD_CACHE> requests
45altogether, to get a baseline timing of behavior when the client is
46unable to make cache requests:
47
48 nbdkit --filter=nocache file disk.img
49
50Serve the file F<disk.img>, but with cache requests silently ignored,
51rather than being forwarded on to the file plugin (which attempts to
52use L<posix_fadvise(3)>), to compare against the timings without the
53filter and determine whether the file plugin caching was worthwhile:
54
55 nbdkit --filter=nocache file disk.img cachemode=nop
56
57=head1 FILES
58
59=over 4
60
61=item F<$filterdir/nbdkit-nocache-filter.so>
62
63The filter.
64
65Use C<nbdkit --dump-config> to find the location of C<$filterdir>.
66
67=back
68
69=head1 VERSION
70
71C<nbdkit-nocache-filter> first appeared in nbdkit 1.14.
72
73=head1 SEE ALSO
74
75L<nbdkit(1)>,
76L<nbdkit-file-plugin(1)>,
77L<nbdkit-filter(3)>,
78L<nbdkit-cache-filter(1)>,
79L<nbdkit-fua-filter(1)>,
80L<nbdkit-noextents-filter(1)>,
81L<nbdkit-noparallel-filter(1)>,
82L<nbdkit-nozero-filter(1)>.
83
84=head1 AUTHORS
85
86Eric Blake
87
88=head1 COPYRIGHT
89
90Copyright (C) 2019 Red Hat Inc.
91