[systemd-devel] [PATCH] run systemd-tmpfiles-clean only when we have AC power

Kai Krakow hurikhan77 at gmail.com
Sun Apr 6 03:07:16 PDT 2014


Tomasz Torcz <tomek at pipebreaker.pl> schrieb:

> On Thu, Apr 03, 2014 at 03:42:08PM -0300, Cristian Rodríguez wrote:
>> While it is cool to be neat and clean all the time, this
>> task can wait if we are on battery.
> 
>   What if I connect my laptop to AC only when it sleeps? This will
> never run.  I also don't think couple stats() and rm's have any
> measurable impact on battery.

Additionally, it may be counter-productive because /tmp is usually mounted 
as tmpfs, thus tmp files occupy RAM, and cleaning RAM usually optimizes for 
battery lifetime because it reduces the need for swapping.

I think the original intention behind this is not to wake up spinning disks 
- but it is almost impossible to ensure that anyway because standard 
flushing behavior of unix fs simply does not support this. For anyone 
wanting to optimize for that, they are smart enough to also optimize systemd 
for it.

-- 
Replies to list only preferred.



More information about the systemd-devel mailing list