Making Ubuntu faster

Hi y’all. There’s this hacker who recently created a 200 lines linux kernel patch that does wonders which made Linus Torvalds happy. Anyway, while browsing the internet last Sunday I came across this blog post (warning: it’s in Portuguese!) which promises to make your Linux Desktop faster without forcing the user to apply a patch onto the kernel and then recompile it. So I decided to get my hands dirty and follow all the steps and I am now happy with the results so I figured I should share it with you guys. It seems this tip was originally created by some fedora developer (I’m not sure though).

Ok, long story short, let’s do it!

Open up a terminal window and edit (use any editor you like, in my case I used nano which is my favorite command line one) the file /etc/rc.local with the following command:

sudo nano /etc/rc.local

Now insert the following lines before the ‘exit 0’ line

mkdir -p /dev/cgroup/cpu

mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "1" > /dev/cgroup/cpu/user/notify_on_release
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
Now create the file /usr/local/sbin/cgroup_clean with this command: sudo nano /usr/local/sbin/cgroup_clean
cgroup_clean’s contents should be:

if [ "$1" != "/user" -a "$1" != "/user/" ]; then
rmdir /dev/cgroup/cpu$1
Make the file executable with this command: sudo chmod +x /usr/local/sbin/cgroup_clean
Now for the last step edit /etc/bash.bashrc and insert the following lines in the beginning of the file:
if [ "$PS1" ] ; then
mkdir -m 0700 /dev/cgroup/cpu/user/$$
echo $$ > /dev/cgroup/cpu/user/$$/tasks
Reboot your PC/notebook/netbook/tablet/cellphone and enjoy! 😀
P.S.: Para instruções em Português, favor consultar aqui.

2 thoughts on “Making Ubuntu faster

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s