k2s edited this page Apr 14, 2014 · 16 revisions


1   How can I see if it's working ?

With ulatencyd 0.4.8+ you can type in your console

ulatency tree

And should get a nice tree like structure like this:

  ├ 2 kthreadd
  │ └ 4975 ulatencyd
  │ └ 1928 cron
  │ └ 3036 preload

Alternatively type:

ps xaf -eo pid,session,args,cgroup

You should get an output like this:

8127  2824 /usr/bin/python /usr/lib/ub  3:memory,cpu,cpuset:/u_1000/g_2824?2:blkio:/ps_2824
8131  3171 /usr/bin/konsole             3:memory,cpu,cpuset:/u_1000/active?2:blkio:/active
8133  8133  \_ /usr/bin/fish            \_  3:memory,cpu,cpuset:/u_1000/g_8133?2:blkio:/ps_8133
9843  9843  \_ /usr/bin/fish            \_  3:memory,cpu,cpuset:/u_1000/g_9843?2:blkio:/ps_9843

As you can see in the last column, these are the groups the process was placed in. To test if the X11 plugin (xwatch) is working, then there should be processes in the active group.

If your ps does not support cgroup output, you can type:

cat /proc/self/cgroup

And should get an output like this:


2   Are you trying to do scheduling in userspace ?

NO. That would be nuts. You can't write a scheduler in userspace. ulatencyd just uses the interfaces the Linux kernel already provides to adjust the parameters of the scheduler and other subsystems. Adjustment is something that should be done in userspace and does not need to be done very often, so the resources required by ulatencyd are quite low.

3   What causes conflicts ?

You will not be able to run a different cgroups agent in parallel.

  • cgrulesengd (from libcgroup/cgroup-bin)

4   Does it work with systemd

Since Version 0.4.5 ulatencyd works with systemd under two conditions:

  • DefaultControllers should be unset. In /etc/systemd/system.conf set DefaultControllers=
  • JoinControllers should be unset. In /etc/systemd/system.conf set JoinControllers=
  • The PAM-systemd module should be disabled, or set "controllers="

Both options would cause constant moving of processes as the layout of systemd and ulatencyd (in the default configuration) differs.

5   What kernel options are required ?

At least those are very useful:


6   I get WARNING: binding sk_nl error: Bad file descriptor

You are missing the PROC_EVENTS option in your Kernel.

Enable it here: Device Drivers -> Connector ... -> Report process events to userspace

7   I don't have a swap

Having no swap device is not a problem, but the memory protector which runs in a 1 second interval may not have the chance to detect memory pressure in time and therefore the OOM will kick in or the system will freeze. Due the new dynamic swapiness of groups, having a swap is now a very good idea and will not cause a laggy behaviour after long periods of idle.

8   Does ulatencyd support my cgroups mount points

The problem with the custom mountpoints is, that not each subsystem supports hierarchies. For example, the blkio subsystem only allows flag groups, while the cpu and memory do. As cpu and memory are the most important systems and using different mount points would be possible but not that useful, ulatenyd uses a default schema:


Where the current subsys are:

Mountpoint Subsystems
cm cpu and memory
io block io

Changing the layout is possible but requires adjustments to the scheduler config in rules/scheduler_[MAPPING].lua and is not advised. When you only want to change the mount point you can do that in ulatencyd.conf

9   Building a Debian package without upstart

You can simply delete the upstart file before building the Debian package.

rm debian/ulatencyd.upstart

10   Doesn't build on Mandriva

I looks like the lua package of Mandriva is heavily broken. Install lua5.1 from hand and try again.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.