Sluggish LVM/Disk/Raid performance under Linux (RHEL/CentOS 6)? Check power management!

If you are running tuned these settings will likely “undo” themselves. I found this out the hardway ;)

Update: If you are running a old firmware (older than CC34) update !! More on the update are on Seagates page and here http://niallbest.com/seagate-2tb-st32000542as-cc35-firmware-upgrade/. To find your firmware use `hdparm -I /dev/sd[a-z] | grep Firmware`.

I was noticing Samba being slow when I would access it from time to time. It would always work but man was it annoying. Since this was right after I added some new 2TB drives to my LVM/Software Raid 1 array I figured I would check to see if power management had been the cause for my pain. Sure enough I found this :

[root@stardust ~]# hdparm -C /dev/sd[a-z] | sed ‘/^$/d’
/dev/sda:
drive state is: active/idle
/dev/sdb:
drive state is: standby
/dev/sdc:
drive state is: active/idle
/dev/sdd:
drive state is: active/idle
/dev/sde:
drive state is: standby
/dev/sdf:
drive state is: active/idle
/dev/sdg:
drive state is: active/idle

To which I answered with :

hdparm -B 255 -S 0 -K 1 /dev/sd[b,e]

and wala all was happy again and my delay was gone!

/dev/sda:
drive state is: active/idle
/dev/sdb:
drive state is: active/idle
/dev/sdc:
drive state is: active/idle
/dev/sdd:
drive state is: active/idle
/dev/sde:
drive state is: active/idle
/dev/sdf:
drive state is: active/idle
/dev/sdg:
drive state is: active/idle

The new drives were Seagate “Green” drives (ST32000542AS) so I cant blame them for shipping with aggressive power save settings. If you need to check what your power save settings are you can do something like :

for d in /dev/sd[a-z]; do echo $d; hdparm -I $d | grep level; done

/dev/sda
/dev/sdb
Advanced power management level:  disabled
/dev/sdc
/dev/sdd
/dev/sde
Advanced power management level: disabled
/dev/sdf
/dev/sdg
HDIO_DRIVE_CMD(identify) failed: Invalid exchange

The /dev/sdg device is a USB drive and they dont play nice with hdparms commands usually.

2 Comments

  1. pravin says:

    Thanks lol…
    Below mentioned link is very easy to understand,
    http://www.redhatlinux.info/2010/11/lvm-logical-volume-manager.html

  2. It’s really a great and useful piece of info. I am happy that you shared this helpful info with us. Please keep us informed like this. Thank you for sharing.

Leave a Reply