Re: updatedb+checksecurity are killing my battery
Laurent de Segur <email@example.com> writes:
> End result: I get longer battery life. However, there is probably
> something I missed that could help more in this direction. I would
> appreciate if people on the list could post more hints in order to
> get more juice off the hook. Thanks in advance,
My favorite trick is to remount my filesystems with "noatime".
Especially with a journalling filesystem like XFS, which has to touch
the disk in several places for metadata updates like access time
updates, it can be a big win.
Here's my power control function:
case "$1" in
# min power, set disk to spin down after 1 minute
$logger -p daemon.info -t pwrctl "going to minimum power"
# medium power, set disk to spin down after 2.5 minutes
$logger -p daemon.info -t pwrctl "going to medium power"
case "$2" in
$logger -p daemon.info -t pwrctl "ac in, remounting with atime"
mount -o remount,atime /
$logger -p daemon.info -t pwrctl "on battery, remounting with noatime"
mount -o remount,noatime /
# on battery, set disk to spin down after 5 minutes
# maybe force wakeup of media bay devices?
$logger -p daemon.error -t pwrctl "$0: invalid arg $1"