Skip to content

POC: resource contrained Baloo

Jan Blackquill requested to merge work/janb/systemd-limit-proof-of-concept into master

cgroups can be utilised to constarin the resource usage of processes. An obvious thing to apply this to is Baloo, as a background service is generally not something users want consuming a large amount of resources. This is a proof of concept merge request utilising the systemd-run tool to accomplish this. It falls back to launching baloo directly if systemd-run fails, so it doesn't affect systems without systemd.

A more technically correct application of this would be to have baloo_file speak to systemd over dbus in order to put it into a scope, and use the DBus API to allow dynamically customising constraints, e.g. relaxing them when the system is idle and increasing them when other processes want to utilise the CPU.

Or, to be even more technically correct, baloo would hand over duties of managing baloo_file to systemd's user service management.

Edited by Jan Blackquill

Merge request reports