On Mon, Jun 28, 2010 at 12:09:46PM +0100, Wayne Stallwood wrote:
On 28/06/10 11:44, Chris G wrote:
A quick Google suggests that a 25Mb second transfer rate, reading one drive and writing to another, isn't too bad at all.
25Mb a second would be terrible. However 25MB a second would be ok for what might be a non sequential read and then write back onto another disk. Modern consumer grade drives can generally manage about 100MB/s on a sequential read in optimum circumstances.
It also depends on how your SATA ports are configured in the BIOS. Legacy or non AHCI mode usually makes them fall back to master/slave emulation which means that some SATA ports will share bus bandwidth, effectively halving the access speed if you are writing two and from disks on sequential channels.
You can determine this by running multiple copies of hdparm -tT /dev/sd(x). If you are in AHCI mode then you should get pretty much the same results running it on multiple drives at the same time as when running it on a single drive. If you are in Legacy mode you may well find that the performance drops massively.
BTW in case it isn't obvious this totally kills Linux MD array performance as well so it's worth checking on any machine.
Running them separately gives me:-
/dev/sda: Timing cached reads: 3490 MB in 2.00 seconds = 1745.54 MB/sec Timing buffered disk reads: 238 MB in 3.02 seconds = 78.79 MB/sec
/dev/sdb: Timing cached reads: 3298 MB in 2.00 seconds = 1649.42 MB/sec Timing buffered disk reads: 260 MB in 3.00 seconds = 86.63 MB/sec
... and running them simultaneously gives:-
/dev/sdb: Timing cached reads: 2606 MB in 2.00 seconds = 1302.25 MB/sec Timing buffered disk reads: 254 MB in 3.01 seconds = 84.36 MB/sec
/dev/sda: Timing cached reads: 2566 MB in 2.00 seconds = 1283.00 MB/sec Timing buffered disk reads: 234 MB in 3.01 seconds = 77.67 MB/sec
So simultaneous slows down the cached read a bit but has little effect on the buffered reads. Remember my 25Mb/s was an actual copy of real files from one disk drive to another, I just used 'cp' so I doubt if buffer sizes or anything were optimal.
Anyway it looks as if there's nothing fundamentally wrong with my disk read/write speeds.