Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 241945 - RHEL 4.4 nscd not (apparently) caching anything
RHEL 4.4 nscd not (apparently) caching anything
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2007-05-31 16:55 EDT by Neil Doane
Modified: 2016-11-24 10:52 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-31 17:07:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
a script to exercise nscd by repeatedly querying the passwd & group tables (610 bytes, application/octet-stream)
2007-05-31 16:55 EDT, Neil Doane
no flags Details

  None (edit)
Description Neil Doane 2007-05-31 16:55:08 EDT
Description of problem:
nscd does not appear to be caching anything in RHEL 4.4.

Version-Release number of selected component (if applicable):

How reproducible:
Every time.

Steps to Reproduce:
1.In /etc/nscd.conf, enable logging to /var/log/nscd.log and set debug level to 99
2. Restart nscd
3. Run attched perl script
Actual results:
grep 'GETPWBYNAME' /var/log/nscd.log | wc -l
...will show positive values after running script, however...
The output of 'nscd -g' will show 
 0% cache hit rate

Expected results:
'nscd -g' should show a 99% (or 100%) cache hit rate 

Additional info:
This works fine on RHEL 3
Comment 1 Neil Doane 2007-05-31 16:55:09 EDT
Created attachment 155842 [details]
a script to exercise nscd by repeatedly querying the passwd & group tables
Comment 2 Neil Doane 2007-05-31 17:04:54 EDT
Same results with nscd-2.3.4-2.36 as well.
Comment 3 Jakub Jelinek 2007-05-31 17:07:52 EDT
In RHEL4 nscd.conf defaults to shared yes and persistent yes for all databases.
This means that nscd's cache is read-only mapped in applications and they
search the cache directly instead of asking nscd to do the cache search
for them.  Only when a request (or a negative search entry) is not found in
the cache, apps ask nscd over the socket and nscd does the search and adds it to
the cache.  nscd -g stats only report requests that actually made it to nscd,
it can't see requests answered just by cache search within the applications.

Note You need to log in before you can comment on or make changes to this bug.