Saturday, December 15, 2007

Small update on hdparm and smartctl

1. There are now versions of both programs not only for various *nix-exs but also for Windows - for instance ! (so being lazy in regard to Linux is no longer an excuse :) )

2. With certain HDD models (especially notebook drives) the power-management settings (for the less experienced - think unexpected disk noise, premature disk failure and so on) can be very complex - I have previously seen a Samsung disk where 'hdparm -B' and 'hdparm -M' were never able to disable the frantic head loading/unloading no matter the combination of values, but instead 'smartctl -o on' was able to improve things a lot; a much more recent Western Digital also had similar problems which this time could be also seen in Windows (at a slightly more reduced scale) - the ideal combination for that WD1200BEVE is so far 'hdparm -B 255' and 'hdparm -M 254' ... if you have more time you should experiment with other values - on an older disk I had something like below in a Ubuntu startup script ...

hdparm -B 248 -S 61 -M 128 /dev/sda
echo 30000 > /proc/sys/vm/dirty_writeback_centisecs
echo 8 > /proc/sys/vm/dirty_background_ratio
echo 24000 > /proc/sys/vm/dirty_expire_centisecs

It looks like some disks (the above WD1200BEVE among them) can be very tricky in regard to handling advanced power management - setting a normal value with 'hdparm -B nn' under both Windows and Linux will work just fine ... UNTIL the next standby !!! After that the advanced power management value is set to 128 under both Linux and Windows - which is less than desirable :(
Under Ubuntu the fix was the easiest - just one more symbolic link to my custom hdparm-B script - this one as /etc/acpi/resume.d/ :) I will have to see the equivalent under SUSE 10.3 but the tricky part might be Windows - I might need a small program to stay in the tray and listen to power-management events and then run a command (each time after a resume or only when on AC ?). Ideally that program should be a service but for the moment that seems a little too much ...
Another interesting question might be if the hdparm -B parameter should actually be 16 bit (and the high bits somehow control the value after suspend/resume) ?


Post a Comment

Links to this post:

Create a Link

<< Home