This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
today: new nscd
- To: libc-hacker@cygnus.com
- Subject: today: new nscd
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 18 Oct 1998 18:00:14 -0700
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Hi,
Some might have seen it already, I've checked in an almost complete
rewrite of the nscd. The highlights:
- host database caching is possible
- less resource consumption. There are no threads responsible
only to clean the caches and there are no separate hash tables
for successful and unsuccessful lookups
- the cache is completely reorganized. There is a set of general
cache handling functions. Whenever the cache is hit no
database specific function has to be used.
- this common cache handling code also reduces the code size
(by 10-15%, though there is a lot of functionality added)
- writing out data now happens with one single write call. I.e.,
whenever the cache is hit the result is written out very fast.
This is also achieved by reducing the possibility of readers
being locked out since adding new datasets to the cache does
not require a write-lock, only a read-lock. The cache pruning
functions are also optimized to keep the write lock for the
shortest possible time.
- the NSS side of the functions is also optimized more to use
the least possible number of read system calls possible.
- the nscd code is now written in a way which allows adding new
databases easily. See below.
- the memory management is highly optimized. There are no multiple
copies of the datasets even if it is available under lots of
keys (as in the case of host database entries)
- support for watching /etc/passwd etc is added (as done in Solaris)
What remain to be done in some future version (I don't plan on this for 2.1):
- the interface between libc and nscd should use one connection
per process and not one connection per request.
- once this is done we can add more databases to nscd. This will
help the LDAP NSS module to perform with reasonable speed.
- Solaris' keep-hot funcationality should be implemented.
- look into making nscd safe of DOS attacks
Please give this new implementation a try. I tested it quite some
time on my machine but it certainly is not really busy.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------