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 make it executable:
sudo chmod +x /etc/rc.local
And then add the following to your ~/.bashrc file (to open it: gedit ~/.bashrc):
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
Run the following command:
sudo gedit /usr/local/sbin/cgroup_clean
And paste this:
#!/bin/sh
rmdir /dev/cgroup/cpu/$*
then save the file and make it executable:
sudo chmod +x /usr/local/sbin/cgroup_clean
And finally, restart the computer or manually run the /etc/rc.local file ("sudo /etc/rc.local").