Page 2 of 34 FirstFirst 123412 ... LastLast
Results 11 to 20 of 335

Thread: laptop harddrive Load_Cycle_Count issue

  1. #11
    Join Date
    Sep 2007
    Location
    Warsaw, Poland
    Beans
    629
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Lightbulb Re: laptop harddrive Load_Cycle_Count issue

    OK, I found a fix! This worked for me:

    http://ubuntuforums.org/showpost.php...&postcount=842

    This actually by far is the best fix. I only used the above instructions after a clean install and now my hard drive has stopped clicking; even after resuming from suspend.
    Last edited by hotweiss; May 25th, 2008 at 01:14 AM.

  2. #12
    Join Date
    Nov 2007
    Location
    Santa Cruz, CA
    Beans
    346
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: laptop harddrive Load_Cycle_Count issue

    @ hotweiss:

    That is the fix that I also use. But it is not ideal for all people. Some people desire to have different settings when on AC vs. Battery power. This fix doesn't allow for that. It rather just locks the defualt hdparm value to 254 (or whatever number you put there).

    But for anyone who doesn't care about different values between AC and Battery power, it works just as well.
    Registered Ubuntu User #20847

  3. #13
    Join Date
    Sep 2007
    Location
    Warsaw, Poland
    Beans
    629
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: laptop harddrive Load_Cycle_Count issue

    Quote Originally Posted by BandD View Post
    @ hotweiss:

    That is the fix that I also use. But it is not ideal for all people. Some people desire to have different settings when on AC vs. Battery power. This fix doesn't allow for that. It rather just locks the defualt hdparm value to 254 (or whatever number you put there).

    But for anyone who doesn't care about different values between AC and Battery power, it works just as well.
    I don't think you'll get more than an extra 5 minutes of life even with the most aggressive hard drive power management settings. The only problem with the other solution posted here is that it doesn't work after you resume from suspend. None the less, a true fix would be nice.
    Last edited by hotweiss; May 25th, 2008 at 07:50 AM.

  4. #14
    Join Date
    Apr 2008
    Location
    Mirpur, Kashmir, Pakistan
    Beans
    110
    Distro
    Ubuntu 12.04 Precise Pangolin
    Quote Originally Posted by garoth2 View Post
    Are you sure about that first reading?

    My HDD temp seems to not have changed much. About 40-45 deg C

    Yep, quite sure about the readings. Just started up my laptop and the readings jumped from 36 C to 40 C in 10 minutes. Should I disable uglyfix? My hard drive temperature range is from 5 to 60 C according to manufacturer specs.
    Last edited by Rayaz; May 25th, 2008 at 08:43 AM. Reason: Addition

  5. #15
    Join Date
    Oct 2004
    Location
    Netherlands
    Beans
    2,983
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: laptop harddrive Load_Cycle_Count issue

    Don't apply any unofficial ugly fixes unless you understand what you are doing and you understand how to revert. Only apply this fix if you are heavily affected. After applying this fix keep an eye on your Load_Cycle_Count and on your harddrive temperature and make sure it remains below the maximum temperature specification of your harddrive. Also don't forget that having your harddisk head park protects your harddrive if you experience any bumps (which is especially nice if you are on the road and therefor probably working on battery). Everything you do is on your own risk.

    Why I am recommending 128 while on battery and 254 while on AC as values to try first for those who are heavily affected.

    For most disks the default is 128 which is important to have while on battery (protection from bumps,less heat,less power) compared to a higher value.

    The solution in the unofficial ugly fix I encourage uses 128 while on battery and uses 254 while on AC. 254 turns power management down or off (high I/O) for most harddrives and thus stops increasing the load_cycle_count while on AC. But please only do this kind of thing if you understand what you are doing. Also please keep monitoring your harddisk temperature.

    If you get better results (less heat without rapid increasing Load_Cycle_Count) by using a different apm value you are free to experiment with values between 128 and 255 while on AC. The reason I'm advocating 254 (highest I/O) is that it works for a lot of harddrives. Another value which works for a lot of harddrives is 255 (disabling power management altogether). Harddrive manafucturars do different things for values between 128 and 254 so it's impossible to recommend a single number between 128 and 254. "man hdparm" gives a little bit of explanation about these values.

    In most cases it is unwise to use a different value than 128 while on battery. The biggest reason to use an apm of 128 while on battery would be to protect the harddisk from bumps. Even if the laptop is used on battery everyday for four hours the Load_Cycle_Count would have to increase with 137 per hour to be able to reach 600.000 within three years of usage. Most people don't see their Load_Cycle_Count increase that fast (although some might). Most people don't use their laptop for four hours on battery each day. Those people who are afraid they will still reach the maximum Load_Count as specified by their manufacturer within three years of usage do need to tweak the "apm number while on battery".

    I'm using a laptop cooler (Zalman ZM-NC2000) while using my laptop on AC. If you are worried about the temperature of your disk you might want to consider buying a laptop cooler. For my experiences with the Zalman ZM-NC2000 read :
    http://ubuntuforums.org/showthread.php?t=818040
    http://ubuntuforums.org/showpost.php...03&postcount=4

    If I use my laptop on my lap with AC plugged in I often manually issue a "hdparm -B 128 /dev/sda" to get protection from bumps.

    From :
    https://bugs.launchpad.net/ubuntu/+s...5/comments/232
    Quote Originally Posted by ubuntu_demon
    I'm currently recommending this to people who are heavily affected :
    * use apm 128 while on battery (most head parks, best protection from bumps, lower power usage)
    * use apm 254 while on AC (no protection from bumps,no head parks,best performance,increased heat)

    The biggest reason to do so would be to protect the harddisk from bumps. Even if the laptop is used on battery everyday for four hours the Load_Cycle_Count would have to increase with 137 per hour to be able to reach 600.000 within three years of usage. Most people don't see their Load_Cycle_Count increase that fast (although some might). Most people don't use their laptop for four hours on battery each day. Those people who are afraid they will still reach the maximum Load_Count as specified by their manufacturer within three years of usage do need to tweak the "apm number while on battery".
    Don't apply any unofficial ugly fixes unless you understand what you are doing and you understand how to revert. Only apply this fix if you are heavily affected. After applying this fix keep an eye on your Load_Cycle_Count and on your harddrive temperature and make sure it remains below the maximum temperature specification of your harddrive. Also don't forget that having your harddisk head park protects your harddrive if you experience any bumps (which is especially nice if you are on the road and therefor probably working on battery). Everything you do is on your own risk.
    Last edited by ubuntu_demon; June 6th, 2008 at 11:40 AM.

  6. #16
    Join Date
    Feb 2007
    Location
    Gray, TN, USA
    Beans
    155
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: laptop harddrive Load_Cycle_Count issue

    laptop: Acer Aspire 4520 (info probably relevant to the 5520 and 7520 as well)
    hdd: Toshiba MK1246GSX 120GB SATAII
    hdd firmware revision: LB213J

    What I've noticed is that using any hdparm -B value from 192 - 254 will make the drive run near or at its maximum temperature (52C), but will cause Load_Cycle_Count to decrease to next to nothing. Values 128 - 191 make the drive run at around 45C, but Load_Cycle_Counts to Minutes ratio is about 3:2. There seems to be no incremental difference in the values. Results are the same for any value from 128 to 191 (temp around 45C, 15 load cycles every 10 minutes); and the same for 192 to 254 (temp around 51C, fewer load cycles).

    I ran my tests using the following command:
    Code:
    date; sudo smartctl -a /dev/sda | grep -i -E '(load_cycle|temp)'
    Powertop suggests a few other tweaks which could be relevant:
    Suggestion: increase the VM dirty writeback time from 5.00 to 15 seconds with:
    echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
    This wakes the disk up less frequenty for background VM activity

    Suggestion: Enable SATA ALPM link power management via:
    echo min_power > /sys/class/scsi_host/host0/link_power_management_policy

    Suggestion: Disable 'hal' from polling your cdrom with:
    hal-disable-polling --device /dev/cdrom
    'hal' is the component that auto-opens a window if you plug in a CD but disables SATA power saving from kicking in.
    An acquaintance of mine (micr0c0sm on EFnet) also suggests mounting /tmp and /var/tmp into RAM:
    11:39 < micr0c0sm> its easy, just make sure you dont have anything in /var/tmp that expects to be persistent
    11:39 < micr0c0sm> relevant lines from my /etc/fstab:
    11:39 < micr0c0sm> shm /dev/shm tmpfs nosuid,mode=1777,noatime 0 0
    11:39 < micr0c0sm> /dev/shm /tmp none bind 0 0
    11:39 < micr0c0sm> /tmp /var/tmp none bind 0 0
    11:41 < micr0c0sm> shm is shared memory (aka ram)
    11:41 < micr0c0sm> mode=1777 nosuid makes sure its safe from executing silly things
    11:41 < micr0c0sm> noatime means don't write the time any file in there is accessed, theres no point to there
    11:42 < [BAFtop]> w.t.f.
    11:42 < [BAFtop]> http://farm3.static.flickr.com/2279/...9db54ab0e2.jpg
    11:42 < [BAFtop]> ^ WTF
    11:42 < micr0c0sm> bind lets you bind a mount, kind of like a softlink but much better when mounting
    11:42 < micr0c0sm> so i bind my shared memory to /tmp/ and /var/tmp
    11:42 < micr0c0sm> so both of those are the same directory, and they grow as necessary
    11:42 < Twintop> [BAFtop]: WTF is right
    11:42 < micr0c0sm> i also have 4gb of ram and never go above 1.2gb with caches so its safe
    He also notes the following:
    11:11 < micr0c0sm> i'll check my cycles soon, but heres the thing: 600,000 is the minimum cycles that most hard drives could fail
    11:11 < micr0c0sm> the actual numbers are close to twice that
    11:12 < micr0c0sm> what happens is the manufacturers try out 1,000 drives, and the first five failures, whichever has the highest number of cycle writes is the spec they rate at
    11:12 < micr0c0sm> while the other 995 cycle 2x that
    11:12 < micr0c0sm> this is all very rough heard from a friend/forum stuff but the gist is, you drive isn't gonna die at exactly 600k
    11:13 < micr0c0sm> still, its a good idea to keep the heads parked or keep them reading
    Can anyone help confirm or deny his observation?

    I'm thinking the only way truly to balance operating temperature with power saving would be for me to crontab a script to run every 5 or 10 minutes, similar to this:
    Code:
    #!/bin/bash
    ## Save to a file, chmod +x, and run as root or with sudo.
    ## example root crontab entry:
    ## */10 * * * *    /path/to/hdd_power.sh >/dev/null 2>&1
    
    HDPARM_POWERSAVE=128
    HDPARM_PERFORMANCE=254
    HDPARM_HDD="/dev/sda"
    ## degrees within the maximum temperature to switch to power saving
    ## For instance, if max operating temp is 52 and this value is 1,
    ## when the drive reaches 51 degrees or higher, power save will
    ## activate...
    HDPARM_DEGREES_WITHIN_MAX_HIGH=1
    
    ## ... until the drive has cooled to at least this many degrees
    ## below max temp.
    HDPARM_DEGREES_WITHIN_MAX_LOW=5
    
    ### END OF VARIABLES ###
    
    function fnPowerSave {
        echo "Configuring for power save / frequent head parking."
        hdparm -B $HDPARM_POWERSAVE $HDPARM_HDD
    }
    
    function fnPerformance {
        echo "Configuring for performance / infrequent head parking."
        hdparm -B $HDPARM_PERFORMANCE $HDPARM_HDD
    }
    
    function fnInstall {
        apt-get install -y --force-yes $1
    }
    
    if [ `whoami` != "root" ]; then {
        echo "$0 should be run as root or with sudo."
        exit 1
    }; fi
    
    if [ ! -f "`which smartctl`" ]; then fnInstall smartmontools; fi
    if [ ! -f "`which hdparm`" ]; then fnInstall hdparm; fi
    if [ ! -f "`which on_ac_power`" ]; then fnInstall powermgmt-base; fi
    
    on_ac_power
    RETVAL=$?
    if [ $RETVAL -eq 255 ]; then {
        echo "Power state could not be determined.  Skipping hdparm."
        exit 1
    } elif [ $RETVAL -eq 1 ]; then {
        echo -n "Running on battery power.  "
        fnPowerSave
        exit 0
    }; fi
    strSMART=`smartctl -n standby -a /dev/sda | grep -i 'temp'`
    currTEMP=`echo $strSMART | awk '{ print $10 }'`
    maxTEMP=`echo $strSMART | sed -r -e 's/.+(..).$/\1/'`
    echo "Temperature: $currTEMP celsius ($maxTEMP max)"
    if [ $currTEMP -ge $(($maxTEMP - $HDPARM_DEGREES_WITHIN_MAX_HIGH)) ]; then {
        fnPowerSave
        exit 0
    }; fi
    if [ $currTEMP -le $(($maxTEMP - $HDPARM_DEGREES_WITHIN_MAX_LOW)) ]; then {
        fnPerformance
    }; fi
    
    exit 0
    Last edited by calraith; May 28th, 2008 at 07:21 PM. Reason: refined the script a little
    Q: How many ADD kids does it take to screw in a lightbulb?
    A: Hey! Let's go ride bikes!

  7. #17
    Join Date
    Jun 2005
    Location
    France
    Beans
    7,100
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: laptop harddrive Load_Cycle_Count issue

    I desactivated laptop_mode to try the fix proposed on the suze page however applying the fix with the vlues suggested by ubuntu_demon heads do not park anymore (i added relatime parameter to the ubuntu partition).
    Temperature seems fine however (around 46C max).

    This is on acer aspire 5720G, anyone noticed such behaviour too with the unofficial hardy fix ?

  8. #18
    Join Date
    Jun 2007
    Beans
    18

    Re: laptop harddrive Load_Cycle_Count issue

    Quote Originally Posted by Rayaz View Post
    Yep, quite sure about the readings. Just started up my laptop and the readings jumped from 36 C to 40 C in 10 minutes. Should I disable uglyfix? My hard drive temperature range is from 5 to 60 C according to manufacturer specs.
    I'm not sure of the significance of the temperature... it's still below the maximum by a large margin. I installed sensors-applet and hddtemp (run as daemon), which shows my hdd temperature on my gnome menu bar which I find quite handy for monitoring it.

    I don't remember my hard drive ever running that cool (~30 deg C) except when it's been off for a while and just boots. I have my power management level at 200 now and it sits between 40-45 deg.

    Also to others - I installed the latest laptop-mode-tools (not necessary to install the latest) to control my HDD power management. It doesn't seem to mess up my system at all like it suggests in /etc/default/acpi-support in the comments. You have to edit that file to allow laptop-mode to operate. Then edit all of the config files in /etc/laptop-mode/conf.d and /etc/laptop-mode/laptop-mode.conf. The HDD settings are in laptop-mode.conf.

    One thing I found though is that even when laptop mode enabled, the power.sh script forces the power management level anyway. So you also have to change the values in /etc/acpi/power.sh (in the lines where it specifies $HDPARM -B value) in order for the settings in laptop-mode.conf to stick.

  9. #19
    Join Date
    Sep 2007
    Location
    Warsaw, Poland
    Beans
    629
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: laptop harddrive Load_Cycle_Count issue

    Hmmm, I just ran smartmon in Vista, and the problem is there to.

  10. #20
    Join Date
    Nov 2007
    Location
    Santa Cruz, CA
    Beans
    346
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: laptop harddrive Load_Cycle_Count issue

    @ calraith:

    On this thread's predecessor a member named blackhole54 made similar observations about the way HD manufacturers calculate the maximum number of load cycles. And it makes sense. It's kinda like 100,000 mile warranties on cars, by the time you get there it should last quite a bit longer, but it does have some wear and tear--it certainly isn't new any more.



    On another note, I can confirm hotweiss's observations about the Suse ugly fix not working properly when resuming from Suspend when on AC. So now I'm going back to the fix from jakon referenced by hotwiess at the top of page two.
    Registered Ubuntu User #20847

Page 2 of 34 FirstFirst 123412 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •