is this problem specific to ubuntu only or to all linux in general?? i'm a novice and i'm pretty curious about the life of my new dell laptop, but still want to run linux though (suse 11 seems promising)
is this problem specific to ubuntu only or to all linux in general?? i'm a novice and i'm pretty curious about the life of my new dell laptop, but still want to run linux though (suse 11 seems promising)
I have confirmed the Cycle Load Issue on my Samsung HM121HI hard drive and i found that there is no response to the fix posted in this thread http://ubuntuforums.org/showthread.php?t=795327
I tested the fix using parameters from 200 to 253 in the hdparam, and the Cycle Load Counting increades always by about 120 per hour or more. When i tried -B 254, it stopped Cycling at all. The counter stopped and i have the heads of my hard drive always flying on the disk. That's not what i wanted... i wanted to reach some reasonable counting rate, like 20 or 30 per hour... but this was impossible for me...
any other alternative?
This fix doesn't worked for me.
Thanks.-
Heads can't park correctly on linux and most OS so the best is to disable this feature till laptop makers, hard drive manufacturers and OS developpers can reach an interesting compromise between efficiency, power saving and disk protection.
Having your head parking 20 or 30 per hours is almost useless on linux as because the kernel in its current state polls too often the disk so that they will unpark almost immediately and thus make you lose the interest of parking the heads anyway.
So if you can't reach the value you target just use -B 254.
BTW if you use hardy the fix presented in the thread you linked is obsolete and could explain why you can't reach your goal.
BTW i have a question about the hardy fix, is the laptop supposed to switch to ${DEVICES_DISK_PM_POWERSAVE_OFF} when power adaptator plugged in and to DEVICES_DISK_PM_POWERSAVE_ON when working on battery ?
Or do you just set it manually with "pm-powersave true" and "pm-powersave false" ?
Yes, thats exactly how it works. The scripts in /etc/pm/power.d are executed if the AC gets connected/disconnected (and the $1 variable of the scripts gets a true or false value depending on whether we are on AC or on Battery).
Also the scripts in /etc/pm/sleep.d are executed on hibernate, suspend, resume, thaw (and the $1 variable of the scripts gets a value of hibernate, suspend, resume, thaw).
[note: thaw = resume from hibernate, resume = resume from suspend]
And this brings me to my improvement on the opensuse fix.
Lets take another script, and lets call it disk again.
And place it in /etc/pm/sleep.d/Code:#!/bin/bash . /usr/lib/pm-utils/functions . /etc/pm/config.d/disk if test -z ${DEVICES_DISK_PM_NAMES}; then exit 1 fi case "$1" in hibernate|suspend) echo "**nothing i need here fo now" ;; thaw|resume) /usr/bin/on_ac_power; if [ "$?" -eq 0 ]; then echo "**disabled PM for harddisk" for DISK_NAME in `echo ${DEVICES_DISK_PM_NAMES}`; do ${DEVICES_DISK_PM_POWERSAVE_OFF} ${DISK_NAME} done elif [ "$?" -eq 1 ]; then echo "**enabled PM for harddisk" for DISK_NAME in `echo ${DEVICES_DISK_PM_NAMES}`; do ${DEVICES_DISK_PM_POWERSAVE_ON} ${DISK_NAME} done fi ;; *) echo "**this shoudn't be called right now..." ;; esac
Now lets make it executable
This ensures, that when the computer wakes up from hibernate/suspend it will set APM according to our settings in /etc/pm/config.d/disk depending on whether we are on AC or on battery.Code:$ sudo chmod +x /etc/pm/sleep.d/disk
Well at least it works that way for me, dunno if it's universal... my bash scripting skills are somewhere between none and lame
Now i need to solve mi final problem, and that is if i have laptop mode enabled in /etc/default/acpi-support the evil /etc/acpi/power.sh keeps setting hdparm when i plug in/out the power cord. Now i want to keep laptop mode for battery because is reduces disk polling significantly thus making disk APM more efficient, but i want pm-utils (SUSE scripts) to handle the hdparm settings not the old scripts in /etc/acpi/ .
This is what happens when ubuntu/debian devs just take something (pm-utils) and slap it on the system with just glue and duct tape ;D
Thanks, i have still to test things as for me applying the fix just stop head parking whatever the value i put for "DEVICES_DISK_PM_POWERSAVE_ON", but that's not a big problem as heads don't park in a useful way on linux anyway.
They do park in a useful way, but only if laptop-mode is enabled and properly configured as it prevents unneeded disk I/O. Without laptop-mode, for some strange reason they get unparked right away as as they park (almost seems like "oh the disk parked, i must write a log to disk that it parked).
BTW: more info on pm-utils scripting: http://en.opensuse.org/Pm-utils
laptop-mode does not play well at all with pm-util (i tested this myself) in hardy and doesn't work after suspend/hibernate, in addition my previous laptop-mode config is way less efficient than it was before with gutsy. On top of this laptop mode doesn't prevent most of the most important and regular IO pollings which are deeper in the kernel.
These are the reasons why they do not park in useful way, parking in a useful way would be parking the heads and keeping them parked as long as the kernel do not have important things to do, thus protecting the disk, decreasing power consumption and decreasing the disk temperature.
So for the moment head parking is more a problem than a useful tool unfortunately, hopefully OS developpers will fix this in next version, lets wait a year and see.
Last edited by frodon; June 26th, 2008 at 06:16 PM.
Bookmarks