Red Hat Bugzilla – Bug 320281
in.rlogind performance issues
Last modified: 2008-08-04 00:34:58 EDT
Description of problem: rsh connections take 30 to 45 seconds to connect
Version-Release number of selected component (if applicable): we've tested on
rhel3 u5 and rhel4 u5. the problem exists on both.
How reproducible: connect via rsh
Steps to Reproduce:
Actual results: connection takes as long as 45 seconds though the avg is 30.
- If the client is listed first in hosts.equiv, rlogind continues to scan/check
every entry in hosts.equiv even though a match has already been found.
- if 'files' is used in nsswitch.conf coupled with a large /etc/hosts file,
then the entire files contects are read for every entry in /etc/hosts.equiv -
this results in huge wait times on the read() syscall.
Reassigning to proper owner
As far as I know glibc is responsible for parsing hosts file. Reassigning to
glibc for inspection
There won't be any change to make this faster.
The claim that we do work beyond the point where we already know there is a match is not true. It might appear so from the logs or strace output but it isn't the case.
It is theoretically possible to make the code faster. But since the host database is handled using NSS it would require a special, new NSS function. And probably it would only work if all NSS modules have this support. Adding such a NSS function is no small feat. Given that hosts.equiv really shouldn't be used I don't think it is worth it _at all_.