“Phoronix recently published an article regarding a ~200 lines Linux Kernel patch that improves responsiveness under system strain. Well, Lennart Poettering, a RedHat developer replied to Linus Torvalds on a maling list with an alternative to this patch that does the same thing yet all you have to do is run 2 commands and paste 4 lines in your ~/.bashrc file. I know it sounds unbelievable, but apparently someone even ran some tests which prove that Lennart’s solution works.”
It’s how the feature was tested before being implemented as an automatism in the kernel, so it’s not very surprising that it works.
Edited 2011-01-08 00:19 UTC
Old.
I read the same like 3 months ago.
Yes, very old. The link is even dated in the url, and is plainly dated once you get there and read it (Nov 18th, 2010). Maybe it was never posted on osnews, I don’t remember, but it certainly made the rounds everywhere else.
Edited 2011-01-08 00:47 UTC
and works with systemd only
yup (I think systemd 10+ only, in fact).
Bull crap. cgroups has nothing to do with systemd. You have your dependencies backwards.
So what if it’s “old” news.
Not all of us frequent dozens of IT sites.
It’s note worthy enough for archiving purposes alone.
Edited 2011-01-08 12:33 UTC
This is the kind of news that should have been an addendum to the original article, or posted the next day. The alternative was posted on November 16th, which is the same day as the original OS News coverage, but several hours earlier.
Hi, does this work only for programs started from the shell? What about for a regular GUI desktop environment?
Thanks!
The setup in the linked article is designed to create a new cgroup for each new shell (and their child processes).
There is nothing to stop you from creating cgroups of your own design though.
What I deplore is what I’ve always deplored with the Linux community in specific and the computing world in general: a simple explanation of what happens is nowhere to be found. Somehow, we are just supposed to be marveled at it if (and especially when) we don’t know exactly what is going on.
There isn’t even a mention of what the “200 lines” in question do. I’ve seen the news item when posted here on OSAlert, and I remember following the link and reading the linked article. That was some time ago. And now, you have to click links up to Phoronix before reading that the procedure is for enhancing the responsiveness of Linux.
Anyway, the linked article sucks in my opinion as it reminds me of that “leave’em in the dark” or “if you don’t already know then it’s not for you” attitude.
Edited 2011-01-10 11:28 UTC
To find out what the “200 lines” patch did was easy, and I did it when the article was first published; you simply had to go to the LKML thread on the topic and read it. No understanding of C was required. You can go back and do that now, if you like.
What’s more, this shell script approach was brought up in that very same LKML thread at that time and how it works was described to some extent.
Some understanding of CPU scheduling in general and Linux cgroups in particular is helpful to understand what’s going on here. So…
Official Kernel documentation on CGroups:
http://www.mjmwired.net/kernel/Documentation/cgroups.txt
Not recommended as an introduction, but if you miss details elsewhere this is for you.
Red Hat CGroups documentation:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/R…
And from the simple end, wikipedia:
http://en.wikipedia.org/wiki/Cgroups
Now that you understand what cgroups are, let’s get ni to the patch:
Here’s the LWN article covering the feature from the “200 line” patch, which explains it in some detail and the discussion around it:
http://lwn.net/Articles/415740/
Here’s the original LKML thread, which by now is scarily-long. I still recommend it since it’s the primary source:
http://thread.gmane.org/gmane.linux.kernel/1050575
Specifically, look at this post for the origin of the shell script version referenced by this very-late article:
http://article.gmane.org/gmane.linux.kernel/1063263
Now you, too, can be in the loop!
Thank you for this comprehensive post although I wasn’t asking for references (but I will read them) but just pointing out the lack of reader-friendliness and immediate information. When I read the linked article and its comments, it felt obvious that some information was missing. Thanks.
Old news to the propeller heads, new to me. If it’s old news to you skip the article fgs. The first one to stay “old news been there done that” gets a gold star!