File: cachefilesd.conf.5

package info (click to toggle)
cachefilesd 0.9-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 148 kB
  • ctags: 94
  • sloc: ansic: 989; sh: 211; makefile: 32
file content (153 lines) | stat: -rw-r--r-- 5,182 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
.\" -*- nroff -*-
.\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
.\" Written by David Howells (dhowells@redhat.com)
.\"
.\" This program is free software; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License
.\" as published by the Free Software Foundation; either version
.\" 2 of the License, or (at your option) any later version.
.\"
.TH CACHEFILESD.CONF 5 "14 November 2005" Linux "Cache Files Utilities"
.SH NAME
/etc/cachefilesd.conf \- Local file caching configuration file
.SH SYNOPSIS
.P
The configuration file for cachefilesd which can manage a persistent cache for
a variety of network filesystems using a set of files on an already mounted
filesystem as the data store.
.SH DESCRIPTION
.P
This configuration file can contain a number of commands.  Each one should be
on a separate line.  Blank lines and lines beginning with a '#' character are
considered to be comments and are discarded.
.P
The only mandatory command is:
.TP
.B dir <path>
This command specifies the directory containing the root of the cache.  It may
only specified once per configuration file.
.P
All the other commands are optional:
.TP
.B brun <N>%
.TP
.B bcull <N>%
.TP
.B bstop <N>%
.TP
.B frun <N>%
.TP
.B fcull <N>%
.TP
.B fstop <N>%
These commands configure the culling limits.  The defaults are 7% (run), 5%
(cull) and 1% (stop) respectively.  See the section on cache culling for more
information.
.IP
The commands beginning with a 'b' are file space (block) limits, those
beginning with an 'f' are file count limits.
.TP
.B tag <name>
This command specifies a tag to FS-Cache to use in distinguishing multiple
caches.  This is only required if more than one cache is going to be used.  The
default is "CacheFiles".
.TP
.B culltable <log2size>
This command specifies the size of the tables holding the lists of cullable
objects in the cache.  The bigger the number, the faster and more smoothly that
culling can proceed when there are many objects in the cache, but the more
memory will be consumed by cachefilesd.
.IP
The quantity is specified as log2 of the size actually required, for example 12
indicates a table of 4096 entries and 13 indicates 8192 entries.  The
permissible values are between 12 and 20, the latter indicating 1048576
entries.  The default is 12.
.TP
.B debug <mask>
This command specifies a numeric bitmask to control debugging in the kernel
module.  The default is zero (all off).  The following values can be OR'd into
the mask to collect various information:
.RS
.TP
.B 1
Turn on trace of function entry (_enter() macros)
.TP
.B 2
Turn on trace of function exit (_leave() macros)
.TP
.B 4
Turn on trace of internal debug points (_debug())
.RE
.IP
This mask can also be set through /sys/module/cachefiles/parameters/debug.
.RE
.SH EXAMPLES
.P
As an example, consider the following:
.P
.RS
dir /var/fscache
.br
tag mycache
.br
brun 10%
.br
bcull 7%
.br
bstop 3%
.RE
.P
The places the cache storage objects in a directory called "/var/fscache", names
the cache "mycache", permits the cache to run freely as long as there's at
least 10% free space on /var/fscache/, starts culling the cache when the free
space drops below 7% and stops writing new stuff into the cache if the amount
of free space drops below 3%.  If the cache is suspended, it won't reactivate
until the amount of free space rises again to 10% or better.
.SH CACHE CULLING
.P
The cache may need culling occasionally to make space.  This involves
discarding objects from the cache that have been used less recently than
anything else.  Culling is based on the access time of data objects.  Empty
directories are culled if not in use.
.P
Cache culling is done on the basis of the percentage of blocks and the
percentage of files available in the underlying filesystem.  There are six
"limits":
.TP
.B brun
.TP
.B frun
If the amount of free space and the number of available files in the cache
rises above both these limits, then culling is turned off.
.TP
.B bcull
.TP
.B fcull
If the amount of available space or the number of available files in the cache
falls below either of these limits, then culling is started.
.TP
.B bstop
.TP
.B fstop
If the amount of available space or the number of available files in the cache
falls below either of these limits, then no further allocation of disk space or
files is permitted until culling has raised things above these limits again.
.P
These must be configured thusly:
.IP
0 <= bstop < bcull < brun < 100
.br
0 <= fstop < fcull < frun < 100
.P
Note that these are percentages of available space and available files, and do
\fInot\fP appear as 100 minus the percentage displayed by the \fBdf\fP program.
.P
The userspace daemon scans the cache to build up a table of cullable objects.
These are then culled in least recently used order.  A new scan of the cache is
started as soon as space is made in the table.  Objects will be skipped if
their atimes have changed or if the kernel module says it is still using them.
.SH SEE ALSO
\fBcachefilesd\fR(8), \fBdf\fR(1), /usr/share/doc/cachefilesd-*/README
.SH AUTHORS
The cachefilesd software has been developed by David Howells
.Aq dhowells@redhat.com .