{
    "content": [
        {
            "type": "text",
            "text": "# cachefilesd.conf (man)\n\n## NAME\n\n/etc/cachefilesd.conf - Local file caching configuration file\n\n## SYNOPSIS\n\nThe  configuration  file for cachefilesd which can manage a persistent cache for a variety of\nnetwork filesystems using a set of files on an already mounted filesystem as the data store.\n\n## DESCRIPTION\n\nThis configuration file can contain a number of commands.  Each one should be on  a  separate\nline.  Blank lines and lines beginning with a '#' character are considered to be comments and\nare discarded.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (12 subsections)\n- **EXAMPLES**\n- **CACHE CULLING** (3 subsections)\n- **SEE ALSO**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "cachefilesd.conf",
        "section": "",
        "mode": "man",
        "summary": "/etc/cachefilesd.conf - Local file caching configuration file",
        "synopsis": "The  configuration  file for cachefilesd which can manage a persistent cache for a variety of\nnetwork filesystems using a set of files on an already mounted filesystem as the data store.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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/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 access‐",
            "ing  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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "dir <path>",
                        "lines": 5
                    },
                    {
                        "name": "secctx <label>",
                        "lines": 4
                    },
                    {
                        "name": "brun <N>%",
                        "lines": 1
                    },
                    {
                        "name": "bcull <N>%",
                        "lines": 1
                    },
                    {
                        "name": "bstop <N>%",
                        "lines": 1
                    },
                    {
                        "name": "frun <N>%",
                        "lines": 1
                    },
                    {
                        "name": "fcull <N>%",
                        "lines": 1
                    },
                    {
                        "name": "fstop <N>%",
                        "lines": 6
                    },
                    {
                        "name": "tag <name>",
                        "lines": 4
                    },
                    {
                        "name": "culltable <log2size>",
                        "lines": 14
                    },
                    {
                        "name": "resume_thresholds <blocks> <files>",
                        "lines": 8
                    },
                    {
                        "name": "debug <mask>",
                        "lines": 12
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "CACHE CULLING",
                "lines": 7,
                "subsections": [
                    {
                        "name": "brun",
                        "lines": 3
                    },
                    {
                        "name": "bcull",
                        "lines": 3
                    },
                    {
                        "name": "bstop",
                        "lines": 19
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 3,
                "subsections": []
            }
        ],
        "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 cache for a variety of\nnetwork filesystems using a set of files on an already mounted filesystem as the data store.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This configuration file can contain a number of commands.  Each one should be on  a  separate\nline.  Blank lines and lines beginning with a '#' character are considered to be comments and\nare discarded.\n\nThe only mandatory command is:\n",
                "subsections": [
                    {
                        "name": "dir <path>",
                        "content": "This  command  specifies  the directory containing the root of the cache.  It may only\nspecified once per configuration file.\n\nAll the other commands are optional:\n"
                    },
                    {
                        "name": "secctx <label>",
                        "content": "Specify an LSM security context as which the kernel will perform operations to  access\nthe  cache.  The default is to use cachefilesd's security context.  Files will be cre‐\nated in the cache with the label of directory specified to the 'dir' command.\n"
                    },
                    {
                        "name": "brun <N>%",
                        "content": ""
                    },
                    {
                        "name": "bcull <N>%",
                        "content": ""
                    },
                    {
                        "name": "bstop <N>%",
                        "content": ""
                    },
                    {
                        "name": "frun <N>%",
                        "content": ""
                    },
                    {
                        "name": "fcull <N>%",
                        "content": ""
                    },
                    {
                        "name": "fstop <N>%",
                        "content": "These commands configure the culling limits.  The defaults are 7% (run), 5% (cull) and\n1% (stop) respectively.  See the section on cache culling for more information.\n\nThe commands beginning with a 'b' are file space (block) limits, those beginning  with\nan 'f' are file count limits.\n"
                    },
                    {
                        "name": "tag <name>",
                        "content": "This  command  specifies  a  tag to FS-Cache to use in distinguishing multiple caches.\nThis is only required if more than one cache is going to  be  used.   The  default  is\n\"CacheFiles\".\n"
                    },
                    {
                        "name": "culltable <log2size>",
                        "content": "This command specifies the size of the tables holding the lists of cullable objects in\nthe  cache.  The bigger the number, the faster and more smoothly that culling can pro‐\nceed when there are many objects in the cache, but the more memory will be consumed by\ncachefilesd.\n\nThe quantity is specified as log2 of the size actually required, for example 12  indi‐\ncates  a  table of 4096 entries and 13 indicates 8192 entries.  The permissible values\nare between 12 and 20, the latter indicating 1048576 entries.  The default is 12.\n\nnocull Disable culling.  Culling and building up the cull table take up a certain amount of a\nsystems resources, which may be  undesirable.   Supplying  this  option  disables  all\nculling  activity.   The  cache  will  keep building up to the limits set and won't be\nshrunk, except by the removal of out-dated cache files.\n"
                    },
                    {
                        "name": "resume_thresholds <blocks> <files>",
                        "content": "This command specifies the amount of blocks or files that the kernel should let go  of\nbefore the daemon should resume from culling table scan suspension.\n\nScanning  to  refill  the  cull table is suspended when all the objects in a cache are\npinned by a live network filesystem in the kernel and there's nothing to cull.\n\nEither value can be \"-\" to indicate that this threshold should be ignored.\n"
                    },
                    {
                        "name": "debug <mask>",
                        "content": "This command specifies a numeric bitmask to control debugging in  the  kernel  module.\nThe default is zero (all off).  The following values can be OR'd into the mask to col‐\nlect various information:\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/parameters/debug.\n"
                    }
                ]
            },
            "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 \"/var/cache/fscache\", names the\ncache \"mycache\", permits the cache to run freely as long as there's at least 10%  free  space\non /var/cache/fscache/, starts culling the cache when the free space drops below 7% and stops\nwriting new stuff into the cache if the amount of free space drops below 3%.  If the cache is\nsuspended, it won't reactivate until the amount of free space rises again to 10% or better.\n\nFurthermore, this will tell the kernel module the security context it should use when access‐\ning  the  cache  (SELinux  is  assumed to be the LSM in this example).  In this case, SELinux\nwould use cachefileskernelt as the key into the policy.\n",
                "subsections": []
            },
            "CACHE CULLING": {
                "content": "The cache may need culling occasionally to make space.  This involves discarding objects from\nthe cache that have been used less recently than anything else.  Culling is based on the  ac‐\ncess time of data objects.  Empty directories are culled if not in use.\n\nCache  culling  is  done on the basis of the percentage of blocks and the percentage of files\navailable in the underlying filesystem.  There are six \"limits\":\n",
                "subsections": [
                    {
                        "name": "brun",
                        "content": "frun   If the amount of free space and the number of available files in the cache rises above\nboth these limits, then culling is turned off.\n"
                    },
                    {
                        "name": "bcull",
                        "content": "fcull  If the amount of available space or the number of available files in the  cache  falls\nbelow either of these limits, then culling is started.\n"
                    },
                    {
                        "name": "bstop",
                        "content": "fstop  If  the  amount of available space or the number of available files in the cache falls\nbelow either of these limits, then no further allocation of disk  space  or  files  is\npermitted until culling 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, and do not appear as\n100 minus the percentage displayed by the df program.\n\nThe userspace daemon scans the cache to build up a table of cullable objects.  These are then\nculled in least recently used order.  A new scan of the cache is started as soon as space  is\nmade  in  the  table.   Objects 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"
                    }
                ]
            },
            "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": []
            }
        }
    }
}