Where should i look to improve slow I/O performance measured with dd? I have been measuring my primary disk I/O with the following command :


  dd if=/dev/zero bs=2048k of=/Volumes/Toshiba/tstfile count=1024 2>&amp;1 | grep > sec | awk '{print $1 / 1024 / 1024 / $5, "MB/sec" }'


This test is obviously for a write operation, read can easily be measured as well.

Both read and write give a speed of about 28MB/s which seems pretty poor, despite the age of my mac mini (2GHz core 2 duo).

Furthermore, a 1TB usb 3 drive from last year gives the same performance, below 30MB/s always.

I have tried changing the file size from 1MB to 500MB, results are consistent.

Since both drives behave the same, i suspect a bottleneck somewhere else in the hardware or the software.

What are the suggestions to investigate further?

Thanks
Nick
My experience with dd is that as well as the file size, the block size makes a huge difference. Try playing with the bs parameter (try 128 - 10240) and see what sort of a difference it makes.

Also - a sustained 28MB/sec write speed is not all that bad for a 5-7 year-old computer. (Although if you multiply by 8 to get the speed in bits per second, you will see that it's 224mbps - around 15% of a SATA-I bus.)

Things to consider include:


Is the HDD a 5400rpm or 7200rpm model? For sustained larger file writes (as opposed to many small files), it makes a difference.
Not all HDDs are created equal, with some models being faster than others. Find out what model yours is and search a bit to find out how they usually fare.
Have you considered upgrading to an SSD? This will make a huge difference, even if the interface on the computer is only SATA-I (quite likely), as a decent SSD should be able to saturate the SATA bus.