kernal patch updates

0 views
Skip to first unread message

pahnin sd

unread,
Nov 20, 2010, 11:28:05 PM11/20/10
to nitrkllug
Firstly 
If you dont know that they developed a 200 lines kernal patch which makes the linux systems 10 times faster than now .. you are lagging behind 

the second thing is today I found out that some one moved even further and developed a 2 lines patch for bash.rc file which makes better result 
this is for you if wanna give that a try 


even more updated code 

if you dont want to click the link here is the code 

Start by editing your rc.local file, running sudo gedit /etc/rc.local and add the following lines above "exit 0":

mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent

Save and exit gedit. Now, make it executable:

sudo chmod +x /etc/rc.local

After doing this, edit the .bashrc file found in your home directory (gedit ~/.bashrc) and, at the end of this file, add:

if [ "$PS1" ] ; then  
   mkdir -m 0700 /dev/cgroup/cpu/user/$$
   echo $$ > /dev/cgroup/cpu/user/$$/tasks
   echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release
fi

One last thing. To make sure that cgroups are deleted whenever the last task leaves, run:

sudo gedit /usr/local/sbin/cgroup_clean

And copy-paste this:

#!/bin/sh
rmdir /dev/cgroup/cpu/$*

Once again, save the file, exit gedit and make it executable:

sudo chmod +x /usr/local/sbin/cgroup_clean

Done! Restart your computer to apply the changes.
Reply all
Reply to author
Forward
0 new messages