Comment 137 for bug 59695

Revision history for this message
Blue (vali-dragnuta) wrote : Re: [Bug 59695] Re: default value in power.sh potentially kills laptop disks

On Sun, 2007-10-28 at 13:26 +0000, Bart Samwel wrote:
> @Blue:
>
> Regarding this: "Even more, on the same manufacturer's site I found a
> document where they say that respinning up a harddisk takes a lot of
> power (the current peaks at about 1A) which means that if it's
> needed/done too frequently it basically nulls any power economy you
> would make by spinning the drive down in the first place..."

-------- I think it's a considerable effort due to the fact that they
needed to create a special "technology" to make it easier on the
drive :) Of course this depends on the drive speed too.

>
> I don't think this picture is entirely accurate. Typical drives draw ~1
> W while spinning without reading/writing, ~2 W while reading/writing,
> and ~2-4 W while spinning up. The break-even point depends on the exact
> values and the spin-up speed, although I guess that the total amount of
> power required to spin up will be somewhat constant (i.e., a longer
> spin-up will require a lower wattage). I did some measurements on this a
> while ago, published here:
>
> http://www.linuxjournal.com/article/7539
>
> You can see from the chart that spinning this particular drive down
> *every* 12 seconds already yields significant savings. This suggests
> that the break-even point lies somewhere around 6-8 seconds of spun down
> time.
>
> Now, regarding the "insane" -S4 setting for laptop mode: this setting is
> intended for battery mode only,

  But it gets activated for desktop where battery status cannot be
determined,too. And this is bad. Also, I don't find smart to try to
bring down the disk every 20 seconds because it is very likely that you
will have to respin it very, very soon later because of user activity or
system activity (there are a lot of files that are open and appended at,
varios logs, xsession-errors and so on). I'm not sure that we should
bring the power management to extreme. Please set -S4 to your laptop
and let it idle. You will see that anyway the hard disk stops and
respins every 1..2 minutes.

> and only on laptop drives. Let's do the
> math. Assuming you spin down the drive *only* while you're on battery
> (which is when it matters), and you get one spindown every minute.
> Assume the laptop lasts for 5 hours on every charge (a high estimate for
> typical laptops) and the battery has a lifetime of 1200 discharge-charge
> cycles (again, a high estimate). Then you have 1200 * 5 * 60 = 360000
> cycles before you have to replace your first battery, and then you can
> take another 800 cycles before the 600000 spindown mark is reached.
>
> Alternatively, consider when you use battery mode for exactly 5 hours a
> day, every day (a quite extreme situation). That's 300 spindowns per
> day, or 300*365 = 109500 spindowns per year. That yields a lifetime of
> 5.48 years (again assuming a lifetime rating of 600000 spindowns).
>
> Note that one spindown per minute is a very high average, you'll almost
> never hit that: usually, you have more extended periods of continuous
> drive usage (when you're doing stuff), as well as more extended periods
> of no drive usage (while you're reading stuff or editing a
> document/file). Also, five hours of on-battery usage on average *every
> day of the week* for years in a row is a very high estimate (I guess
> most laptops get used fully for either 5 or 2 days a week, not seven). I
> therefore think that -S4 is a pretty safe setting for on-battery usage.
> Also, setting it higher will cut into your power savings very fast. Set
> it to -S12 and your drive will probably not spin down very often at all,
> which means that you can just as well turn laptop mode off.
>
> Anyway, I think that any power management settings which make a drive
> load/unload once every minute *all the time* are doomed to kill drives.
> No need to blame this problem on the -S4, which is for a very special
> use case (on battery) only.

     Anyway, it seems that we have actually more problems. It is the
Load/Unload period -which we should address by putting a hdparm -B with
an appropriate value, and the spindown timeout which we should address
so that it really makes sense and does not creates a situation where
even let idle the system will get spinned/downspinned every minute or
two. If someone really needs that kind of power saving then he/she
should consider solid state disks which are more appropriate for
economy.
The third problem would be that on systems where the battery status
cannot be determined, to NOT activate extreme power management schemes,
because the system could be a desktop (with a drive not appropriate for
extreme power management) or a server...

And finally, I am still not convinced that a spin/unspin every minute or
to is healthy on ANY drive. A definitive answer regarding how sane would
be each of the settings (for load/unload and spin/unspin) could only be
given by a manufacturer representative. And while I myself do not have
the strings to require (and get) an official answer, Canonical on the
other hand, as a big commercial entity could be able to get it so that
once and forever we can set some settings at boot that are safe
according to the manufacturer's guidelines.
Actually, I think that this would be the best (and first) step to be
taken by the Canonical/Ubuntu team should do to address an issue that is
getting fuzzier and more debated by the day.