Nicer (slower) indexing and extraction behavior by default to avoid hammering the filesystem IO and CPU on normal computers, using `throttle` and `initial-sleep`?
For many years I had a problem with tracker's files miner trashing my filesystem and CPU to inspect and index my hundreds of thousands of files, especially on session login. It was making my ThinkPad X220's CPU fan go full blast as the temperatures were reaching 70° Celsius and above, and it was making my whole desktop lag (as the Linux kernel and graphics stack is notoriously bad at making the whole GNOME desktop lag when IO is getting hammered). I had lost count of how many times I had to kill tracker's processes from gnome-system-monitor because it was being insufferable.
What I found to significantly alleviate (or even eliminate/solve) the problem was to have these two gsettings (in org.freedesktop.Tracker3.Miner.Files
) set this way:
initial-sleep = 45
throttle = 20
When I found these settings, it was a revelation. They alone made Tracker usable for me.
- Why 45 seconds for initial-sleep? Because I typically need time (lots of time) to launch my applications immediately after login. 15 seconds is very much insufficient for Firefox to launch in my case, it easily needs a minute, during which it will peg the CPU, and Tracker would just be adding extra chaos on top, whereas if Tracker waits a minute or so before starting stuff in the background, then it doesn't bother me... which brings me to the second point...
- Throttling it to the slowest setting (20): unless it is used in a special embedded application (ex: airplane or automotive IVI or media server or something), I do not see a reason to index at anything above "slowest/nicest/lightest" speed. I don't care if my computer takes a few minutes more to do the job if that means it won't be lagging and running its fans like a turbo jet during that time.
Have you considered having these "less agressive" settings be the default, for lowering the hit on overall desktop performance and power consumption? I would tend to think they would work better for most users, especially those with a ton of files.
Possibly in combination with:
index-on-battery = false
index-on-battery-first-time = true
...as when I'm on battery, I want the absolute best power savings with the least possible CPU wakeups. I don't mind waiting for the next time I'm plugged on AC (which always comes pretty soon) before it tries to index again, when I already have 90% of the index already built from the first time.