On Sat, 2005-01-08 at 19:33 -0700, Josh Coates wrote: > actually, this won't speed it up at all - if it has any effect, it will slow > it down. :-( > a disk to disk copy is dominated by the unbuffered sequential IO of the read > and write disk (whichever takes longer - usually writes take slight longer > than reads - but not by much - remember, this is *unbuffered* - your ondisk > write cache will be blown, and so it's useless.) > > by compressing data before you write it, you make the write side take less > time since you are writing less data to it, but you are always still waiting > for the read side, and you additionally chew up the CPU with compression. > large read + write IO already chews up a significant amount of CPU. so, > this is not a good idea IMHO.
Well, if you are trying to clone a disk onto several disks (ie clone the machines) then this is absolutely a good idea. For a one-time disk-to- disk copy, you are exactly right. In this case pcopy will be the fastest since it wont write out zeroed/unused blocks. > > >Make huge files filled with zeroed blocks (dd if=/dev/zero > of=/mnt/disk/file) and then delete them (this cleans out unused space). > > this might do something useful, but i really dont understand what you are > trying to do here. :-/ Simple. We're trying to eliminate the need to write these blocks to the target disk. By marking them with zeros, they won't be copied (although they do have to be read during the duplication process). Again if you're going to copy to more than one disk, this will increase the speed. Michael > > >Adjust the block size dd uses. > > this is the only thing that will make a HUGE difference. if i remember > correctly, the last time i did this anything over 64K (1024*64) was pretty > good, and above that gave diminishing returns. YMMV. > > Josh Coates > http://www.jcoates.org > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Andrew Jorgensen > Sent: Saturday, January 08, 2005 6:48 PM > To: stuporglue; BYU Unix Users Group > Subject: Re: [uug] Hard Drive Copy > > > On Sat, 08 Jan 2005 14:22:43 -0700, stuporglue <[EMAIL PROTECTED]> wrote: > > > If it's an image of an entire drive, you would do nothing with the > > > drive. Just dd it right back onto the drive. All the filesystem and > > > partition information would be stored in the image. > > > > Wow! > > > > So to copy from the disk to the image I could do something like: > > dd if=/dev/hdb of=/mount/otherdisk/hdb.img > > and it'd get the whole thing? > > > > And to copy back: > > dd if=/mount/otherdisk/hdb.img of=/dev/hdb > > Yes but it can be woefully inefficient and slow. Some tricks to make it > better: > Pipe the output of dd into gzip and then onto the disk. > Make huge files filled with zeroed blocks (dd if=/dev/zero > of=/mnt/disk/file) and then delete them (this cleans out unused > space). > Adjust the block size dd uses. I forget which block size is good, but > it changes the speed dramatically. > > -------------------- > BYU Unix Users Group > http://uug.byu.edu/ > > The opinions expressed in this message are the responsibility of their > author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. > ___________________________________________________________________ > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list > > > -------------------- > BYU Unix Users Group > http://uug.byu.edu/ > > The opinions expressed in this message are the responsibility of their > author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. > ___________________________________________________________________ > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list -- Michael Torrie <[EMAIL PROTECTED]> -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
