Published November 19, 2010 | https://doi.org/10.59348/ptgaz-f7v52

Userspace responsiveness .bashrc alternative (Ubuntu 10.10: Working)

Creators & Contributors

Recent discussion on the lkm has lead to Linus giving the go-ahead to a large kernel patch that massively increases responsiveness when multi-tasking on Linux desktop. A slashdot article today also points out that the same result can be achieved by modifications userspace and that this is, indeed, how the patch was tested.

The original instructions can be found at webupd8, but, for Ubuntu systems, they are incomplete.

Here's the correct information.

/etc/rc.local should contain:

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

and should be executable (sudo chmod +x /etc/rc.local).

Your ~/.bashrc should contain:

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

directly at the top.

Finally (and this is where the original instructions were incomplete), /usr/local/sbin/cgroup_clean should contain:

#!/bin/sh
if [ "$1" != "/user" ]; then
rmdir /dev/cgroup/cpu/$1
fi

as suggested by an anonymous comment on the original. Finally, ensure the cgroup cleanup script is executable: sudo chmod +x /usr/local/sbin/cgroup_clean

Reboot your system and you too can have an ultra-responsive desktop!

Userspace responsiveness .bashrc alternative (Ubuntu 10.10: Working) was originally published by Martin Paul Eve at eve.gd: Martin Paul Eve on November 19, 2010.

Files

10.59348_ptgaz-f7v52.pdf

Files (112.6 kB)

Name Size Download all
md5:f07a3c5f3907d2e81a030cec379fdae7
112.6 kB Preview Download

Additional details

Description

Recent discussion on the lkm has lead to Linus giving the go-ahead to a large kernel patch that massively increases responsiveness when multi-tasking on Linux desktop. A slashdot article today also points out that the same result can be achieved by modifications userspace and that this is, indeed, how the patch was tested. The original instructions can be found at webupd8, but, for Ubuntu systems, they are incomplete.

Dates

Issued
2010-11-19T00:00:00Z
Updated
2010-11-19T18:49:03Z