* Configuration & better defaults for nscd
@ 2014-12-14 16:32 Ludovic Courtès
0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2014-12-14 16:32 UTC (permalink / raw)
To: Guix-devel
Commit 6454b33 makes nscd’s policy configuration, and uses better
defaults where host and service lookups are aggressively cached (I felt
ashamed when I realized that running “nscd -f /dev/null” as we did
resulted in a default configuration with absolutely no caching.)
I looked at the nscd.conf file found in the glibc source to get an idea
of all this. It seemed to be the only documentation, but now we also
have “bindings” for that file that are documented in the Guix manual.
:-) (Attached below.)
Comments welcome!
Ludo’.
-- Monadic Procedure: nscd-service [CONFIG] [#:glibc glibc]
Return a service that runs libc’s name service cache daemon (nscd)
with the given CONFIG—an ‘<nscd-configuration>’ object.
-- Scheme Variable: %nscd-default-configuration
This is the default ‘<nscd-configuration>’ value (see below) used
by ‘nscd-service’. This uses the caches defined by
%NSCD-DEFAULT-CACHES; see below.
-- Data Type: nscd-configuration
This is the type representing the name service cache daemon (nscd)
configuration.
‘log-file’ (default: ‘"/var/log/nscd.log"’)
Name of nscd’s log file. This is where debugging output goes
when ‘debug-level’ is strictly positive.
‘debug-level’ (default: ‘0’)
Integer denoting the debugging levels. Higher numbers mean
more debugging output is logged.
‘caches’ (default: %NSCD-DEFAULT-CACHES)
List of ‘<nscd-cache>’ objects denoting things to be cached;
see below.
-- Data Type: nscd-cache
Data type representing a cache database of nscd and its parameters.
‘database’
This is a symbol representing the name of the database to be
cached. Valid values are ‘passwd’, ‘group’, ‘hosts’, and
‘services’, which designate the corresponding NSS database
(*note (libc)NSS Basics::).
‘positive-time-to-live’
‘negative-time-to-live’ (default: ‘20’)
A number representing the number of seconds during which a
positive or negative lookup result remains in cache.
‘check-files?’ (default: ‘#t’)
Whether to check for updates of the files corresponding to
DATABASE.
For instance, when DATABASE is ‘hosts’, setting this flag
instructs nscd to check for updates in ‘/etc/hosts’ and to
take them into account.
‘persistent?’ (default: ‘#t’)
Whether the cache should be stored persistently on disk.
‘shared?’ (default: ‘#t’)
Whether the cache should be shared among users.
‘max-database-size’ (default: 32 MiB)
Maximum size in bytes of the database cache.
-- Scheme Variable: %nscd-default-caches
List of ‘<nscd-cache>’ objects used by default by
‘nscd-configuration’ (see above.)
It enables persistent and aggressive caching of service and host
name lookups. The latter provides better host name lookup
performance, resilience in the face of unreliable name servers, and
also better privacy—often the result of host name lookups is in
local cache, so external name servers do not even need to be
queried.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-14 16:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-14 16:32 Configuration & better defaults for nscd Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.