LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-15-2011, 02:40 PM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
13.1, libcgroup, and 2.6.37 autogroup patched kernel questions


hey guys!
so I decide to try patching the 2.6.37 kernel with the autogroup "fix-desktop-latency.patch" in my 13.1 system

all went well until I booted off the newly compiled kernel and at desktop cpu % stayed at 25% and ram at 160mb via conky in fluxbox
it's usually about 10-15% and 80mb ram when initially starting.

so I then grabbed the libcgroup source and slackbuild from -current, made a pkg and installed it, then rebooted

Now, everything seems to work better and firefox does seem faster and load and ram are reduced.

being an amateur, am I right in assuming I needed libcgroup with an autogroup patched kernel or no?
am I even right in thinking thiss patch is making things smoother/better??
thanks
 
Old 01-17-2011, 06:22 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by linus72 View Post
being an amateur, am I right in assuming I needed libcgroup with an autogroup patched kernel or no?
I don't believe so. My understanding is that libcgroup contains functions that allow you/or programs to control cgroups from userspace. the kernel autogrouping patch
is something that when enabled will automatically put processes into individual cgroups based on their session-id and as such doesn't have anything to do with libcgroup.

Quote:
Originally Posted by linus72 View Post
am I even right in thinking thiss patch is making things smoother/better??
It looks very situational.

Lets say you have an application program running (something interactive like firefox). and you then start a build with make -j 19.
You now have 20 programs running with equal priority. Firefox will get 5% (1/20th) of a share of the total cpu and each of the make jobs will also get 5% (I'm oversimplifying here as all the other processes in the system will still be getting their share and firefox will have more than a single process itself, but for sake of clarity lets pretend that those 20 processes are the only ones in the system). What's also important to remember though is that X itself is a process and will also need it's fair allocation of cpu time, and if that gets starved then every X program it serves will also suffer.

What the CONFIG_SCHED_AUTOGROUP thing will do is that instead of 20 process getting equal time, what will happen is that firefox will get 50% of the CPU and the 19 make processes will share the other 50%, so they'll get ~ 2.5% of overall cpu each.

Now, if you were running without the CONFIG_SCHED_AUTOGROUP but you chose to run "nice make -j 19 ...." then firefox would already be running at a higher priority than the 19 make jobs and in theory might even get higher than a 50% share if it needs it and the 19 make processes would get an equal share of whatever is left over.


Until this stuff matures and we can see it in operation I don't know whether this will be good or bad and how this will all interplay on a particular system with a particular workload is anyone's guess. My belief is that people don't make enough use of (re)nice as it is, and if they did there wouldn't be as much fuss over this new feature.

if you want to see what processes are going to be autogrouped into a cgroup (and competing with each other for cpu time) on your system then you can run this:
Code:
#!/bin/sh

#  list all processes in sessions

for session in $( ps hax -o sess | grep -v "   0" | sort | uniq )
do
   echo "Session: $session -------------------------------------"
   ps -f -s $session
done
The results don't look unreasonable to me, though there's some room for improvement. Judicious use of 'setsid' might improve matters further.

Last edited by GazL; 01-17-2011 at 06:25 AM. Reason: typo
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Autogroup patch and 13.1? linus72 Slackware 1 01-13-2011 07:29 AM
Added libcgroup mlpa Slackware 1 01-10-2011 08:16 PM
Debian patched kernel vs official Linux Kernel gerald45 Debian 7 10-12-2005 04:45 AM
About Kernel after getting patched small_boy22 Linux - General 3 05-19-2005 10:54 AM
make mrproper on patched kernel? shanenin Linux - Software 0 11-27-2004 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration