“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.”
Alternative to the “200 Lines Kernel Patch that Does Wonders”
About The Author
Follow me on Twitter @thomholwerda
2011-01-08 12:45 amgalvanash
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
2011-01-08 1:11 amsomebody
and works with systemd only
2011-01-08 2:43 amAdamW
yup (I think systemd 10+ only, in fact).
2011-01-08 7:26 pmFishB8
Bull crap. cgroups has nothing to do with systemd. You have your dependencies backwards.
2011-01-08 12:31 pmfran
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
2011-01-10 1:47 pmsorpigal
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?
2011-01-08 7:32 pmFishB8
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 OSnews, 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
2011-01-10 1:43 pmsorpigal
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:
Not recommended as an introduction, but if you miss details elsewhere this is for you.
Red Hat CGroups documentation:
And from the simple end, wikipedia:
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:
Here’s the original LKML thread, which by now is scarily-long. I still recommend it since it’s the primary source:
Specifically, look at this post for the origin of the shell script version referenced by this very-late article:
Now you, too, can be in the loop!
2011-01-10 3:03 pmvodoomoth
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!
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
I read the same like 3 months ago.