Skip to content

Instantly share code, notes, and snippets.

@ataliba
Created April 13, 2012 11:49
Show Gist options
  • Save ataliba/2376277 to your computer and use it in GitHub Desktop.
Save ataliba/2376277 to your computer and use it in GitHub Desktop.
Update for my tip about the kernel otimization using cgroup
[Unit]
Description=Enable creation of task groups per TTY
[Service]
Type=oneshot
ExecStart=/bin/mkdir -p -m 0777 /sys/fs/cgroup/cpu/user
[Install]
WantedBy=multi-user.target
@ataliba
Copy link
Author

ataliba commented Apr 13, 2012

After you use this tip, you need to install the libcgroup package:

$ sudo yum install libcgroup -y

To use this tip, you need to put on your .bashrc this lines :

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

Reboot your machine or create the directory with this command :

sudo /bin/mkdir -p -m 0777 /sys/fs/cgroup/cpu/user

And enjoy your system :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment