FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-19-2009, 02:15 PM
Neil Bothwick
 
Default dd - bytes at a time

On Sat, 19 Dec 2009 12:11:27 +0000, 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.
 
Old 12-21-2009, 02:39 AM
Joshua Murphy
 
Default dd - bytes at a time

On Sat, Dec 19, 2009 at 10:15 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Sat, 19 Dec 2009 12:11:27 +0000, 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
 

Thread Tools




All times are GMT. The time now is 11:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org