On Wed, Nov 24, 2021 at 07:28:25AM +0900, Dominique Martinet wrote:
Ben Cotton wrote on Tue, Nov 23, 2021 at 12:18:56PM -0500:
== Summary == The venerable `mlocate` program is replaced by `plocate` — a compatible reimplementation that is faster and uses less disk space.
Thanks for doing this!
The positive responses make me very happy ;)
For what it's worth, I've been running plocate locally since it was brought up to the list earlier this year(?), and while it's much faster I have one small complain: the indexing phase is way too power-hungry.
This is not actually a complain about power draw (there's the onACpower conditional as rightfully pointed out), but about kicking in the fans a few times a week (because of the randomized delay, it happens when I'm at desk regularily) when I'm at desk.
My understanding is that in order to minimize the overall energy consumption, the scheduler will try to maximize the cpu frequency and minimize the total time of computation… So a cpu scheduler will not help much here, as they will all schedule 100% of the cpu. AFAIK, there is no scheduler that allows saying "schedule this so that so that the fans don't go on". From the amount of complaints about loud fans, I think it would be a popular feature. (There is something similar with "lap protection", where heating is avoided if the laptop is detected as not-on-a-surface).
Please try with the following file:
# /etc/systemd/system/plocate-updatedb.service.d/limits.conf [Service] CPUAccounting=yes CPUQuota=20%
(then 'sudo systemctl daemon-reload && sudo systemctl restart plocate-updatedb'). I think this could work.
Zbyszek