9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Micah Stetson <micah@cnm-vra.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] dumb question
Date: Wed, 26 Jun 2002 15:07:13 -0700	[thread overview]
Message-ID: <20020626150713.A10838@cnm-vra.com> (raw)
In-Reply-To: <Pine.SOL.3.96.1020626105715.813B-100000@teach.ic.ucsc.edu>; from astitt@cats.ucsc.edu on Wed, Jun 26, 2002 at 11:27:07AM -0700

> Im sorry if im sounding like a troll, or if it seems like im flaming, but
> seriously, whats up with this? ive no problem anymore with cp being as
> simple as it is, in fact I like that idea, but i hold efficiency high
> also. My soon to be plan 9 network isnt made of superfast zigahertz cpus.
> Alternative OS's are my hobby, that said im not a funded computer lab, i
> do this in my spare time with computers Ive salvaged and inherited. That
> said maybe you wont notice how long it takes on a superfast computer, but
> on older slower computers its unacceptable. Of course if we simply pass
> off the idea of efficiency with the excuse that computers are getting
> faster is no excuse, 300 mhz used to be undreamed of speed, but now we've
> given way to in-efficient, kludged together solutions, and computers
> appear no faster now then they did 10 years ago. anyways, im done ranting.
> tar |tar no matter how you want to argue it is not a particularly
> efficient or simple solution.

In an effort to debunk this paragraph, I ran a few tests.  I
used kenji's cpdir and rsc's dircp to copy a directory
tree of about 100M both locally and remotely.  I've only run
the tests a couple of times, but the numbers didn't vary much.

Here are the numbers for the few tests I ran, the local machine
is a 633Mhz Celeron running 4th Ed., the remote is a 120Mhz
Pentium running u9fs on Linux (I don't have a real fileserver).
I don't this this network can be accused of using 'zigahertz'
equipment.  8.out is Kenji's cpdir.

Local kfs -> Local kfs
----------------------

term% time 8.out doc foo
0.56u 13.48s 338.82r 	 8.out doc foo  # status= main
term% time 8.out doc foo
0.50u 14.08s 338.56r 	 8.out doc foo  # status= main

term% time dircp doc foo
2.39u 37.37s 316.66r 	 dircp doc foo
term% time dircp doc foo
2.55u 37.41s 322.92r 	 dircp doc foo

Local kfs -> Remote u9fs
------------------------

term% time dircp doc /n/cephas/home/micah/foo
1.45u 27.48s 425.44r 	 dircp doc /n/cephas/home/micah/foo
term% time dircp doc /n/cephas/home/micah/foo
1.11u 27.33s 421.52r 	 dircp doc /n/cephas/home/micah/foo
term% time dircp doc /n/cephas/home/micah/foo
1.58u 26.71s 422.80r 	 dircp doc /n/cephas/home/micah/foo

term% time 8.out doc /n/cephas/home/micah/foo
0.10u 7.72s 119.46r 	 8.out doc /n/cephas/home/micah/foo  # status= main
term% time 8.out doc /n/cephas/home/micah/foo
0.12u 7.75s 117.92r 	 8.out doc /n/cephas/home/micah/foo  # status= main

Remote u9fs -> Remote u9fs
--------------------------

term% time /usr/micah/8.out foo bar
0.17u 6.58s 163.85r 	 /usr/micah/8.out foo bar  # status= main

term% time dircp foo bar
1.43u 33.91s 730.83r 	 dircp foo bar

I was floored.  I haven't any clue why dircp is so slow.  But I
knew the arguments against using archive programs connected with
a pipe were unjustifiable, so I rewrote dircp to use mkfs and
mkext:

#!/bin/rc

switch($#*){
case 2
	# mkfs is too chatty, is there a quiet mode?
	@{cd $1 && disk/mkfs -a -s . <{echo '+'} >[2]/dev/null}|@{cd $2 && disk/mkext -d . >[2]/dev/null}
case *
	echo usage: dircp from to >[1=2]
}

And here are my results with this (calling it mydircp):

Local kfs -> Local kfs
----------------------
term% time mydircp doc foo
3.44u 19.44s 240.70r 	 mydircp doc foo

That's about 30% faster than cpdir (real time).

Remote u9fs -> Remote u9fs
--------------------------
term% time mydircp foo bar
2.23u 13.54s 273.04r 	 mydircp foo bar

This one's 66% slower than cpdir (don't know why), but it's a good
even and a half MINUTES faster than the tar version.

Local kfs -> Remote u9fs
-------------------
term% time mydircp doc /n/cephas/home/micah/foo
2.41u 12.14s 68.08r 	 mydircp doc /n/cephas/home/micah/foo
term% time mydircp doc /n/cephas/home/micah/foo
2.70u 12.55s 67.56r 	 mydircp doc /n/cephas/home/micah/foo

Here's the gem.  I think this takes real advantage of having
two communicating processes.  It's nearly twice as fast as
cpdir and six or seven times as fast as dircp.

My question is, is there a reason to use tar over mkfs/mkext, and
why is tar so slow?  Also, does anyone have an explanation for
why Remote->Remote is slower with mydircp while Local->Remote is
so much faster?

Micah



  parent reply	other threads:[~2002-06-26 22:07 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-26 23:08 forsyth
     [not found] ` <171e27d5f2cfd12a9303117e58818e5b@plan9.bell-labs.com>
2002-06-26 18:27   ` Andrew Stitt
2002-06-26 17:39     ` Sam
2002-06-27  9:17       ` Andrew Stitt
2002-06-27  9:33         ` Ish Rattan
2002-06-27  9:59         ` Lucio De Re
2002-06-27 10:05           ` Boyd Roberts
2002-06-27 10:21             ` Lucio De Re
2002-06-27 15:40           ` Douglas A. Gwyn
2002-06-27 16:57             ` Lucio De Re
2002-06-28  8:45               ` Douglas A. Gwyn
2002-06-28  9:31               ` Boyd Roberts
2002-06-28 14:30                 ` Douglas A. Gwyn
2002-06-28 15:06                   ` Boyd Roberts
2002-07-01  9:46                   ` Ralph Corderoy
2002-06-27 15:36       ` Douglas A. Gwyn
2002-06-27 15:12         ` Sam
2002-06-28  8:44           ` Douglas A. Gwyn
2002-06-26 22:07     ` Micah Stetson [this message]
2002-06-26 22:59       ` Chris Hollis-Locke
2002-06-27  0:03         ` Micah Stetson
2002-06-27  0:44           ` Micah Stetson
2002-06-27  9:17     ` Ralph Corderoy
2002-06-27  9:48       ` Boyd Roberts
2002-06-27 10:07         ` John Murdie
2002-06-27 15:40         ` Douglas A. Gwyn
  -- strict thread matches above, loose matches on Subject: below --
2003-07-15  0:37 [9fans] Dumb question Dan Cross
2003-07-15  3:23 ` boyd, rounin
2002-07-05  9:43 [9fans] dumb question Geoff Collyer
2002-07-01 11:03 rog
2002-07-02  8:53 ` Douglas A. Gwyn
     [not found] <rob@plan9.bell-labs.com>
2002-06-28 16:49 ` rob pike, esq.
2002-06-29  2:23   ` Scott Schwartz
2002-06-28 16:39 rob pike, esq.
2002-06-28 16:31 rog
2002-06-28 16:14 rob pike, esq.
2002-06-28 14:10 rob pike, esq.
2002-06-28 15:42 ` Douglas A. Gwyn
2002-06-28 14:08 rog
2002-06-28  7:52 Fco.J.Ballesteros
2002-06-27 22:59 Geoff Collyer
2002-06-28  4:32 ` Lucio De Re
2002-06-27 18:38 forsyth
2002-06-28  8:45 ` Douglas A. Gwyn
2002-06-27 17:07 rog
2002-06-27 17:07 forsyth
2002-06-27 16:33 ` Sam
2002-06-27 14:43 Richard Miller
2002-06-27 14:33 forsyth
2002-06-27 13:20 rob pike, esq.
2002-07-05  9:07 ` Maarit Maliniemi
2002-06-27 13:19 rob pike, esq.
2002-06-27 13:21 ` david presotto
2002-06-27 15:40 ` Douglas A. Gwyn
2002-06-27 12:27 rog
2002-06-27 12:12 Fco.J.Ballesteros
2002-06-27 12:06 Fco.J.Ballesteros
2002-06-27 11:13 ` Sam
2002-06-27 11:15   ` Sam
2002-06-27 10:29 nigel
2002-06-27  9:44 Stephen Parker
2002-06-27  9:43 Fco.J.Ballesteros
2002-06-27  9:36 Fco.J.Ballesteros
2002-06-27  1:22 okamoto
2002-06-27  1:05 okamoto
2002-06-26 19:04 rog
2002-06-26 19:00 Warrier, Sadanand (Sadanand)
2002-06-27  0:13 ` Steve Arons
2002-06-26 18:41 forsyth
2002-06-26 18:40 David Gordon Hogan
2002-06-26 17:53 rog
2002-06-26 17:45 rob pike, esq.
2002-06-27  9:16 ` Andrew Stitt
2002-06-27  9:17 ` Douglas A. Gwyn
2002-06-26 19:53   ` arisawa
2002-06-27 11:43   ` Ralph Corderoy
2002-06-27 11:04     ` Sam
2002-06-26  8:55 Stephen Parker
2002-06-26 17:18 ` Andrew Stitt
     [not found] <nemo@plan9.escet.urjc.es>
2002-06-25 17:06 ` Fco.J.Ballesteros
2002-06-25 18:01   ` Scott Schwartz
2002-06-26  8:41   ` Andrew Stitt
2002-06-26  9:14     ` Nigel Roles
2002-06-26 17:41       ` Andrew Stitt
2002-06-26 16:08         ` Ish Rattan
2002-06-25 16:48 Andrew Stitt
2002-06-26  8:45 ` arisawa
2002-06-26 17:36   ` Andrew Stitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020626150713.A10838@cnm-vra.com \
    --to=micah@cnm-vra.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).