# HP P212 RAID-Controller is extremely slow.

## tomiondrums

Hi,

having bought a new HP Proliant DL120 G6 (Performance) i've set up a simple RAID1 Array with two brand new Western Digital WD20EARS (SATA300, 2TB, 3,5", 7200U/m, 64MB) and tried to install Debian Squeeze (I know I'm on the Gentoo-Forum, but the Problem persists no matter what distribution I use. See below...). The Debian Installer seems to recognize the Array correctly but it takes round about 1,3 hours to complete. The installed system isn't even faster. I ran a 

```
hdparm -t /dev/cciss/c0d0
```

and it reported a read throughput of 73 to 85MB/s which isn't even as fast as my desktop PC which has only one simple Disk (non-Raid) installed. I've also tried to run the same hdparm test from a Gentoo-Live boot (from USB-flash drive as i don't have a CD-ROM drive attached to the machine) and it reported approximately the same values.

(By the way: 'lspci' reports the device to be a 

```
RAID bus controller: Hewlett-Packard Company Smart Array G6 controllers (rev 01)
```

)

I've also installed cpqacuxe and inspected the Controller/Array/Disks. No error or warning was reported. And there's virtually no message in the system log that could hint at a driver/system/kernel/filesystem/hardware failure.

Someone told me that the controller might be syncing the disks but i had it resting idle (Debian running) for about 8 hours and it's still as slow (shouldn't the sync be finished in the meantime?). The other thing is that is absolutely no harddisk activity (i.e. the green LEDs are off as long as no filesystem from that array is mounted).

How can I find out whether it is currently syncing?

I suspect this to be a configuration problem and I'm really desperate. Hopefully you can give me some hints on how to resolve that problem...

Thanks in advance!

 Tom

----------

## tomiondrums

Solved it (at least partially).

The problem was not the RAID-Controller, it was the disk. The WD20EARS uses a Blocksize of 4kb but it doesn't report it properly. There are multiple ways to resolve it. One of them could be found at http://community.wdc.com/t5/Desktop/Problem-with-WD-Advanced-Format-drive-in-LINUX-WD15EARS/m-p/7573#M369

----------

## erik258

4k blocksize disks benefit greatly from aligned partitions.  

http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/index.html?ca=dgr-lnxw074KB-Disksdth-LX

----------

## jmartos

You should also try to change the block device driver read ahead size to something higher than the default. I think the default is 2048, but for hardware array controllers it needs to be higher. I use a P400 with the 256MB cache module and I found the optimal value to be 8192. You will need to do some testing on your system to find the best value for you. Here are the commands to try:

```
/sbin/blockdev --setra 8192 /dev/cciss/c0d0

/sbin/blockdev --setra 8192 /dev/cciss/c0d0p1

/sbin/blockdev --setra 8192 /dev/cciss/c0d0p2

/sbin/blockdev --setra 8192 /dev/cciss/c0d0p3
```

You will then want to put your optimal values in your /etc/conf.d/local.start to set them at boot time. Hope this helps.

----------

