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 groups , 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 suggested-size Oo Ar cachename Oc Op Ar value 106This is the internal hash table size. 107The value should be a prime number for optimum performance. 108You should only change this value when the number of cached elements is 109significantly (in 5-10 times) greater then the default hash table size (255). 110.It Va keep-hot-count Oo Ar cachename Oc Op Ar value 111The size limit of the cache with the given 112.Ar cachename . 113When it is exceeded, the policy will be applied. 114The default value is 2048. 115.It Va perform-actual-lookups Oo Ar cachename Oc Op Cm yes | no 116If enabled, the 117.Xr nscd 8 118does not simply receive and cache the NSS-requests results, but performs 119all the lookups by itself and only returns the responses. 120If this feature is enabled, then for the given 121.Ar cachename 122.Xr nscd 8 123will act similarly to the NSCD. 124.Pp 125.Sy NOTE : 126this feature is currently experimental \[em] it supports only 127.Dq Li passwd , 128.Dq Li groups 129and 130.Dq Li services 131cachenames. 132.El 133.Sh NOTES 134You can use the 135.Ql # 136symbol at the beginning of the line for comments. 137.Sh FILES 138.Bl -tag -width ".Pa /etc/nscd.conf" -compact 139.It Pa /etc/nscd.conf 140.El 141.Sh SEE ALSO 142.Xr nscd 8 143.Sh AUTHORS 144.An Michael Bushkov 145.Aq bushman@freebsd.org 146.Sh BUGS 147Please send bug reports and suggestions to 148.Aq bushman@freebsd.org . 149