Subject: Re: CVS commit: src
To: Jesse Off <joff@stchome.com>
From: Perry E. Metzger <perry@piermont.com>
List: source-changes
Date: 06/16/2003 12:24:42
The larger question I'm asking is when TCP_NODELAY is actually
appropriate. In general, Nagle's algorithm should run on sockets for
interactive apps like telnet or rlogin, though I suppose that since
rshd is not interactive it is sensible to turn it off (Yes, I've been
convinced of it.)
Does this mean, for example, that scripted FTPs would be much faster
if only we made ftpd set TCP_NODELAY? We have a host of other services
around too that involve semi-interactive protocols.
Part of this is, I don't entirely understand why NODELAY is needed
here in the first place, given the way Nagle's Algorithm is supposed
to work. That isn't to say that I think it doesn't have the effect, I
am just not entirely clear on what the data pattern is that makes it
have that effect and what performance implications it has for our
servers, so I'm not getting why it would have been useful for rshd at
all. (Yes, I understand Nagle's algorithm -- just not why it is having
a performance effect here.)
Perry
Jesse Off <joff@stchome.com> writes:
> I think part of the problem is that applications that use rcmd() don't get
> a socket fd back like the manpage says, but a pipe to a /bin/rcmd process.
> rdist can't setsockopt TCP_NODELAY on that pipe. I'm not sure the logic
> behind that, but trust that there is some reason it was done that way.
>
> One could, however, move the setting of the TCP_NODELAY in rshd to the end
> process (e.g. rdist -Server) since it looks like the server process does
> get the real socket. Would this be more appropriate?
>
> Note that rlogin wasn't affected by this change, just rsh, rcmd, and rshd.
>
> //Jesse Off
>
>
> > matthew green <mrg@eterna.com.au> writes:
> > > Jesse Off <joff@netbsd.org> writes:
> > > > Module Name: src
> > > > Committed By: joff
> > > > Date: Sat Jun 14 22:43:33 UTC 2003
> > > >
> > > > Modified Files:
> > > > src/libexec/rshd: rshd.c
> > > > src/usr.bin/rsh: rsh.c
> > > >
> > > > Log Message:
> > > > use TCP_NODELAY
> > >
> > > Is that correct? I'd say it isn't -- if anything was built for
> >Nagle's
> > > Algorithm it is rsh or telnet. Who reviewed this change?
> > >
> > > rlogin or telnet you mean?
> >
> > Yah, but rlogin is just a front for rsh I believe.
> >
> >
> >actually, rsh without a command is a frontend for rlogin...
>
--
Perry E. Metzger perry@piermont.com