<div dir="ltr">Why don't you write it on our loco website <a href="http://loco.thelinuxer.net">loco.thelinuxer.net</a>.<br clear="all"><div dir="ltr">--<br>Thanks & Regards,<br><b>Jonathan N. Hindi<br></b><br></div>
<br>
<br><br><div class="gmail_quote">On Wed, Nov 24, 2010 at 5:02 PM, Hussam Bebars <span dir="ltr"><<a href="mailto:hus1007@live.com">hus1007@live.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div style="text-align: justify;"><p><b><font size="4">Make your ubuntu 10 times faster<br></font></b></p><p><b><font size="4"><br></font></b></p><p><b><font size="4">Source </font></b><a href="http://www.networkworld.com/community/node/68739" target="_blank"><br>
</a></p><p><a href="http://www.networkworld.com/community/node/68739" target="_blank">http://www.networkworld.com/community/node/68739</a><br></p><p><br></p><p><font size="6">W</font>ant to speed up your Linux desktop without compiling a new kernel?
You don't need a 200-plus line patch for the Linux kernel when <a href="http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html" target="_blank">a couple of lines of Bash will do the trick</a>.</p>
<p>A few days ago a kernel developer <a href="http://www.phoronix.com/scan.php?page=article&item=linux_2637_video&num=1" target="_blank">posted a patch to the Linux kernel</a>
that changes the way the Linux "scheduler" works. For non-geeks, this
is the way that the kernel hands off tasks to the CPU. This has been a
topic of a lot of debate over the years, with kernel developers
proposing dueling schedulers and sometimes <a href="http://en.wikipedia.org/wiki/Completely_Fair_Scheduler" target="_blank">storming off</a> when their proposal was rejected.</p>
<p>So there was a lot of buzz and excitement when the patch from Mike
Galbraith, clocking in around 225 lines of code, showed a dramatic
improvement in desktop latency. All is well and good that the patch
works, but it would be a long time before most Linux users would see an
update. It won't be for a few weeks before it makes it into the mainline
kernel, and six or seven months before it trickles down to users. Some
users are willing and able to recompile their kernel, or willing to
install patched kernels from third-party sources, but most users don't
fall into those categories.</p>
<p>Turns out, users don't <i>have</i> to wait if they're willing to make a few small modifications to their systems involving <a href="http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html" target="_blank">a few lines of Bash code</a>
added to a system configuration file (/etc/rc.local) and a user's login
file (.bashrc). That comes from Red Hat's Lennart Poettering.</p>
<p>See the post on <a href="http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html" target="_blank">Web Upd8</a>
for instructions on Fedora and Ubuntu machines. I've tried the second
method on a machine running Linux Mint 10 (which is Ubuntu 10.10 based).
In decidedly unscientific testing, it seems to produce an improvement
in several areas — particularly when using Firefox or Chrome. I haven't
yet tried the kernel patch yet, but according to <a href="http://lkml.org/lkml/2010/11/16/392" target="_blank">Markus Trippelsdorf</a>, the user-space changes reduce latency more.</p>
<p>The immediate effect may be a speedup on the desktop for Linux users
based on Poettering or Galbraith's approach. But even better, maybe this
will kick off a new round of competing ideas on speeding up the Linux
desktop.</p><br><font size="4"><b>Source <br><br></b><a href="http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html" target="_blank"><font size="2">http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html</font></a><b><br>
<br><font size="6">T</font>o use Lennart's solution in Ubuntu (<u>not tested</u> - thanks to Lsh for this), you have to replace "/sys/fs" with "/dev"</b>. So you would have to add the following commands in your <i>/etc/rc.local</i> (open it with: <i style="color: rgb(204, 0, 0);">sudo gedit /etc/rc.local</i>) file,<b> above the "exit 0" line</b>:</font></div>
<font size="4"><br></font>
<pre style="color: rgb(204, 0, 0);"><font size="4"><code>mkdir -p /dev/cgroup/cpu<br>mount -t cgroup cgroup /dev/cgroup/cpu -o cpu<br>mkdir -m 0777 /dev/cgroup/cpu/user<br>echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent</code></font></pre>
<font size="4"><br>
and make it executable:<br></font>
<pre style="color: rgb(204, 0, 0);"><font size="4"><code>sudo chmod +x /etc/rc.local</code></font></pre><font size="4"><br>
And then add the following to your <i>~/.bashrc</i> file (to open it: <i style="color: rgb(204, 0, 0);">gedit ~/.bashrc</i>):<br><br></font>
<pre style="color: rgb(204, 0, 0);"><font size="4"><code>if [ "$PS1" ] ; then <br> mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1<br> echo $$ > /dev/cgroup/cpu/user/$$/tasks<br>
echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release<br>fi</code></font></pre><font size="4"><br>
Run the following command:<br></font>
<pre style="color: rgb(204, 0, 0);"><font size="4"><code>sudo gedit /usr/local/sbin/cgroup_clean</code></font></pre><font size="4"><br>
And paste this:<br><br></font>
<pre style="color: rgb(204, 0, 0);"><font size="4"><code>#!/bin/sh<br>if [ "$*" != "/user" ]; then<br>rmdir /dev/cgroup/cpu/$*<br>fi</code></font></pre><font size="4"><br>
then save the file and make it executable:<br></font>
<pre style="color: rgb(204, 0, 0);"><font size="4"><code>sudo chmod +x /usr/local/sbin/cgroup_clean</code></font></pre><font size="4"><br>
And finally, restart the computer or manually run the /etc/rc.local file ("<span style="color: rgb(204, 0, 0);">sudo /etc/rc.local</span>").<br><br><br clear="all"><br>-- <br>Hussam Bebars <br></font>
</div>
<br>--<br>
Ubuntu-eg mailing list<br>
<a href="mailto:Ubuntu-eg@lists.ubuntu.com">Ubuntu-eg@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-eg" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-eg</a><br>
<br></blockquote></div><br></div>