xref: /freebsd/usr.sbin/nscd/nscd.conf.5 (revision 8847579c57d6aff2b3371c707dce7a2cee8389aa)
1.\" Copyright (c) 2005 Michael Bushkov <bushman@rsu.ru>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd April 30, 2006
28.Dt CACHED.CONF 5
29.Os
30.Sh NAME
31.Nm cached.conf
32.Nd "caching daemon configuration file manual page"
33.Sh "DESCRIPTION"
34.Nm
35is used by the
36.Xr cached 8
37daemon and is read on its startup.
38Its syntax is mostly similar to the nscd.conf syntax in Linux and Solaris.
39It has some differences, though - see them below.
40.Pp
41Each line specifies either an attribute and a value, or an attribute,
42a cachename and a value.
43Usual cachenames are passwd, groups, hosts, services, protocols and rpc.
44You can also use any other cachename (for example, if some third-party
45application uses nsswitch).
46.Pp
47.Bl -tag -width Pair
48.It Sy threads [value]
49Number of threads, which would listen for connections and process requests.
50The minimum is 1.
51The default value is 8.
52.It Sy enable-cache [cachename] [yes|no]
53Enables or disables the cache for specified cachename.
54.It Sy positive-time-to-live [cachename] [value]
55Sets the TTL (time-to-live) for the specified cache in seconds.
56Larger values can increase system's performance, but they also can affect
57the cache coherence.
58The default value is 3600.
59.It Sy positive-policy [cachename] [fifo|lru|lfu]
60The policy that is applied to erase some of the cache elements, when the
61size limit of the given cachename is exceeded.
62Possible policies are: fifo (first-in-first-out), lru (least-recently-used),
63lfu (least-frequently-used).
64The default policy is lru.
65.It Sy negative-time-to-live [cachename] [value]
66The TTL of the negative cached elements in seconds.
67The larger values can significantly increase system performance in some
68environments (when dealing with files with UIDs, which are not in system
69databases, for example).
70This number should be kept low to avoid the cache coherence problems.
71The default value is 60.
72.It Sy negative-policy [cachename] [fifo|lru|lfu]
73The same as the positive-policy, but this one is applied to the negative
74elements of the given cachename.
75The default policy is fifo.
76.It Sy suggested-size [cachename] [value]
77This is the internal hash table size.
78The value should be a prime number for optimum performance.
79You should only change this value when the number of cached elements is
80significantly (in 5-10 times) greater then the default hash table size (255).
81.It Sy keep-hot-count [cachename] [value]
82The size limit of the cache with the given cachename.
83When it is exceeded, the policy will be applied.
84The default value is 2048.
85.It Sy perform-actual-lookups [cachename] [yes|no]
86If enabled, the
87.Xr cached 8
88does not simply receive and cache the NSS-requests results, but performs
89all the lookups by itself and only returns the responses.
90If this feature is enabled, then for the given cachename
91.Xr cached 8
92will act similarly to the NSCD.
93.Pp
94.Pa NOTE:
95this feature is currently experimental - it supports only passwd, groups and
96services cachenames.
97.El
98.Sh "NOTES"
99You can use
100.Sq #
101symbol at the beginning of the line for comments.
102.Sh "SEE ALSO"
103.Xr cached 8
104.Sh "AUTHORS"
105Michael Bushkov
106.Aq bushman@rsu.ru
107.Sh "BUGS"
108To report bugs or suggestions please mail me
109.Aq bushman@rsu.ru
110