{
    "mode": "info",
    "parameter": "cachefilesd.conf",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/cachefilesd.conf/json",
    "generated": "2026-07-05T23:43:08Z",
    "synopsis": "The  configuration  file  for cachefilesd which can manage a persistent\ncache for a variety of network filesystems using a set of files  on  an\nalready mounted filesystem as the data store.",
    "sections": {
        "NAME": {
            "content": "/etc/cachefilesd.conf - Local file caching configuration file\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "The  configuration  file  for cachefilesd which can manage a persistent\ncache for a variety of network filesystems using a set of files  on  an\nalready mounted filesystem as the data store.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This  configuration  file  can  contain a number of commands.  Each one\nshould be on a separate line.  Blank lines and lines beginning  with  a\n'#' character are considered to be comments and are discarded.\n\nThe only mandatory command is:\n\ndir <path>\nThis  command specifies the directory containing the root of the\ncache.  It may only specified once per configuration file.\n\nAll the other commands are optional:\n\nsecctx <label>\nSpecify an LSM security context as which the kernel will perform\noperations   to  access  the  cache.   The  default  is  to  use\ncachefilesd's security context.  Files will be  created  in  the\ncache  with  the  label of directory specified to the 'dir' com-\nmand.\n\nbrun <N>%\n\nbcull <N>%\n\nbstop <N>%\n\nfrun <N>%\n\nfcull <N>%\n\nfstop <N>%\nThese commands configure the culling limits.  The  defaults  are\n7% (run), 5% (cull) and 1% (stop) respectively.  See the section\non cache culling for more information.\n\nThe commands beginning with a 'b' are file space (block) limits,\nthose beginning with an 'f' are file count limits.\n\ntag <name>\nThis  command specifies a tag to FS-Cache to use in distinguish-\ning multiple caches.  This is only required  if  more  than  one\ncache is going to be used.  The default is \"CacheFiles\".\n\nculltable <log2size>\nThis  command specifies the size of the tables holding the lists\nof cullable objects in the cache.  The bigger  the  number,  the\nfaster and more smoothly that culling can proceed when there are\nmany objects in the cache, but the more memory will be  consumed\nby cachefilesd.\n\nThe quantity is specified as log2 of the size actually required,\nfor example 12 indicates a table of 4096 entries  and  13  indi-\ncates  8192  entries.  The permissible values are between 12 and\n20, the latter indicating 1048576 entries.  The default is 12.\n\nnocull Disable culling.  Culling and building up the cull table take up\na  certain  amount of a systems resources, which may be undesir-\nable.  Supplying this option disables all culling activity.  The\ncache  will  keep  building  up  to  the limits set and won't be\nshrunk, except by the removal of out-dated cache files.\n\nresumethresholds <blocks> <files>\nThis command specifies the amount of blocks or  files  that  the\nkernel  should  let  go  of before the daemon should resume from\nculling table scan suspension.\n\nScanning to refill the cull table is suspended when all the  ob-\njects  in a cache are pinned by a live network filesystem in the\nkernel and there's nothing to cull.\n\nEither value can be \"-\" to indicate that this  threshold  should\nbe ignored.\n\ndebug <mask>\nThis command specifies a numeric bitmask to control debugging in\nthe kernel module.  The default is zero (all off).  The  follow-\ning values can be OR'd into the mask to collect various informa-\ntion:\n\n1      Turn on trace of function entry (enter() macros)\n\n2      Turn on trace of function exit (leave() macros)\n\n4      Turn on trace of internal debug points (debug())\n\nThis mask can also be set through /sys/module/cachefiles/parame-\nters/debug.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "As an example, consider the following:\n\ndir /var/cache/fscache\nsecctx cachefileskernelt\ntag mycache\nbrun 10%\nbcull 7%\nbstop 3%\nsecctx systemu:systemr:cachefileskernelt:s0\n\nThis   places   the   cache  storage  objects  in  a  directory  called\n\"/var/cache/fscache\", names the cache \"mycache\", permits the  cache  to\nrun freely as long as there's at least 10% free space on /var/cache/fs-\ncache/, starts culling the cache when the free space drops below 7% and\nstops  writing  new  stuff  into  the cache if the amount of free space\ndrops below 3%.  If the cache is suspended, it won't  reactivate  until\nthe amount of free space rises again to 10% or better.\n\nFurthermore,  this  will tell the kernel module the security context it\nshould use when accessing the cache (SELinux is assumed to be  the  LSM\nin  this example).  In this case, SELinux would use cachefileskernelt\nas the key into the policy.\n",
            "subsections": []
        },
        "CACHE CULLING": {
            "content": "The cache may need culling occasionally to make space.   This  involves\ndiscarding  objects  from  the  cache that have been used less recently\nthan anything else.  Culling is based on the access time  of  data  ob-\njects.  Empty directories are culled if not in use.\n\nCache  culling is done on the basis of the percentage of blocks and the\npercentage of files available in the underlying filesystem.  There  are\nsix \"limits\":\n\nbrun\n\nfrun   If the amount of free space and the number of available files in\nthe cache rises above both these limits, then culling is  turned\noff.\n\nbcull\n\nfcull  If  the  amount  of  available  space or the number of available\nfiles in the cache falls below  either  of  these  limits,  then\nculling is started.\n\nbstop\n\nfstop  If  the  amount  of  available  space or the number of available\nfiles in the cache falls below either of these limits,  then  no\nfurther  allocation  of  disk  space or files is permitted until\nculling has raised things above these limits again.\n\nThese must be configured thusly:\n\n0 <= bstop < bcull < brun < 100\n0 <= fstop < fcull < frun < 100\n\nNote that these are percentages of available space and available files,\nand  do not appear as 100 minus the percentage displayed by the df pro-\ngram.\n\nThe userspace daemon scans the cache to build up a  table  of  cullable\nobjects.   These  are  then culled in least recently used order.  A new\nscan of the cache is started as soon as space is  made  in  the  table.\nObjects  will  be skipped if their atimes have changed or if the kernel\nmodule says it is still using them.\n\nCulling can be disabled with the nocull option.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "cachefilesd(8), df(1), /usr/share/doc/cachefilesd/README\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "David Howells <dhowells@redhat.com>\n\nLinux                          14 November 2005            CACHEFILESD.CONF(5)",
            "subsections": []
        }
    },
    "summary": "/etc/cachefilesd.conf - Local file caching configuration file",
    "flags": [],
    "examples": [
        "As an example, consider the following:",
        "dir /var/cache/fscache",
        "secctx cachefileskernelt",
        "tag mycache",
        "brun 10%",
        "bcull 7%",
        "bstop 3%",
        "secctx systemu:systemr:cachefileskernelt: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/fs-",
        "cache/, 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 cachefileskernelt",
        "as the key into the policy."
    ],
    "see_also": [
        {
            "name": "cachefilesd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cachefilesd/8/json"
        },
        {
            "name": "df",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/df/1/json"
        }
    ]
}