[systemd-devel] Designing a scheduler interface

Daniel Poelzleithner poelzi at poelzi.org
Thu Jan 13 09:29:27 PST 2011


Hi,

I'm currently implementing a dynamic linux kernel optimizer called
ulatencyd [1]. In my opinion the desktop experience (which applies to
servers as well) can be much improved by dynamically adjusting the the
kernel. Having a very fair scheduler is a very good thing, but this is
not the best experience for a user. The user for example expects the
current used program to be as fast as possible, not some random
background task getting the same cpu usage. To accomplish this I
implemented a userspace daemon that analyses the system, and dynamically
adjusts parameters of the kernel. Currently this is mostly done with
cgroups, but interfaces to other parameters like ionice etc already exist.

Many parameters can already be detected by looking at system stats like
free memory, swapout usage and the process parameters like rss, session,...

What is currently unknown on the other hand is the current active X
window in use. This could be done by connecting tho X and reacting to
events there, but I think a cleaner approach would be that the window
manager signals the running optimisation daemon that a given program is
of user importance. May it be that the program has focus or is visible
on the screen. I would like to have a standard dbus interface for this.

Another problem I expect are clashes between systems that try to control
similar kernel subsystems. systemd at least uses cgroups in some parts.
We need to define some interface between init and the scheduling daemon
if one is running. Elsewise some expected behaviour won't work. When
init signals the optimizer the importance of services, this could be
taken into account for the decision he makes.

Currently I'm a little bit clueless how such a interface could look
like, so I ask projects involved so we can design it together as a standard.

I hope xdg mailinglist is the best place for this discussion, as we are
defining a standard.

[1] https://github.com/poelzi/ulatencyd

kind regards
 Daniel Poelzleithner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110113/350cde37/attachment.pgp>


More information about the systemd-devel mailing list