xref: /freebsd/usr.sbin/nscd/nscd.conf.5 (revision 193d9e768ba63fcfb187cfd17f461f7d41345048)
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 NSCD.CONF 5
29.Os
30.Sh NAME
31.Nm nscd.conf
32.Nd "nscd configuration file"
33.Sh DESCRIPTION
34The
35.Nm
36file
37is used by the
38.Xr nscd 8
39daemon and is read on its startup.
40Its syntax is mostly similar to the
41.Pa nscd.conf
42syntax in
43.Tn Linux
44and
45.Tn Solaris .
46It has some differences, though \[em] see them below.
47.Pp
48Each line specifies either an attribute and a
49.Ar value ,
50or an attribute, a
51.Ar cachename
52and a
53.Ar value .
54Usual cachenames are
55.Dq Li passwd ,
56.Dq Li group ,
57.Dq Li hosts ,
58.Dq Li services ,
59.Dq Li protocols
60and
61.Dq Li rpc .
62You can also use any other
63.Ar cachename
64(for example, if some third-party
65application uses nsswitch).
66.Bl -tag -width indent
67.It Va threads Op Ar value
68Number of threads, which would listen for connections and process requests.
69The minimum is 1.
70The default value is 8.
71.It Va enable-cache Oo Ar cachename Oc Op Cm yes | no
72Enables or disables the cache for specified
73.Ar cachename .
74.It Va positive-time-to-live Oo Ar cachename Oc Op Ar value
75Sets the TTL (time-to-live) for the specified cache in seconds.
76Larger values can increase system's performance, but they also can affect
77the cache coherence.
78The default value is 3600.
79.It Va positive-policy Oo Ar cachename Oc Op Cm fifo | lru | lfu
80The policy that is applied to erase some of the cache elements, when the
81size limit of the given
82.Ar cachename
83is exceeded.
84Possible policies are:
85.Cm fifo
86(first-in-first-out),
87.Cm lru
88(least-recently-used), and
89.Cm lfu
90(least-frequently-used).
91The default policy is
92.Cm lru .
93.It Va negative-time-to-live Oo Ar cachename Oc Op Ar value
94The TTL of the negative cached elements in seconds.
95The larger values can significantly increase system performance in some
96environments (when dealing with files with UIDs, which are not in system
97databases, for example).
98This number should be kept low to avoid the cache coherence problems.
99The default value is 60.
100.It Va negative-policy Oo Ar cachename Oc Op Cm fifo | lru | lfu
101The same as the positive-policy, but this one is applied to the negative
102elements of the given
103.Ar cachename .
104The default policy is fifo.
105.It Va negative-confidence-threshold Oo Ar cachename Oc Op Ar value
106The number of times a query must have failed before the cache accepts
107that the element can not be found.
108At the default value of 1 each negative query result is cached and
109immediately returned from the cache on further queries.
110Higher numbers cause queries to be retried at the configured data
111sources the given number of times, before the negative result is
112returned from the cache on further queries.
113This allows to probe for the existence of an entry, and then to create
114it if it did not exist, without the negative probe result preventing
115access to the new entry for the duration of the negative TTL.
116.It Va suggested-size Oo Ar cachename Oc Op Ar value
117This is the internal hash table size.
118The value should be a prime number for optimum performance.
119You should only change this value when the number of cached elements is
120significantly (5-10 times) greater than the default hash table size (257).
121.It Va keep-hot-count Oo Ar cachename Oc Op Ar value
122The size limit of the cache with the given
123.Ar cachename .
124When it is exceeded, the policy will be applied.
125The default value is 2048.
126.It Va perform-actual-lookups Oo Ar cachename Oc Op Cm yes | no
127If enabled, the
128.Xr nscd 8
129does not simply receive and cache the NSS-requests results, but performs
130all the lookups by itself and only returns the responses.
131If this feature is enabled, then for the given
132.Ar cachename
133.Xr nscd 8
134will act similarly to the NSCD.
135.Pp
136.Sy NOTE :
137this feature is currently experimental \[em] it supports only
138.Dq Li passwd ,
139.Dq Li group
140and
141.Dq Li services
142cachenames.
143.El
144.Sh NOTES
145You can use the
146.Ql #
147symbol at the beginning of the line for comments.
148.Sh FILES
149.Bl -tag -width ".Pa /etc/nscd.conf" -compact
150.It Pa /etc/nscd.conf
151.El
152.Sh SEE ALSO
153.Xr nscd 8
154.Sh AUTHORS
155.An Michael Bushkov Aq Mt bushman@FreeBSD.org
156.Sh BUGS
157Please send bug reports and suggestions to
158.Aq Mt bushman@FreeBSD.org .
159