This is a short overview how the linux kernel deal with sata drives and how performance can be increased

All new disk controllers can be run in either ATA or AHCI mode. AHCI-Mode is often called RAID-mode in the appropriate section of the computers BIOS. Using a 2.6.26 kernel (debians default one in lenny) and the disk-controller in ATA-mode will force the kernel to use the old ata_piix module/driver to access the harddrives. As this is an old way to access the harddrives for the sake of compatibility – the throughput is not very impressive. In my case on a HP DL320 G6, the read/write performance is between 20-30mb/sec on a raid5.

The AHCI-mode (Advanced Hardware Control Interface) is a general way to use newwer chipsets through the same driver. A big advantage by using AHCI is to be able to use NCQ on disks as well as hotplugging drives on supported chipsets. In my case, after switching to AHCI-mode in bios, the write/read performance was pushed to 50-60mb/sec on my raid5 set.

backup:~# dmesg | grep ahci
[ 2.366458] ahci 0000:00:1f.2: version 3.0
[ 3.374702] ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 4 ports 1.5 Gbps
0xf impl RAID mode [ 3.374706] ahci 0000:00:1f.2: flags: 64bit ncq sntf ilck stag pm led
clo pmp pio slum part [ 3.378007] scsi0 : ahci
[ 3.378007] scsi1 : ahci
[ 3.378007] scsi2 : ahci
[ 3.378007] scsi3 : ahci

Categories: BlogHardwareLinux