Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- ssh exec overhead
- Linux Doctor
July 29, 2004, 7:23 pm
rate this thread
machine is actually on the same desk as the local, and is connected via
gigabit ethernet. I've noticed that there's some overhead attached to the
remote execution via ssh... presumably from authentication (which is
automatic via .shosts, or no-passphrase-required RSA). The overhead is
significant, in my opinion, at about .3 seconds. That is:
local% time ssh remote sleep 4
typically shows 4.3 wallclock seconds.
On the other hand, using rexec (heaven forbid) does not assess this extra
local% time rexec remote sleep 4
typically shows 4.07 wallclock seconds.
Given that we may rapid-fire these commands from within shell scripts, I
fear the .3 second ssh overhead may cause delays, or even backlog.
Is this delay typical via ssh? Is there a way to avoid it and still
use ssh? Thanks. Neall
- Richard E. Silverman
July 30, 2004, 2:05 am
Re: ssh exec overhead
LD> Given that we may rapid-fire these commands from within shell
LD> scripts, I fear the .3 second ssh overhead may cause delays, or
LD> even backlog.
LD> Is this delay typical via ssh? Is there a way to avoid it and
LD> still use ssh? Thanks. Neall
OpenSSH supports GSSAPI/Kerberos-5 for both server and user
authentication. This is much faster as it removes some expensive
public-key operations from both sides.
Re: ssh exec overhead
That seems roughly right for OpenSSH on PC-class hardware. See:
You can use one connection and invoke multiple sessions over it.
OpenSSH's server has had this capability for a while but support for
it was only recently added to the development version. Other SSH
software may or may not have equivalent capability (but it's certainly
in the spec).
Discussion about this:
$ time ssh localhost sleep 4
$ time ssh -S ~/.ssh/sock localhost sleep 4
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
- — Next thread in » Secure Shell Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum