Re: [gentoo-user] Re: dd - bytes at a time

2009-12-20 Thread Joshua Murphy
On Sat, Dec 19, 2009 at 10:15 AM, Neil Bothwick n...@digimed.co.uk wrote:
 On Sat, 19 Dec 2009 12:11:27 +, Stroller wrote:

  Incidentally, if you want to use dd, adding bs=4096 speeds it up quite
  significantly.

 Thank you. I have always wondered what the optimal bs might be.
 And why - could you possibly explain that, please?

 Is bs=4096 best for all disk-based operations?

 Many filesystems are set up with 4K blocks, so matching this with dd is
 more efficient. The default is 512 byte blocks and anything larger
 than this is good, I sometimes use 40960 but that isn't significantly
 faster. I prefer to avoid using dd on hard disks altogether, it's just
 so damn slow for large amounts of data.


 --
 Neil Bothwick

 You can't teach a new mouse old clicks.


My *completely uneducated* guess would be that, for a raw disk level
copy (on a normal spinning disk) or write a bs that is *at the least*
divisible into the drive's cache size, and at best *is* the drive's
cache size, would be best. For SSDs, if you have some strange reason
to need to use dd with one (I'd avoid it simply because a: you'll
never guarantee an overwrite of what's really there now and b: you'll
be put at least a small dent in the lifespan of the drive) the minimum
erase block size would be best, since that'd allow both a full erase
and a full write of a block, rather than risking 2 erases to get all
of one block written.

I do reiterate that this is all mere conjecture, and is based in my
likely flawed conceptual understanding of the drives.

-- 
Poison [BLX]
Joshua M. Murphy



[gentoo-user] Re: dd - bytes at a time

2009-12-19 Thread Stroller


On 19 Dec 2009, at 10:59, Neil Bothwick wrote:

...
Incidentally, if you want to use dd, adding bs=4096 speeds it up quite
significantly.


Thank you. I have always wondered what the optimal bs might be.
And why - could you possibly explain that, please?

Is bs=4096 best for all disk-based operations?

Cheers,

Stroller.




Re: [gentoo-user] Re: dd - bytes at a time

2009-12-19 Thread Neil Bothwick
On Sat, 19 Dec 2009 12:11:27 +, Stroller wrote:

  Incidentally, if you want to use dd, adding bs=4096 speeds it up quite
  significantly.  
 
 Thank you. I have always wondered what the optimal bs might be.
 And why - could you possibly explain that, please?
 
 Is bs=4096 best for all disk-based operations?

Many filesystems are set up with 4K blocks, so matching this with dd is
more efficient. The default is 512 byte blocks and anything larger
than this is good, I sometimes use 40960 but that isn't significantly
faster. I prefer to avoid using dd on hard disks altogether, it's just
so damn slow for large amounts of data.


-- 
Neil Bothwick

You can't teach a new mouse old clicks.


signature.asc
Description: PGP signature