9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Andrew Stitt <astitt@cats.ucsc.edu>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] dumb question
Date: Thu, 27 Jun 2002 09:16:50 +0000	[thread overview]
Message-ID: <Pine.SOL.3.96.1020626115705.5163A-100000@teach.ic.ucsc.edu> (raw)
In-Reply-To: <d1e338bf88fa75c556b45bd0811040fa@plan9.bell-labs.com>

On Wed, 26 Jun 2002, rob pike, esq. wrote:

> > i beg to differ, tar uses memory, it uses system resources, i fail to see
> > how you think this is just as good as just recursively copying files. The
> > point is I shouldnt have to needlessly use this other program (for Tape
> > ARchives) to copy directorys. If this is on a fairly busy file server
> > needlessly running tar twice is simply wasteful and unacceptable when you
> > could just follow the directory tree.
>
> The command
> 	tar c ... | tar x ...
> will have almost identical cost to any explicit recursive copy, since
> it does the same amount of work.  The only extra overhead is writing

it does not do the same amount of work, it runs two processes which use at
least two pages instead of one, it also runs all the data through some
sort of algorithm to place it into an archive, then immediate reverse the
same algorithm to remove it, i dont see whats so complicated about this
concept, it needlessly processes the data. Im sure if you read and wrote
in parrallel using two processes itd be faster, guess what would be even
faster? parallel cp, why? cp doesnt archive then dearchive, its as simple
as that. i can almost guarentee you that tar-c|tar -x uses more clock
cycles then cp, why? two processes both are simulataneously packing and
unpacking data for a _local_ transfer. in reality the work ought to be
done mostly by a dma controller which simply copys sectors from one
location to another, then the other activities of adding inodes or table
entries etc should be done in parallel, you have to remember that IO is
done in the background because it is slow, with tar you have to at least
move the data into some pages in memory, processes it, then run it through
a device, where it gets copied into another processes address space, then
processed then written to disk. If im copying a large directory tree im
going to get a serious performance hit for that. If i can just have a well
written cp program deal with having the disk simply copy some sectors
around, hopefully with dma, thats going to be faster. maybe on your newer
faster computers the difference is so small "who cares" but thats what
keeps processor manufactuerers in business, cutting corners like that. you
keep replacing speed with blind simplicity and 2 months later your
hardware is obsolete, so you buy new faster hardware which now runs all
your older kludge fast enough, so you cut corners on the new stuff. take
microsoft for example. they wrote windows 95, which iirc runs reasonably
well on even a mere 386, now we've got win xp, which has several hundred
mhz as the minimum required speed! yet how much does it really add to the
mix? the UI is nearly the same, sure its got some bells and whistles but
you can take that away. I wouldnt dare try it on a 386 (much less use the
cd as more then a coaster but anyways) run win95 on a p4, yea its pretty
darn fast, compare to winxp on a p4? i doubt you're going to get the same
performance out of it. im extreme i know, but seriously, my points follow
logically, tar|tar is not a more efficient solution, nor is it in any way
acceptable. sure i may not do cp -R a lot, but when youve got 50-100
people using your network maybe they will? either way, its a complete
waste of resources that can be better used elsewhere. can someone tell me
whats so difficult to see about that?

> to and reading from the pipe, which is so cheap - and entirelylocal -
> that it is insignificant.
>
> Whether you cp or tar, you must read the files from one tree and write
> them to another.
>
> -rob


  reply	other threads:[~2002-06-27  9:16 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-26 17:45 rob pike, esq.
2002-06-27  9:16 ` Andrew Stitt [this message]
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
  -- 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 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
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
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  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=Pine.SOL.3.96.1020626115705.5163A-100000@teach.ic.ucsc.edu \
    --to=astitt@cats.ucsc.edu \
    --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).