On Fri, 27 Aug 2010, Adam Morris wrote:

> On Fri, Aug 27, 2010 at 03:00:53PM -0500, Mike Miller wrote:
>
>> Related question:  I'm pretty sure there's a way to pipe the stdout to 
>> ssh and have it transfer to /dev/null on the other end so that you can 
>> compare speeds for arbitrarily large transfers without making files. 
>> Anyone know?
>>
>> dd if=/dev/zero bs=1024k count=4000 | ssh ...
>>
>> I think if you were to make your file much bigger, maybe several 
>> gigabytes, you'd see a big benefit of compression.  It's not a 
>> realistic example though because your file is just the same null 
>> character repeated a gazillion times.  So, on your network, running at 
>> 250 Mbps or so, you probably never want to use compression.
>
> I believe that copying to /dev/null would go so quickly that it wouldn't 
> be a valid test.

I don't mean to copy to /dev/null on the same machine.  I mean that you 
generate data using dd and /dev/zero on one machine, send that to stdout, 
catch it with ssh and send it to a second machine where it is received 
into /dev/null on that machine.  That is without compression.  The second 
test does the same thing except that it uses ssh with -C option.  For a 
third comparison you could use gzip -c on the sending machine and gunzip 
-c on the receiving machine.

The idea is to test the transfer speed for gigabytes of data without 
having to use any HDD space.

Mike