info > CACHEFILESD.CONF(5)

CACHEFILESD.CONF(5) Cache Files Utilities CACHEFILESD.CONF(5)

πŸ“„ NAME

/etc/cachefilesd.conf - Local file caching configuration file

πŸš€ Quick Reference

Use CaseCommandDescription
Cache root directorydir <path>πŸ“ Path to the root of the cache on a mounted filesystem (mandatory)
Security contextsecctx <label>πŸ” LSM security context for kernel operations (default: cachefilesd context)
Cache tagtag <name>🏷️ Distinguishing name for multiple caches (default: "CacheFiles")
Block usage thresholdsbrun N% / bcull N% / bstop N%πŸ“Š Set run, cull, and stop free‑space limits (defaults: 7%, 5%, 1%)
File count thresholdsfrun N% / fcull N% / fstop N%πŸ“ˆ Set run, cull, and stop free‑file limits (defaults: 7%, 5%, 1%)
Cull table sizeculltable <log2size>πŸ—ƒοΈ Log2 of table entries (12–20, default 12)
Disable cullingnocull🚫 Turn off automatic cache shrinking
Resume thresholdsresume_thresholds <blocks> <files>πŸ”„ Blocks/files to free before resuming cull‑table scan; use "-" to ignore
Debugging maskdebug <mask>πŸ› Kernel module debug bits (1=enter, 2=exit, 4=debug points)

πŸ“‹ SYNOPSIS

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.

πŸ“– DESCRIPTION

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.

The only mandatory command is:

All the other commands are optional:

πŸ’‘ EXAMPLES

As an example, consider the following:

dir /var/cache/fscache
secctx cachefiles_kernel_t
tag mycache
brun 10%
bcull 7%
bstop 3%
secctx system_u:system_r:cachefiles_kernel_t:s0

πŸ“‚ This places the cache storage objects in a directory called "/var/cache/fscache", names the cache "mycache", permits the cache to run freely as long as there's at least 10% free space on /var/cache/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.

πŸ” Furthermore, this will tell the kernel module the security context it should use when accessing the cache (SELinux is assumed to be the LSM in this example). In this case, SELinux would use cachefiles_kernel_t as the key into the policy.

πŸ—‘οΈ CACHE CULLING

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.

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":

These must be configured thusly:

0 <= bstop < bcull < brun < 100
0 <= fstop < fcull < frun < 100

Note that these are percentages of available space and available files, and do not appear as 100 minus the percentage displayed by the df program.

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.

Culling can be disabled with the nocull option. 🚫

πŸ“š SEE ALSO

πŸ‘₯ AUTHORS

David Howells <dhowells AT redhat.com>

Linux 14 November 2005 CACHEFILESD.CONF(5)

CACHEFILESD.CONF(5)
πŸ“„ NAME πŸš€ Quick Reference πŸ“‹ SYNOPSIS πŸ“– DESCRIPTION πŸ’‘ EXAMPLES πŸ—‘οΈ CACHE CULLING πŸ“š SEE ALSO πŸ‘₯ AUTHORS

Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 04:55 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^