LWN.net Logo

A group scheduling demonstration

A group scheduling demonstration

Posted Mar 27, 2011 12:26 UTC (Sun) by poelzi (subscriber, #14953)
Parent article: A group scheduling demonstration

My conclusion to autoscheduling is that it is simply broken. If you look at 'ps xaw -O session' you will see that nearly everything will end up in the same group. Process group 'ps xaw -O pgrp' shows a little bit better distribution but still needs some fixes in at least the major desktop UIs GNOME/KDE.
As maintainer of ulatencyd https://github.com/poelzi/ulatencyd I came the conclusion that there is no way to optimize a system based on such simple rule. You need workarounds and heuristics and also contact to the X server etc.


(Log in to post comments)

A group scheduling demonstration

Posted Mar 28, 2011 22:57 UTC (Mon) by Duncan (guest, #6647) [Link]

Running Gentoo (so no systemd) with mainline 2.6.38, auto-grouping on, kde 4.6.1, here. I hadn't tried tracking sessions and wasn't sure how to (tho I could have RTFMPed), so thanks for the ps commands.

But they show a reasonably logical grouping, here. Sure they aren't perfect, but the grouping is reasonably good given the simpleness of the algorithm. Each tty gets its own session as does each pts. The kernel threads are all session 0. init is session 1. Various daemons each get their session, shared with forks. startx, etc, has a session. kdeinit4 has a session that includes most of X. akonadi gets a session. nepomuk does too.

The only thing that seems "wrong", if you can call it that, is that most of KDE (or more generally X, tho here, X itself has its own session) and its apps share a session. But that's a given with the algorithm used, and as this LWN article demonstrates, even then there are benefits, as it tends to isolate all of X into its own little corner so it can't interfere with the rest of the system and there's still enough interactivity available outside X to take down a runaway process. Sure, splitting the X group further would be nice, especially for "CLI-challenged" individuals, but autogrouping really does vastly improve things.

I do find it comforting that KDE's so-called "semantic desktop" bits are isolated to their own sessions, however. Neither nepomuk nor akonadi can run away with things. Similarly, CLI sessions are just that, pts or tty, they're in their own session, thus isolating system-update jobs (I DID say Gentoo after all =:^) into their own corner.

Duncan

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds