Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #57761

Re: Block vs file level copy

From Lewis <g.kreme@gmail.com.dontsendmecopies>
Newsgroups comp.sys.mac.system
Subject Re: Block vs file level copy
Date 2014-03-09 07:20 +0000
Organization Miskatonic U
Message-ID <slrnlho5io.1nee.g.kreme@amelia.local> (permalink)
References <lffu94$shm$1@dont-email.me> <slrnlhn889.1k6v.g.kreme@amelia.local> <mylhwkhs2c.fsf@Sunburn.Stanford.EDU>

Show all headers | View raw


In message <mylhwkhs2c.fsf@Sunburn.Stanford.EDU> 
  Martin Frost me at invalid stanford daht edu <nospam@stanford.edu.invalid> wrote:
> Lewis <g.kreme@gmail.com.dontsendmecopies> writes:

>> In message <lffu94$shm$1@dont-email.me> 
>>   Király <me@home.spamsucks.ca> wrote:
>> > We had a discussion a while back about the speed of a block level vs a 
>> > file level copy of one volume to another. It's generally considered 
>> > that a block-level copy is faster, but some argued that a file-level 
>> > copy will be faster if the volume contains a lot of free space. There 
>> > was more disagreement about whether a block-level copy copies that free 
>> > space or not.  I had the chance to test it over the last two days.
>> 
>> > I had a 2TB volume that was only 25% full (of Time Machine backups.) I 
>> > wanted to copy it to a 3TB volume.
>> 
>> > Disk Utility's Restore function, which unmounts both the volumes and 
>> > does a block-level copy, took 16 hours over FW800.
>> 
>> > SuperDuper, which leaves the volumes mounted and does a file-level copy, 
>> > took 5 hours.
>> 
>> > That settled it for me.
>> 
>> A block level copy is always faster if the block size is set properly.
>> The smaller the block size, the slower the copy (but the more the copy
>> can cover for errors, which is why you might want to use a small block
>> size).
>> 
>>  $ dd if=/dev/zero bs=1 count=1024 of=test
>> 1024+0 records in
>> 1024+0 records out
>> 1024 bytes transferred in 0.007203 secs (142166 bytes/sec)
>>  $ dd if=/dev/zero bs=1024 count=1024 of=test
>> 1024+0 records in
>> 1024+0 records out
>> 1048576 bytes transferred in 0.007179 secs (146061124 bytes/sec)
>> 
>> So, 0.13MB/s versus 140MB/s, or 1000 times slower with a block size of 1
>> (512 bytes) instead of 512K.

> Just want to point out that the bs option of dd takes its argument (1
> and 1024 above) in bytes (not multiples of 512 bytes).  So the above
> copied 1-byte and 1024-byte blocks.  Note the totals at the end of
> each run: 
>   1024 bytes transferred  [1byte x 1024]
>   1048576 bytes transferred [1024bytes x 1024]
> (Perhaps you've confused dd with dump.)

The man page said:

Input data is read and written in 512-byte blocks.

Which is what threw me off.


-- 
History has a habit of changing the people who think they are changing
it.

Back to comp.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Block vs file level copy me@home.spamsucks.ca (Király) - 2014-03-08 20:24 +0000
  Re: Block vs file level copy Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-03-08 16:09 -0500
    Re: Block vs file level copy JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-03-08 16:33 -0500
      Re: Block vs file level copy Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-03-08 23:01 +0000
      Re: Block vs file level copy Oregonian Haruspex <bob_davis_retired@yahoo.com> - 2014-03-10 04:32 +0000
      Re: Block vs file level copy Siri Cruz <chine.bleu@yahoo.com> - 2014-03-09 22:34 -0800
    Re: Block vs file level copy Tom Stiller <clusterfux.upmon@gmail.com> - 2014-03-09 13:08 +0000
      Re: Block vs file level copy Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-03-09 11:41 -0400
  Re: Block vs file level copy Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-03-08 23:00 +0000
    Re: Block vs file level copy billy@MIX.COM - 2014-03-08 23:48 +0000
    Re: Block vs file level copy Martin Frost me at invalid stanford daht edu <nospam@stanford.edu.invalid> - 2014-03-08 22:14 -0700
      Re: Block vs file level copy Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-03-09 07:20 +0000
    Re: Block vs file level copy Siri Cruz <chine.bleu@yahoo.com> - 2014-03-09 22:55 -0800
  Re: Block vs file level copy Siri Cruz <chine.bleu@yahoo.com> - 2014-03-09 22:11 -0800

csiph-web