On Nov 19 2007, 11:06 pm, Joe Pfeiffer <pfeif...@cs.nmsu.edu> wrote:
> Have you actually performed any measurements showing the overhead of
> encryption is noticeable?
I have.
I have a script which generates data and another script which reads it
and times how long it took for the data to arrive. These scripts also
know how to send data over a socket, to emulate what the performance
of an unencrypted SSH stream might be.
When stdout of the writer is connected directly to stdin of the
reader, I get an average speed on a 60-second test of 128MB/s.
When the writer is connected to the reader on a TCP/IP socket over
127.0.0.1, I get an average speed of 118MB/s.
When the writer is connected to the reader over an SSH connection to
127.0.0.1 using the arcfour cipher (the fastest available cipher,
according to my experiments), I get an average speed of 16MB/s. Note
that this is with a single 2.4GHz CPU.
In other words, the encrypted transfer speed is *** 86% SLOWER ***
than the unencrypted transfer speed.
If I put the reader and writer on different hosts to spread the CPU
load of encrypting and decrypting across two hosts instead of one,
then I get an average speed of 30MB/s, which is still 74% slower than
the unencrypted transfer speed.
You might not notice this if you're on a 10Mbit or even 100Mbit
network, since SSH can still encrypt and decrypt faster than the data
can be transferred over the network. But when you're on a gigabit
LAN, you are surely not going to be happy abuot the fact that your
transfer that should be going at around 100MB/s is instead going at
30.
Early versions of SSH had the "-e none" option to disable encryption
on the data channel. I have always regretted that this option was
removed, and I've never understood why. I mean, I could obviously
understand not making it the default. I could even understand
requiring that it be specified on the command line, i.e., not allowing
it to be set in the config file, if you wanted to be extra-paranoid
about making sure that people understand what they're doing when they
create a connection without encryption. But removing the option
entirely? I think that sucks, and I wish the maintainers of OpenSSH
would put it back.
When I'm transferring a file over my LAN, I don't need the file to be
encrypted. I just need a secure way to authenticate to the other end
when initiating the transfer.
|