Feature request: fsh-like functionality

Keisial keisial at gmail.com
Fri Jul 23 09:13:43 EST 2010

 Damien Miller wrote:
> On Thu, 22 Jul 2010, Norbert Nemec wrote:
>> * Fast remote command execution
>>     Current timings:
>>        ssh otherhost echo hi  -> 1.06 sec  # regular connection
>>        ssh -f -N -M                        # setting up master
>>        ssh otherhost echo hi  -> 0.86 sec  # using master
>>        fsh otherhost echo hi  -> 2.06 sec  # this sets up the master
>>        fsh otherhost echo hi  -> 0.096 sec # this uses the master
>>     Is there any fundamental reason for the 0.86 sec delay in a slave
>> connection? After all - fsh demonstrates that the same thing can be
>> done in less than 0.1 sec. This makes a significant difference for the
>> applications that I have in mind.
> I don't see this delay - opening a new mux slave is ~0.02 sec on my
> host. Is your "otherhost" distant network-wise? Slave sessions incur
> at least two round-trips between the client and the server, but if you
> have port-forwards specified in your ssh_config then these will cause
> additional delays. Closing channels is also more verbose in the SSH
> protocol, though I don't think there is a round-trip there.

I see a small delay of 0.07s in ssh.

Using fsh, I see one request packet and two response ones.
Using a mastered ssh, there are three request packets and three
response packets.
(I am not counting the ACKs on either case)

A wild guess based on the two-packet response is that ssh is first doing
a round trip for opening a connection, plus an extra 'I am done packet
at the end' whereas fsh skips it completely.

Perhaps ssh could optimistically send the new channel open and the data
sent to it on one packet?

More information about the openssh-unix-dev mailing list