[systemd-devel] How to use cgroups for Tracker?

Martyn Russell martyn at lanedo.com
Tue Oct 14 07:35:19 PDT 2014


Hello all,

Recently I've started looking into support for cgroups due to this bug:
http://bugzilla.gnome.org/show_bug.cgi?id=737663

It was suggested I ask you guys to see what the best way forward would 
be here. It seems there are different opinions about how to do this 
including:

a) allow the session manager to take care of it.
b) do it ourselves in Tracker.
c) do nothing, fallback to cgroups per user which are already in place
    (depending on distro I guess).

I personally would rather have a backup plan and go for b) because 
Tracker processes are not always spawned the same way.

What I had in mind to do, was to use a config file with libcgroup and 
load it in at runtime for processes that are heavy on I/O, CPU and/or 
Memory. From what I understand, this would require permissions to 
install the "profile" at some point (installation? of Tracker) and then 
just call upon that "profile" at run time for a given PID.

Another option would be to use systemd. However, I am mindful that it's 
not available everywhere just yet (but soon will be I hear) I am also 
aware, I might get a biased answer here :)

Does anyone have any suggestions or projects that lead by example that 
Tracker could/should follow?

Orthogonal to all of this, is another idea I had, which is to completely 
pause Tracker when the user is present (keyboard/mouse use) to avoid 
wasting cycles on stuff the user doesn't care about - a bit like how 
chat clients know when you're away or not. Maybe we should do both?

Thoughts?

Thanks, forgive the cross-list post.

-- 
Regards,
Martyn


More information about the systemd-devel mailing list