guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Configuration & better defaults for nscd


From: Ludovic Courtès
Subject: Configuration & better defaults for nscd
Date: Sun, 14 Dec 2014 17:32:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]