Re: [Tracker] How to use cgroups for Tracker?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/10/2014 16:35, Martyn Russell wrote:
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.

I'd go for a and b, and make it possible to disable it with a command
line option on tracker-extract, tracker-miner-fs, tracker-writeback
and tracker-store (needed for a and c).

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 :)

We could in a examples/config/ have a folder with systemd and even
perhaps a make install-config target in its Makefile?

Systemd integration is for the distribution normally, but that doesn't
stop us from providing examples of course.

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?

For the N9 we had similar ideas on detecting when the phone is being
charged. So I'd say keep it generic and let an external event do the
pausing and unpausing (a D-Bus API).

That way an embedded appliance can choose the behaviour (battery is
charging => start indexing, low battery => pause, when we take a
picture the result is all black so the phone is in the user's pocket
=> start indexing), and a desktop use-case can have a different behaviour.

I guess for the Documents/ folder of the user we shouldn't pause. But
we could also let pausing mean: don't do the second stage metadata
extraction (now that files are processed in two stages), but do the
first stage (the miner-fs' part).

Thoughts?

Thanks, forgive the cross-list post.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (MingW32)

iQEcBAEBAgAGBQJUPUI9AAoJEEP2NSGEz4aDnacH/jd2tfWilQgR6ByU3onMPhJT
sF8Mw6vJiQPbeVlqJr+gDmFZuLb8cNTZXd7bdAejRvcADTxkigAlbbwfJdfOyIPQ
2g8cHuv5M0uqa1E0dZWcqPBgY8dC3vZp4mfOzbcR2b78TyJjpviDtCGFw9iDGpzx
lpODJZeAh2bxhRozfYOdDc0SWAzmXxk8dpM6SG/ULH+sYlGC8hu4PqKzRUoKBpTm
5Fg+/Iy3WCjRALe+xGEcTh+grDcbz7eurxchbhRBhIMSr0e4fZFtpZSa72PC1Ydu
5kjYpXP1vxiRWGHjntiIFcLLlVON4sPl4fC7WTIGRma+5hG5Wx9mUCYkFHiMOEc=
=aVBn
-----END PGP SIGNATURE-----


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]