[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting longer battery life with laptop-mode (was: Re: Installing Debian using debian-sarge-netinst.iso (powerpc))



On Wed, Aug 11, 2004 at 03:02:55PM -0300, Rogério Brito wrote:
> On Mar 08 2004, Matijs van Zuijlen wrote:
[...]
> > I also have:
> > 
> >   # cat /proc/sys/vm/bdflush
> >   30      500     0       0       600000  600000  60      20      0
> > 
> > This will stop the disk from spinning up every time things like gconfd,
> > chrony, or galeon (or any other web browser with crash recovery) write
> > stuff to disk (which is often).
> 
> I don't have this file. I am using a 2.6 kernel. I think that the above
> applies only to Linux 2.4.

True. I'm now using a 2.6 kernel as well, and now I have:

# cat /proc/sys/vm/dirty_expire_centisecs
60000
# cat /proc/sys/vm/dirty_writeback_centisecs
60000

The init script in Documentation/laptop-mode.txt sets the correct
values for the 2.6 kernel as well.

> > And:
> > 
> >   # cat /proc/sys/vm/laptop_mode
> >   1
> > 
> > This will cause the system to write all unflushed data to disk _once
> > there's a spinup_.
> 
> Yes, I saw that laptop-mode is a nice thing to use, as it tries to combine
> both reads and writes in a single operation. Quite neat.
> 
> > And I use noflushd with a one-minute spindown time.
> 
> Ooops! I just started reading about laptop-mode in the Documentation
> directory of the Linux kernel and it says that laptop-mode should not be
> used in conjunction with noflushd---it says that laptop-mode should be used
> with hdparm instead.

Well, I wasn't aware of that, and it _was_ working fine here, until I
rebooted yesterday: there were no more spindowns. I'm using hdparm now as
well. It's a much cleaner solution, I think.

> Does anybody else have comments on getting long battery life tweaking the
> disk?

From man hdparm:
   -B  Set Advanced Power Management feature, if the drive supports it.  A
       low value means aggressive power management and a high  value means
       better performance. A value of 255 will disable apm on the drive.

I'm trying it out now.

I don't know if I mentioned this already, but I use vim, and I have set it
to not flush its swap file. That helps a lot.

-- 
Matijs van Zuijlen

Attachment: signature.asc
Description: Digital signature


Reply to: