poelzi / ulatencyd

daemon to minimize latency on a linux system using cgroups
GNU General Public License v3.0
243 stars 30 forks source link

Don't detect /sys/fs/cgroup/cpu when it is a symlink to cpu,cpuacct #45

Open dragonnn opened 11 years ago

dragonnn commented 11 years ago

On my kernel (I think this will be on all newer kernel, I am using 3.8.13-1-lqx) /sys/fs/cgroup/cpu is a symlink to /sys/fs/cgroup/cpu,cpuacct. ls -l comand

ls -l /sys/fs/cgroup/ razem 0 drwxr-xr-x 5 root root 0 05-15 21:27 blkio lrwxrwxrwx 1 root root 11 05-15 19:47 cpu -> cpu,cpuacct drwxr-xr-x 3 root root 0 05-15 19:47 cpu,cpuacct lrwxrwxrwx 1 root root 11 05-15 19:47 cpuacct -> cpu,cpuacct drwxr-xr-x 3 root root 0 05-15 21:27 cpuset drwxr-xr-x 2 root root 0 05-15 19:47 devices drwxr-xr-x 2 root root 0 05-15 19:47 freezer drwxr-xr-x 6 root root 0 05-15 21:27 memory drwxr-xr-x 5 root root 0 05-15 19:47 systemd drwxr-xr-x 5 root root 100 05-15 19:47 ulatencyd

mount command: tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,release_agent=/usr/lib/ulatencyd/ulatencyd_cleanup.sh) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory,release_agent=/usr/lib/ulatencyd/ulatencyd_cleanup.sh) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio,release_agent=/usr/lib/ulatencyd/ulatencyd_cleanup.sh) /sys/fs/cgroup/memory on /sys/fs/cgroup/ulatencyd/memory type cgroup (rw,relatime,name=ulatencyd.memory) /sys/fs/cgroup/blkio on /sys/fs/cgroup/ulatencyd/blkio type cgroup (rw,relatime,name=ulatencyd.blkio) /sys/fs/cgroup/cpuset on /sys/fs/cgroup/ulatencyd/cpuset type cgroup (rw,relatime,name=ulatencyd.cpuset)

ulatency shows only the blkio group: /sys/fs/cgroup/blkio └─┬»blkio« ├ 1 systemd ├ 2 kthreadd ├ 3 ksoftirqd/0 ├ 5 kworker/0:0H ├ 7 kworker/u:0H ....

tpruzina commented 10 years ago

Please read FAQ, specifically section about systemd and how to configure it so this works as it should.

gajdusek commented 10 years ago

I have commit fix to the master branch.

gajdusek commented 10 years ago

This is not yet fixed properly, ulatencyd fails to determine process cgroup by parsing /proc//cgroup file.