UPower: Reduce disk writes?

Stuart Miller permanentlylostinsightofland at gmail.com
Thu Jun 6 12:39:48 PDT 2013


Dear Richard Hughes,

I'm running Debian Testing with upower version 0.9.17. I've looked been
searching to reduce the power consumption of my laptop for a long time now,
and upowerd appears to write to disk a large amount in comparison to other
daemons. I've found the code responsible, in up-history.c. The program is
compiled to save the power usage statistics in /var/lib/upower/* every ten
minutes, and to keep a week's worth of data. For my computer this amounts
to 800KB of data. That adds up to be in excess of 100MB written/day!

Although I recognize that this is not likely to have a significant effect
in itself, when compounded with disk encryption, full disk backups, a small
SSD or a heavy-disk use server this will cause a noticeable effect. I
regret that I do not have the skills to submit a patch, but I'd like to
express my concerns nonetheless. Please consider editing your save function
to write only the latest changes to these files. Baring that, consider
letting the save frequency be changed as a variable in
/etc/UPower/UPower.conf. This is certainly a desired feature, as shown by
bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=641845

I see that when first designed, upowerd saved statistics every five
seconds. Your present choice of ten minutes is a much saner value. However,
if not technically impossible, I strongly suggest you add a user config for
this setting.

I have measured this >100MB/day disk write behavior using the iotop command
utility with the -P and -a options. whatever the present size of all the
files in /var/lib/upower/ can be observed being written every ten minutes.

Apart from this, I'd like to compliment you all on this stable utility.
I've learned a lot about UPower. I plan to save all my power statistics
logs for future analysis from now on, as I find power usage interesting. I
have also personally enjoyed your blog  and made use of the information
about colord on it - Thanks!

Sincerely,
Stuart Miller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20130606/1a640183/attachment.html>


More information about the devkit-devel mailing list