From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,98f520a49a665426,start X-Google-Attributes: gid111c93,public From: Bruce Allen Subject: why is rsh so slow the second time? Date: 1998/05/25 Message-ID: <3569F061.B026714A@dirac.phys.uwm.edu>#1/1 X-Deja-AN: 356460370 Content-Type: multipart/alternative; boundary="------------84C9A09C81B38980763E3FE2" Organization: University of Wisconsin - Milwaukee, Physics Department Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha --------------84C9A09C81B38980763E3FE2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here is a peculiar thing which is slowing down life on our beowulf... If we do rsh from machine A to machine B, the response is instantaneous If (right away) we do another rsh from machine A to machine B, there is a ten-second pause before any response! This is not because machine B is loaded, or for any other obvious reason. If we wait more than about 60 seconds, the response to rsh is instantaneous again. So -- my question. When machine B gets the rsh request, it starts /usr/sbin/in.rshd which then deals with the request. My theory is that in.rshd sticks around for a little while after the first rsh command is over, and that this is the cause for the delay. My theory is that starting rsh after a quiescent period starts a new copy of in.rshd and that this copy responds quickly, but that starting rsh after just finishing another rsh makes use of the old in.rshd, and that it responds slowly. >From watching the networking switches light up, the second (slow) rsh request gets to machine B right away, but machine B does not respond right away. Or perhaps this is related to the PAM authentication... Authorization is coming from /etc/hosts.equiv. Relevant file snippets below. Could anyone comment? I would like to read the source code for in.rshd but don't know where to find it -- any suggesstions where to find the source code? Comments / opinions / random thoughts cheerfully welcomed! Thanks! Bruce Allen ------------------------------------------------------------------------ >From /etc/inetd.conf: shell stream tcp nowait root /usr/sbin/tcpd in.rshd ------------------------------------------------------------------------ from /etc/pam.d/rsh: #%PAM-1.0 auth required /lib/security/pam_rhosts_auth.so auth required /lib/security/pam_nologin.so account required /lib/security/pam_pwdb.so session required /lib/security/pam_pwdb.so ------------------------------------------------------------------------ --------------84C9A09C81B38980763E3FE2 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Here is a peculiar thing which is slowing down life on our beowulf...

If we do rsh from machine A to machine B, the response is instantaneous
If (right away) we do another rsh from machine A to machine B, there is a ten-second pause before any response!

This is not because machine B is loaded, or for any other obvious reason.

If we wait more than about 60 seconds, the response to rsh is instantaneous again.

So -- my question.  When machine B gets the rsh request, it starts /usr/sbin/in.rshd
which then deals with the request.  My theory is that in.rshd sticks around for a little while after
the first rsh command is over, and that this is the cause for the delay.  My theory is that starting
rsh after a quiescent period starts a new copy of in.rshd and that this copy responds quickly, but that
starting rsh after just finishing another rsh makes use of the old in.rshd, and that it responds slowly.

From watching the networking switches light up, the second (slow) rsh request gets to machine B right
away, but machine B does not respond right away.

Or perhaps this is related to the PAM authentication...
Authorization is coming from /etc/hosts.equiv.  Relevant file snippets below.

Could anyone comment?  I would like to read the source code for in.rshd but don't know where to
find it -- any suggesstions where to find the source code?

Comments / opinions / random thoughts cheerfully welcomed!

Thanks!
    Bruce Allen


From /etc/inetd.conf:

shell   stream  tcp     nowait  root    /usr/sbin/tcpd  in.rshd



from /etc/pam.d/rsh:
#%PAM-1.0
auth       required     /lib/security/pam_rhosts_auth.so
auth       required     /lib/security/pam_nologin.so
account    required     /lib/security/pam_pwdb.so
session    required     /lib/security/pam_pwdb.so


 
 
  --------------84C9A09C81B38980763E3FE2-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,98f520a49a665426 X-Google-Attributes: gid111c93,public From: chrnadig@iiic.ethz.ch (Christoph Nadig) Subject: Re: why is rsh so slow the second time? Date: 1998/05/26 Message-ID: <6kdq4b$aeq@raf30.iiic.ethz.ch>#1/1 X-Deja-AN: 356557637 References: <3569F061.B026714A@dirac.phys.uwm.edu> Organization: Dept. Informatik, Swiss Federal Institute of Technology Newsgroups: comp.os.linux.alpha In article <3569F061.B026714A@dirac.phys.uwm.edu>, Bruce Allen wrote: >If we do rsh from machine A to machine B, the response is instantaneous >If (right away) we do another rsh from machine A to machine B, there is >a ten-second pause before any response! I observed this as well. In my case, it was a problem of the DNS installed on machine B (no reverse lookups possible). After correcting this, everything works normally. Cheers, Chris -- -- chrnadig@iiic.ethz.ch From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,98f520a49a665426 X-Google-Attributes: gid111c93,public From: Bruce Allen Subject: Re: why is rsh so slow the second time? Date: 1998/05/26 Message-ID: <356AE1AC.39E62DA@dirac.phys.uwm.edu>#1/1 X-Deja-AN: 356653582 Content-Transfer-Encoding: 7bit References: <3569F061.B026714A@dirac.phys.uwm.edu> <6kdq4b$aeq@raf30.iiic.ethz.ch> To: Christoph Nadig Content-Type: text/plain; charset=us-ascii Organization: University of Wisconsin - Milwaukee, Physics Department Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Christoph Nadig wrote: > Bruce Allen wrote: > > >If we do rsh from machine A to machine B, the response is instantaneous > >If (right away) we do another rsh from machine A to machine B, there is > >a ten-second pause before any response! > > I observed this as well. In my case, it was a problem of the DNS installed > on machine B (no reverse lookups possible). After correcting this, > everything works normally. Chris, thanks for the advice. I'll look into this. I'm a bit puzzled though, because machine B is on a private subnet, and has DNS disabled (it's only using /etc/hosts). So, machine B has a complete /etc/hosts file listing all machines that will ever contact it. machine B has NO /etc/resolv.conf file machine B has /etc/host.conf reading: order hosts multi on so I have deliberately turned off any DNS services. Is this what is causing my slow response? I am not very informed about networking so I may be asking something stupid or obvious! Cheers, Bruce Allen From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,98f520a49a665426 X-Google-Attributes: gid111c93,public From: "His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated" Subject: Re: why is rsh so slow the second time? Date: 1998/05/27 Message-ID: #1/1 X-Deja-AN: 356908143 Sender: xenophon@deneb X-PGP-Key-URL: References: <3569F061.B026714A@dirac.phys.uwm.edu> <6kdq4b$aeq@raf30.iiic.ethz.ch> <356AE1AC.39E62DA@dirac.phys.uwm.edu> X-yow: My polyvinyl cowboy wallet was made in Hong Kong by Montgomery Clift! Comments: Hyperble mail buttons accepted, v04.01. X-Home-URL: X-Face: meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow X-Attribution: XF Reply-To: econommx@cs.rose-hulman.edu X-Disclaimer: My attitude is this. I'm full of it. If you listen to me, that's your problem. X-Day: Sun, 05 Jul 1998 07:00:00 X-Linux: Proud user of Linux since August 1994! Organization: First Church of B1FF and BRAK! (Reformed) Warnings-to: econommx@cs.rose-hulman.edu X-PGP-Key-ID: Length=1024; ID=0x44C9F871; Fprint="0F EF 86 8F 6C AB 19 63 E8 D7 A6 98 86 34 C2 DD" Newsgroups: comp.os.linux.alpha >>>>> "BA" == Bruce Allen writes: BA> Chris, thanks for the advice. I'll look into this. I'm a bit BA> puzzled though, because machine B is on a private subnet, and BA> has DNS disabled (it's only using /etc/hosts). The resolver routines don't seem to look at /etc/hosts at all! I am running an experimental name server on my Alpha; it seems to be configured sanely. However, no matter what I do, I cannot lookup localhost on my system: [root@nemesis named]# host localhost Host not found. [root@nemesis named]# host localhost. Host not found. [root@nemesis named]# dnsquery localhost Query failed (h_errno = 1) : Unknown host [root@nemesis named]# dnsquery localhost. Query failed (h_errno = 1) : Unknown host [root@nemesis named]# nslookup localhost Server: nemesis.irtnog.org Address: 192.168.0.2 *** nemesis.irtnog.org can't find localhost: Non-existent host/domain [root@nemesis named]# nslookup localhost. Server: nemesis.irtnog.org Address: 192.168.0.2 *** nemesis.irtnog.org can't find localhost.: Non-existent host/domain [root@nemesis named]# However, on one of the school's SPARCstations: deneb:~>nslookup localhost Server: pandora.rose-hulman.edu Address: 137.112.4.196 Non-authoritative answer: Name: localhost Address: 127.0.0.1 deneb:~> My /etc/hosts: 127.0.0.1 localhost localhost.localdomain 192.168.0.2 nemesis nemesis.irtnog.org 192.168.0.3 thomas thomas.irtnog.org My /etc/host.conf: # /etc/host.conf # We have named running, but no NIS order hosts bind # Allow multiple addrs multi on # Guard against spoof attempts nospoof on alert on The relevant section of /etc/nsswitch.conf: hosts: files dns And /etc/named.boot: directory /var/named cache . named.ca primary irtnog.org named.hosts primary 0.168.192.in-addr.arpa named.rev primary 0.0.127.in-addr.arpa named.local Of course, reverse lookups of 127.0.0.1 work correctly. -- His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated Discordian Episkopos of Ambidextrous Thinking and Licensed SubGenius Minister "I saw weird stuff in that place last night---weird, strange, sick, twisted, eerie, godless, *evil* stuff! And I want in!" --Homer Simpson From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,98f520a49a665426 X-Google-Attributes: gid111c93,public From: peltz@jaka.ece.uiuc.edu (Steve Peltz) Subject: Re: why is rsh so slow the second time? Date: 1998/06/02 Message-ID: <6l1lme$h9i$1@jaka.ece.uiuc.edu>#1/1 X-Deja-AN: 358898668 References: <3569F061.B026714A@dirac.phys.uwm.edu> <6kdq4b$aeq@raf30.iiic.ethz.ch> <356AE1AC.39E62DA@dirac.phys.uwm.edu> Organization: NovaNET Learning, Inc. Newsgroups: comp.os.linux.alpha In article <356AE1AC.39E62DA@dirac.phys.uwm.edu>, Bruce Allen wrote: >machine B has NO /etc/resolv.conf file >machine B has /etc/host.conf reading: > order hosts > multi on >so I have deliberately turned off any DNS services. Is this what is >causing my slow response? What about nsswitch.conf? I believe host.conf is not used at all by the newer resolver library (in glibc), regardless of what the man pages may say. From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,98f520a49a665426 X-Google-Attributes: gid111c93,public From: Bruce Allen Subject: Re: why is rsh so slow the second time? Date: 1998/06/03 Message-ID: <35753A20.AD565C0C@dirac.phys.uwm.edu>#1/1 X-Deja-AN: 359109941 References: <3569F061.B026714A@dirac.phys.uwm.edu> <6kdq4b$aeq@raf30.iiic.ethz.ch> <356AE1AC.39E62DA@dirac.phys.uwm.edu> <6l1lme$h9i$1@jaka.ece.uiuc.edu> Content-Type: multipart/alternative; boundary="------------FE134761B216CCB3448B3CAD" Organization: University of Wisconsin - Milwaukee, Physics Department Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha --------------FE134761B216CCB3448B3CAD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Steve Peltz wrote: > >machine B has NO /etc/resolv.conf file > >machine B has /etc/host.conf reading: > > order hosts > > multi on > >so I have deliberately turned off any DNS services. Is this what is > >causing my slow response? > > What about nsswitch.conf? I believe host.conf is not used at all by the > newer resolver library (in glibc), regardless of what the man pages may > say. Steve, I like the way that this sounds -- I didn't even know about nsswitch.conf -- just looked at it for the first time. Could you tell me where it is used (I can't find it refered to in either man pages or in /etc/rc.d/*/*. Here it the file on my machine: passwd: files nisplus nis shadow: files nisplus nis group: files nisplus nis hosts: files nisplus nis dns services: nisplus [NOTFOUND=return] files networks: nisplus [NOTFOUND=return] files protocols: nisplus [NOTFOUND=return] files rpc: nisplus [NOTFOUND=return] files ethers: nisplus [NOTFOUND=return] files netmasks: nisplus [NOTFOUND=return] files bootparams: nisplus [NOTFOUND=return] files netgroup: nisplus publickey: nisplus automount: files nisplus aliases: files nisplus As you have probably guessed, we are not using either NIS or NISPLUS. So do I assume correctly that I should put "files" as the first entry on each line and eliminate everything else? Could you tell me what the [NOTFOUND=return] lines mean? Cheers, Bruce --------------FE134761B216CCB3448B3CAD Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Steve Peltz wrote:
>machine B has NO /etc/resolv.conf file
>machine B has /etc/host.conf reading:
>    order hosts
>    multi on
>so I have deliberately turned off any DNS services.    Is this what is
>causing my slow response?

What about nsswitch.conf? I believe host.conf is not used at all by the
newer resolver library (in glibc), regardless of what the man pages may
say.

Steve, I like the way that this sounds -- I didn't even know about nsswitch.conf -- just looked at it
for the first time.  Could you tell me where it is used (I can't find it refered to in either man pages
or in /etc/rc.d/*/*.  Here it the file on my machine:

passwd:     files nisplus nis
shadow:     files nisplus nis
group:      files nisplus nis
hosts:      files nisplus nis dns
services:   nisplus [NOTFOUND=return] files
networks:   nisplus [NOTFOUND=return] files
protocols:  nisplus [NOTFOUND=return] files
rpc:        nisplus [NOTFOUND=return] files
ethers:     nisplus [NOTFOUND=return] files
netmasks:   nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
netgroup:   nisplus
publickey:  nisplus
automount:  files nisplus
aliases:    files nisplus

As you have probably guessed, we are not using either NIS or NISPLUS.  So do I assume correctly that
I should put "files" as the first entry on each line and eliminate everything else?  Could you tell me what
the [NOTFOUND=return] lines mean?

Cheers,
    Bruce --------------FE134761B216CCB3448B3CAD--