how to speed up OpenSSH command execution (and a speed analysis)

Christoph Anton Mitterer calestyo at scientia.net
Wed Mar 28 09:17:51 EST 2012


Hi.

I digged a bit deeper...

On Sun, 2012-03-25 at 23:27 +0200, Ángel González wrote:
> Maybe your nrpe command behaves differently if it is run with a
> pseudo-terminal ?
It's not the command on the other side... it's actually SSH... (though I
still don't know why).


Find attached several time measurement logs.

The 1st column is always the real time from bash's builtin version of
time (which is a bit different from the time binary).
The 2nd column is what ssh -V gives on the respective remote host.
The 3rd column is just the name of the remote host.
The output is sorted with sort (i.e. by the first column).

ControlMaster was always auto .
ControlPersist was always 1d .



* RequestTTY_<foo>.log
In those cases, a ~/.ssh/config contained RequestTTY <foo>.
The first connection was started WITHOUT "-t".
Then the measurements were done in subsequent connections (I always made
several and the values were then basically the same).
Afterwards I killed all multiplexer ssh processes.

=> As you can see, even without "-t" on the first connection, I get up
to the 0.007s BUT only for ssh version > 5.x
So something must have changed between 4.x and 5.x

=> I thought RequestTTY would correspond to -t ... but as I tried all
the options for the former, and ssh versions 4.x got never as fast as
5.x ... there must be "more" behind -t.




* no_RequestTTY_but_-t_set.log
This is the same as above, except:
~/.ssh/config did NOT contain RequestTTY.
The first connection was started WITH "-t".

=> As you see, this time,.. even 4.x versions become fast.



Any ideas?


Chris.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logs.tar.bz2
Type: application/x-bzip-compressed-tar
Size: 1362 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20120328/026c0bd7/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5677 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20120328/026c0bd7/attachment-0003.bin>


More information about the openssh-unix-dev mailing list