1CACHEFILESD.CONF(5) Cache Files Utilities CACHEFILESD.CONF(5)
2
3
4
6 /etc/cachefilesd.conf - Local file caching configuration file
7
9 The configuration file for cachefilesd which can manage a persistent
10 cache for a variety of network filesystems using a set of files on an
11 already mounted filesystem as the data store.
12
14 This configuration file can contain a number of commands. Each one
15 should be on a separate line. Blank lines and lines beginning with a
16 '#' character are considered to be comments and are discarded.
17
18 The only mandatory command is:
19
20 dir <path>
21 This command specifies the directory containing the root of the
22 cache.
23
24 All the other commands are optional:
25
26 brun <N>%
27
28 bcull <N>%
29
30 bstop <N>%
31
32 frun <N>%
33
34 fcull <N>%
35
36 fstop <N>%
37 These commands configure the culling limits. The defaults are
38 7% (run), 5% (cull) and 1% (stop) respectively. See the section
39 on cache culling for more information.
40
41 The commands beginning with a 'b' are file space (block) limits,
42 those beginning with an 'f' are file count limits.
43
44 tag <name>
45 This command specifies a tag to FS-Cache to use in distinguish‐
46 ing multiple caches. This is only required if more than one
47 cache is going to be used. The default is "CacheFiles".
48
49 debug <mask>
50 This command specifies a numeric bitmask to control debugging in
51 the kernel module. The default is zero (all off). The follow‐
52 ing values can be OR'd into the mask to collect various informa‐
53 tion:
54
55 1 Turn on trace of function entry (_enter() macros)
56
57 2 Turn on trace of function exit (_leave() macros)
58
59 4 Turn on trace of internal debug points (_debug())
60
61 This mask can also be set through /proc/sys/fs/cachefiles/debug.
62
64 As an example, consider the following:
65
66 dir /var/fscache
67 tag mycache
68 brun 10%
69 bcull 7%
70 bstop 3%
71
72 The places the cache storage objects in a directory called
73 "/var/fscache", names the cache "mycache", permits the cache to run
74 freely as long as there's at least 10% free space on /var/fscache/,
75 starts culling the cache when the free space drops below 7% and stops
76 writing new stuff into the cache if the amount of free space drops
77 below 3%. If the cache is suspended, it won't reactivate until the
78 amount of free space rises again to 10% or better.
79
81 The cache may need culling occasionally to make space. This involves
82 discarding objects from the cache that have been used less recently
83 than anything else. Culling is based on the access time of data
84 objects. Empty directories are culled if not in use.
85
86 Cache culling is done on the basis of the percentage of blocks and the
87 percentage of files available in the underlying filesystem. There are
88 six "limits":
89
90 brun
91
92 frun If the amount of free space and the number of available files in
93 the cache rises above both these limits, then culling is turned
94 off.
95
96 bcull
97
98 fcull If the amount of available space or the number of available
99 files in the cache falls below either of these limits, then
100 culling is started.
101
102 bstop
103
104 fstop If the amount of available space or the number of available
105 files in the cache falls below either of these limits, then no
106 further allocation of disk space or files is permitted until
107 culling has raised things above these limits again.
108
109 These must be configured thusly:
110
111 0 <= bstop < bcull < brun < 100
112 0 <= fstop < fcull < frun < 100
113
114 Note that these are percentages of available space and available files,
115 and do not appear as 100 minus the percentage displayed by the df pro‐
116 gram.
117
118 The userspace daemon scans the cache to build up a table of cullable
119 objects. These are then culled in least recently used order. A new
120 scan of the cache is started as soon as space is made in the table.
121 Objects will be skipped if their atimes have changed or if the kernel
122 module says it is still using them.
123
125 cachefilesd(8), df(1), /usr/share/docs/cachefilesd-*/README
126
128 The cachefilesd software has been developed by David Howells
129
130
131
132Linux 11 July 2005 CACHEFILESD.CONF(5)