[Soekris] Harddisk Slow
sjf at ctrlsft.com
Wed Jan 31 14:02:59 UTC 2007
On Jan 31, 2007, at 3:21 , Igor Sobrado wrote:
> In message <1816282B-B315-4DE7-B13F-EFE507FB9CD2 at ctrlsft.com>,
> Steven Finnegan writes:
>> When using DD, it is important that you set the buffer size.
>> Otherwise you end up transferring ONE sector at a time, which is very
> bs is the block size, not the buffer size. It is, however, an useless
> parameter if the filesystem is not tuned to use that block size on all
> transactions by means of newfs. A block size of 1024KB is probably
> not supported, and certainly not recommended for a general purpose
> filesystem (a fragment size of 128KB is certainly a waste of space
> for most filesystems, perhaps it will work for databases). On a FFS,
> the default block size is 16KB.
Well, you're right about the name of the parameter (block, not
buffer). However it doesn't have anything to do with the filesystem's
block size. DD will read an entire block (or partial block if it hits
the EOF) before switching to write mode to write the block to the
destination. By default, DD uses a block size of 512 bytes -- which
is only a fraction of a standard filesystem block. This causes the OS
to buffer both reads and writes.
Using a larger block size allows DD to do the buffering, allowing for
longer reads and writes, and allowing for more efficient disk
accesses. Hardly "useless".
I wasn't necessarily recommending 1MB as the most efficient value,
but practically any value is better than the default! I CERTAINLY
wasn't recommending setting a filesystem block size of 1MB!
DDing the suggested 100Mb file at different block sizes gives the
following results on my system.
Block size Thruput
From this it would appear that the optimum DD blocksize for my
system is somewhere between 512k and 1M
More information about the Soekris-tech