Dreadful tar with remote device

Nik Clayton nik at freebsd.org
Sun Aug 13 20:47:11 BST 2000

On Fri, Aug 11, 2000 at 11:46:45AM +0100, Jon Schneider wrote:
> I have a new 4.1 installation but found my backup was stonkingly slow.
> It (as it used to when the machine ran linux) pumps data to a tape
> drive on another machine. After a few experiments I found that the
> problem lies not with rsh but with tar itself.
> I think the following speaks for itself. The machine is a P233MMX.


Diddle your tar blocksize.  I just tried similar experiments with a 
5MB file.

   % /usr/bin/time rcp large localhost:/tmp
           0.62 real         0.00 user         0.08 sys

   % /usr/bin/time tar cf localhost:/tmp/large.tar large
          51.02 real         0.00 user         0.31 sys

   % /usr/bin/time tar cbf 500 localhost:/tmp/large.tar large
           2.93 real         0.00 user         0.07 sys

Larger block sizes yield shorter times, until your blocksize completely
covers the size of the file.

Just for kicks, I tried an alternate approach:

   % /usr/bin/time tar cf - large | rsh localhost cat - ">" /tmp/large.tar
           0.96 real         0.00 user         0.07 sys

   % /usr/bin/time tar cbf 500 - large | rsh localhost cat - ">" /tmp/large.tar
           0.88 real         0.01 user         0.06 sys

which is about as close as you're going to get to the rcp(1) performance
given tar(1)'s overhead.

Make sense?

Internet connection, $19.95 a month.  Computer, $799.95.  Modem, $149.95.
Telephone line, $24.95 a month.  Software, free.  USENET transmission,
hundreds if not thousands of dollars.  Thinking before posting, priceless.
Somethings in life you can't buy.  For everything else, there's MasterCard.
  -- Graham Reed, in the Scary Devil Monastery

More information about the Ukfreebsd mailing list