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