Power Saving Features

Power Saving Features

Post by XY » Fri, 16 Feb 1996 04:00:00



   I have 2 hard disks on my computer, a 540MB EIDE Quantum Fireball and a
1020MB Western Digital Caviar.  540MB is the master and 1020 is the slave.
5 min after booting linux I can hear a click and the master drive spins  
down, however the slave drive is always spinning even if no one is logged
on for a long time...  is there anyway to spin down my slave drive?  And
after 5 min of inactivity, my monitor blanks out however it does not acually
go into low power mode(where the light indicator changes from green to
orange)  Is there anyway to setup my computer so that I can save as much
electricity as possible when no one is logged on?
 
 
 

Power Saving Features

Post by Carlos Puch » Tue, 20 Feb 1996 04:00:00


hi, my problem is related. if i set the power down to 3 minutes,
a couple of minutes after the disk goes down, some process
starts doing disk activity (without me touching the machine)
and turns the disk power back up. kind of wasteful.
it is not the crontabs, i have checked, so i have no idea
what i can be.

any clues?

 
 
 

Power Saving Features

Post by Jon Rabo » Tue, 20 Feb 1996 04:00:00




>hi, my problem is related. if i set the power down to 3 minutes,
>a couple of minutes after the disk goes down, some process
>starts doing disk activity (without me touching the machine)
>and turns the disk power back up. kind of wasteful.
>it is not the crontabs, i have checked, so i have no idea
>what i can be.

Did you disable cron? If not, it's probably cron, which has to run and
check the crontabs even if there's nothing actually in them. Also,
kernel swapping (maybe the kswap patches in later kernels?) may cause
disk I/O. I agree, it's mightily tedious, and possibly harmful to the
drives if they are constantly spinning down & back up again.

I leave my system up 24 hours/7 days a week on a network - the monitor
powersaves nicely after 10 mins, nobody is running much so the CPU spends
most of its time halted.  It's only the disks which cause me problems. Is
there any way of causing the whole system to sleep, spin down disks etc to
be reawakened at a certain time? I guess this entails completely stopping
cron and similar processes, setting a disk spindle timeout of a minute or
so, disconnecting or ignoring network I/O etc. As cron would be down, you
would have to have some sort of watchdog in the kernel to wake up at the
specified time... seems like a lot of effort to spin two disks down.

Anyone know how much power the average hard disk uses just spinning, and
whether bearing failure is caused by spinning up/down, or continous
rotation?

Jon.
--
/--------------J. K. Rabone-------------\ 'You see someone through a window
| http://piranha.chu.cam.ac.uk/~jkr1003 |  Who you've just learned to miss

\-----------Phone 01223 331547----------/  You've used up your last wish'

 
 
 

Power Saving Features

Post by vp24n.. » Tue, 20 Feb 1996 04:00:00



>Is there any way of causing the whole system to sleep, spin down disks etc to
>be reawakened at a certain time?

Its called the power switch.
Turn the system off when you want it to sleep,
and when that cretain time comes around, turn it back on.
Getting power saving to work in Linux is a waste of time.
 
 
 

Power Saving Features

Post by rodney d slo » Tue, 20 Feb 1996 04:00:00



Quote:>hi, my problem is related. if i set the power down to 3 minutes,
>a couple of minutes after the disk goes down, some process
>starts doing disk activity (without me touching the machine)
>and turns the disk power back up. kind of wasteful.
>it is not the crontabs, i have checked, so i have no idea
>what i can be.

I think that it is in the kernel and it syncs the disk every so often.  I
asked on a kernel group for this to be able to be disabled in the make config
if the kernel is compiled for apm.  I got no responses, so you might want to
try too.
--
Rodney Daryl Slone             http://www.engr.uky.edu/~rdslon01
Electrical Engineering Grad Student / "Grounds are pretty common." - me
University of Kentucky             / Nail here [] for a new monitor.

 
 
 

Power Saving Features

Post by Carlos M. Puch » Tue, 20 Feb 1996 04:00:00



|I think that it is in the kernel and it syncs the disk every so often.  I
|asked on a kernel group for this to be able to be disabled in the make config
|if the kernel is compiled for apm.  I got no responses, so you might want to
|try too.

there is an apparent contradiction here. on one hand, some
people use apm successfully (they get the kernel to power
off the disk). on the other hand, it would seem that the
syncing process is in the kernel even when apm is compiled
in. so, either the people who use apm with success don't
notice that their disk is being awakened so often or the
syncing process is not present in the kernel when apm is
compiled (contrary to what you point out).

thanks,

-- carlos

 
 
 

Power Saving Features

Post by Jon Rabo » Tue, 20 Feb 1996 04:00:00





>>Is there any way of causing the whole system to sleep, spin down disks etc to
>>be reawakened at a certain time?

>Its called the power switch.
>Turn the system off when you want it to sleep,
>and when that cretain time comes around, turn it back on.
>Getting power saving to work in Linux is a waste of time.

Ooops, looks like I forget the SNB in that post. *sigh* Let me put it this
way; I have lusers who tend to logon anytime up to about 3am, and I'm not
going to wait up until then to turn the machine off. Neither do I
particularly want to deny them service if I, say, shutdown at 11pm and go
to bed. So, as the system already has several useful powersaving features,
which work rather well, I thought maybe I could jog some of the more
intelligent, forward thinking Linux developers into maybe writing some
code and contributing it to the Great Cause (TM), as I am not up to speed
on kernel level hackery. Clearly I got a wrong number, sorry to waste your
precious time.

Jon.
--
/--------------J. K. Rabone-------------\ 'You see someone through a window
| http://piranha.chu.cam.ac.uk/~jkr1003 |  Who you've just learned to miss

\-----------Phone 01223 331547----------/  You've used up your last wish'

 
 
 

Power Saving Features

Post by rodney d slo » Wed, 21 Feb 1996 04:00:00




>|I think that it is in the kernel and it syncs the disk every so often.  I
>|asked on a kernel group for this to be able to be disabled in the make config
>|if the kernel is compiled for apm.  I got no responses, so you might want to
>|try too.
>there is an apparent contradiction here. on one hand, some
>people use apm successfully (they get the kernel to power
>off the disk). on the other hand, it would seem that the
>syncing process is in the kernel even when apm is compiled
>in. so, either the people who use apm with success don't
>notice that their disk is being awakened so often or the
>syncing process is not present in the kernel when apm is
>compiled (contrary to what you point out).

I have a 1.2.13 kernel patched with apm.  The disk powers down, but wakes up
later to sync and then powers down again.  Very annoying and shortens battery
life.

There is code in /usr/src/linux/drivers/block in two or more files that
contains sync().  I am sure there is much more, but a minute look revealed
at least this much.

This could have changed since 1.2.13, I hope so, but doubt it.

Later,

Quote:>thanks,
>-- carlos

--
Rodney Daryl Slone             http://www.engr.uky.edu/~rdslon01
Electrical Engineering Grad Student / "Grounds are pretty common." - me
University of Kentucky             / Nail here [] for a new monitor.

 
 
 

Power Saving Features

Post by Martin Kneis » Wed, 21 Feb 1996 04:00:00


If you have multiple disk drives you should try to setup one that runs
all the time. This should have swap, root fs, var, tmp and everything
that gets accessed even during 'idle' time. Remember that directories
are updated when read accesses occur to their contents (access time
changes). Otherwise you have to disable (kill) all jobs that access
files without user interaction.  cron, sendmail and syslog are in this
category.

I have /home and some shared files that are not used by linux on a
disk that has power management enabled. It works fine: the disk spins
up only when users are active.

Martin.
--

Aachen (Germany)                     voice:  +49 241 553206          

 
 
 

Power Saving Features

Post by Jon Rabon » Thu, 22 Feb 1996 04:00:00


Quote:> Spinning down disks is somewhat tricky, though, since many daemons cause disk
> access even when the system appears to be idle. Don't be too surprised if your
> disks do not spin down, even though you think noone is using them.

Yes, this was the problem I have been trying (clearly not very well) to
explain. What I want is some means of suspending _at kernel level_ all
process activity, and waiting on a 'wake up' signal from e.g. the console
keyboard, without manually taking the system down or killing daemons etc.

Jon.

/--------------J. K. Rabone-------------\ "There's a picture I like to look at
| http://piranha.chu.cam.ac.uk/~jkr1003 |  A picture of a beautiful face.

\-----------Phone 01223 331547----------/  Sends me to a better place..."

 
 
 

Power Saving Features

Post by Jon Rabo » Thu, 22 Feb 1996 04:00:00




Quote:>> Spinning down disks is somewhat tricky, though, since many daemons cause disk
>> access even when the system appears to be idle. Don't be too surprised if your
>> disks do not spin down, even though you think noone is using them.

>Yes, this was the problem I have been trying (clearly not very well) to
>explain. What I want is some means of suspending _at kernel level_ all
>process activity, and waiting on a 'wake up' signal from e.g. the console
>keyboard, without manually taking the system down or killing daemons etc.

Please do not reply to the previous posting by email. Thanks to the
misbegotten * of a mail/newsreader, Pine, the headers are broken,
and any mail will bounce. Apologies to whoever-it-was who's private email
I have inadvertently reproduced above.

Jon.
--
/--------------J. K. Rabone-------------\ 'You see someone through a window
| http://www.veryComputer.com/~jkr1003 |  Who you've just learned to miss

\-----------Phone 01223 331547----------/  You've used up your last wish'

 
 
 

Power Saving Features

Post by Peter Suetterl » Thu, 22 Feb 1996 04:00:00





>     (Carlos M. Puchol) writes:


>>|I think that it is in the kernel and it syncs the disk every so
>>|often.  I asked on a kernel group for this to be able to be
>>|disabled in the make config if the kernel is compiled for apm.  I
>>|got no responses, so you might want to try too.

AFAIK it's not the kernel, because the update daemon only spins the
disk up if there is really something to write. At least for my kernels
(1.2.13 with kswap patches and 1.3.59 and upwards) that is the case.
I have disabled cron (read disk every minute) and set the sendmail
demon to 30 Minutes.  This is the time span my disk spins up.

Quote:>>there is an apparent contradiction here. on one hand, some
>>people use apm successfully (they get the kernel to power
>>off the disk). on the other hand, it would seem that the
>>syncing process is in the kernel even when apm is compiled
>>in. so, either the people who use apm with success don't
>>notice that their disk is being awakened so often or the
>>syncing process is not present in the kernel when apm is
>>compiled (contrary to what you point out).

Neither nor.  It's not sync.

Quote:>I have a 1.2.13 kernel patched with apm.  The disk powers down, but
>wakes up later to sync and then powers down again.  Very annoying and
>shortens battery life.

You are running crond!? I had the same behaviour until i killed it.

One idea (never tried, though) would be to put the crontab files on a
(small) ramdisk. Maybe i'll try some day (easy now, as you can load
ramdisk as a module ;^) )

  Peter

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Peter "Pit" Suetterlin                  http://www.kis.uni-freiburg.de/~ps
Kiepenheuer Institut fuer Sonnenphysik

 -- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * --
Come and see the stars!             http://www.kis.uni-freiburg.de/~ps/SFB
Sternfreunde Breisgau e.V.
Tel.: +49 761 73571 or 278588
__________________________________________________________________________

 
 
 

Power Saving Features

Post by Raul SILVE » Thu, 22 Feb 1996 04:00:00


:    I have 2 hard disks on my computer, a 540MB EIDE Quantum Fireball and a
: 1020MB Western Digital Caviar.  540MB is the master and 1020 is the slave.
: 5 min after booting linux I can hear a click and the master drive spins  
: down, however the slave drive is always spinning even if no one is logged
: on for a long time...  is there anyway to spin down my slave drive?  And
: after 5 min of inactivity, my monitor blanks out however it does not acually
: go into low power mode(where the light indicator changes from green to
: orange)  Is there anyway to setup my computer so that I can save as much
: electricity as possible when no one is logged on?

You can use "setterm -powersave on" at boot time to let the monitor
go to low power mode (orange light).

_____________________________________________________________________________
Raul Silvera M.   | M.Sc. Student at  |See my web page:          

-----------------------------------------------------------------------------

 
 
 

Power Saving Features

Post by Jesper de Jon » Fri, 23 Feb 1996 04:00:00




> :    I have 2 hard disks on my computer, a 540MB EIDE Quantum Fireball and a
> : 1020MB Western Digital Caviar.  540MB is the master and 1020 is the slave.
> : 5 min after booting linux I can hear a click and the master drive spins  
> : down, however the slave drive is always spinning even if no one is logged
> : on for a long time...  is there anyway to spin down my slave drive?  And
> : after 5 min of inactivity, my monitor blanks out however it does not acually
> : go into low power mode(where the light indicator changes from green to
> : orange)  Is there anyway to setup my computer so that I can save as much
> : electricity as possible when no one is logged on?

> You can use "setterm -powersave on" at boot time to let the monitor
> go to low power mode (orange light).

And for the harddisks: There is a utility called "hdparm" which lets you
set many different parameters, including the spin-down time etc.

But maybe the problem is somewhere else: Maybe there is some resident
program ('daemon' in Unix, like a TSR in DOS) that runs commands
periodically. That daemon accesses the harddisk every five minutes, for
example, so that the harddisk will never be idle for the time you set, so
it won't spin down.

      - Jesper.

-------------------------------------------------

-------------------------------------------------

 
 
 

Power Saving Features

Post by David Rouss » Sat, 24 Feb 1996 04:00:00



says...

Quote:

>   I have 2 hard disks on my computer, a 540MB EIDE Quantum Fireball and a
>1020MB Western Digital Caviar.  540MB is the master and 1020 is the slave.
>5 min after booting linux I can hear a click and the master drive spins  
>down, however the slave drive is always spinning even if no one is logged
>on for a long time...  is there anyway to spin down my slave drive?  And
>after 5 min of inactivity, my monitor blanks out however it does not acually
>go into low power mode(where the light indicator changes from green to
>orange)  Is there anyway to setup my computer so that I can save as much
>electricity as possible when no one is logged on?

I'm not sure where I read this but the is a pacth that will he you.
Apparently the problem is to do with the ext2 filingsystem writing certain
flags to the disk, and the patch alters this so that disks can be spun down
for longer.  Also it is possible to put crontabs in a ramdisk so that cron
can be used without any worries.  I think if you hunt around some ftp site
you may well bump into it.

Last time I had a mess around with the power saving features my idea was to
powersave without shuting down when I went away from the machine for a while.
Since my machine is standalong I don't have to worry about other people using
it. So I created a script which set the screen blanking and hd spin down to
the minimum, then waited for a key press, and then set the time delay back to
normal.  So when I go away from my comp I run the script and it powers down
almost imeadeatly.

Dave