#78920 nscd: nscd goes infinitely slow with heavy DNS traffic

Package:
nscd
Source:
glibc
Description:
GNU C Library: Name Service Cache Daemon
Submitter:
Date:
2015-03-20 13:24:04 UTC
Severity:
normal
#78920#5
Date:
2000-12-06 14:03:17 UTC
From:
To:
I want to do DNS lookups for all traffic to my site for a year with Webalizer.
Webalizer has an option for the number of processes to use for DNS lookups.
If I use 50 processes then nscd will go infinitely slow for looking up uid/gid
numbers to names.  "ls -l /proc" will stop for minutes and show no sign of
recovering, "ls -ln /proc" will complete in much less than 1 second.

If I kill nscd then performance will be back to normal.

Here's the relevant parts of /etc/nsswitch.conf:
passwd:         db
group:          db
hosts:          files dns

If I change webalizer to use 25 processes it still hangs nscd.  It I change it
to 10 processes then it sometimes hangs nscd.

I have now commented out all the "hosts" entries from nscd.conf and it's
working OK.
--- Begin /etc/nscd.conf (modified conffile)
	debug-level		0
	enable-cache		passwd		yes
	positive-time-to-live	passwd		600
	negative-time-to-live	passwd		20
	suggested-size		passwd		211
	check-files		passwd		yes
	enable-cache		group		yes
	positive-time-to-live	group		3600
	negative-time-to-live	group		60
	suggested-size		group		211
	check-files		group		yes
	enable-cache		hosts		yes
	positive-time-to-live	hosts		3600
	negative-time-to-live	hosts		20
	suggested-size		hosts		211
	check-files		hosts		yes
--- End /etc/nscd.conf
#78920#10
Date:
2000-12-06 15:28:18 UTC
From:
To:
Well if you're not using something like LDAP or NIS for user names, then
nscd is a waste anyway :) I'll have a look at it though. You can however,
try increasing the number of threads for nscd in /etc/nscd.conf.

#78920#15
Date:
2000-12-06 15:51:45 UTC
From:
To:
In libnss-ldap worked for me then I would be using it!  I am still trying to
get it working.

I may experiment with increasing the number of threads, but for the moment
just turning off DNS caching in nscd works best.  I have a caching name
server on 127.0.0.1...

#78920#18
Date:
2004-06-14 20:49:53 UTC
From:
To:
Did you ever find a solution to this problem (#78920)?
--
Thomas

#78920#23
Date:
2004-06-15 01:55:16 UTC
From:
To:
No, but I haven't investigated it for quite a while.
#78920#26
Date:
2004-06-15 01:55:16 UTC
From:
To:
No, but I haven't investigated it for quite a while.
#78920#33
Date:
2007-02-07 14:58:27 UTC
From:
To:
tag 78920 + wontfix
thanks

  I'm trying to cleanse the glibc bugtracker. Does nscd still has the
issues of slowness with heavy DNS traffic nowadays ?

  Also consider that I think it is a wontfix anyway: if you _really_
have heavy DNS traffic then a local caching daemon is what you need,
nscd is more aimed toward caching slow nss backends, not really DNS.

  So please just close the bug if the problem has gone for you, else it
will remain here to state that "nope nscd is not really an efficient DNS
cache daemon" :)

#78920#40
Date:
2015-03-20 13:20:28 UTC
From:
To:
Sehr geehrter Kunde,

das von Ihnen vorliegende Konto wurde im Moment der Abbuchung nicht ausreichend gedeckt um die Lastschrift vorzunehmen. Sie haben eine nicht beglichene Rechnung bei unseren Mandanten GiroPay GmbH.

Aufgrund des andauernden Zahlungsverzug sind Sie gezwungen zuzüglich, die durch unsere Inanspruchnahme entstandenen Kosten von 51,79 Euro zu bezahlen. Wir erwarten die Überweisung bis zum 24.03.2015 auf unser Konto. Namens unseren Mandanten fordern wir Sie auf, die noch offene Forderung schnellstens zu begleichen.

Es erfolgt keine weitere Erinnerung oder Mahnung. Nach Ablauf der festgelegten Frist wird die Akte dem Staatsanwalt und der Schufa übergeben. Die vollständige Forderungsausstellung, der Sie alle Einzelpositionen entnehmen können, fügen wir bei. Für Rückfragen oder Anregungen erwarten wir eine Kontaktaufnahme innerhalb des selben Zeitraums.

Mit verbindlichen Grüßen

Rechnungsstelle Schwartz Lennox