Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1919  / 2 Years ago, tue, august 16, 2022, 4:36:22

Some years ago there was a lively discussion about Ubuntu reducing the hard disk lifespan by operating the hard disk in an aggressive power saving mode on default, which causes an excessive number of load cycles.


I've just checked the status on my Xubuntu 14.04 laptop with smartctl -a /dev/sda. Result: 4211 load cycles in 180 hours. When the power adapter is unplugged and the laptop runs on battery, every ~3 seconds a new load cycle happens. This is way too much.


So my question is: Has anything changed since that discussion? What should I do to reduce the frequency of load cycles? Are the old solutions still valid / state of the art?


More From » 14.04

 Answers
3

As of May 2017, the discussion is still valid, at least for certain types of hard disks and the old solutions are still doing the job. The trick is to set the power management level to less aggressive. On most disks



# hdparm -B /dev/yourdisk


will give you the APM (advanced power management) level currently set. You'll set it by the same command, with actual desired value.



# hdparm -B 254 /dev/yourdisk


Values range from 1 (the most aggressive power saving) to 254 (the least aggressive power saving). Values 128 and less will even allow spindown. 255 will disable APM altogether (not supported by every model). The level depends on the system's category (desktop does not IMHO need any other value than 254, and laptop... well either experiment a little or buy an SSD :)).



On Western Digital it gets more complicated. You either use the WD's utility WDIDLE3.EXE as in this post: https://ubuntuforums.org/showthread.php?t=1565889 or utilize hdparm again, this time with -J option (the specified values are in seconds to park the heads, read about the ranges in hdparm's man page next to -J option). The latter approach is less recommended, and does not work with all their drives.



I highly recommend to read this archlinux wiki page https://wiki.archlinux.org/index.php/hdparm where they discuss also how to make the change with hdparm permanent by making a udev rule in /etc/udev/rules.d/50-hdparm.rules:



ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda", RUN+="/usr/bin/hdparm -B 254 -S 0 /dev/sda"

[#24653] Wednesday, August 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
egantfis

Total Points: 406
Total Questions: 108
Total Answers: 108

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
egantfis questions
Mon, Nov 1, 21, 03:37, 3 Years ago
Fri, Mar 18, 22, 23:26, 2 Years ago
Mon, Mar 6, 23, 05:03, 1 Year ago
Sun, Oct 3, 21, 23:30, 3 Years ago
Thu, Mar 10, 22, 12:28, 2 Years ago
;