Improving OOTB performance

Sergey "Shnatsel" Davidoff sergey at
Sun May 13 17:36:12 UTC 2012

Hello everybody,

I've conducted quite a lot of performance research recently, mostly
concerning desktop use case, but I've got some things to share about
realtime use cases too.

Ulatencyd would probably be handy for you; it's a supervisor daemon which
prioritizes processes for resource allocation, gives some processes
realtime privileges if needed and arranges processes in cgroups. It can
decrease latency by smarter resource allocation and getting low-priority
tasks out of the way of media apps. It's being tested in elementary OS
daily builds and the results we've got so far are impressive. I'm currently
working with its author on expanding default configs to accommodate more
use cases.

Another useful thing would be avoiding swapping for as long as possible. In
Linux there are several facilities competing for RAM - in Ubuntu's stock
configuration executable code often gets swapped to disk to make way for
various caches. Here's the best article I've found about it so far:
there's something better in kernel documentation, but I'm not aware
of that.

Apart from tuning RAM allocation you can compress less important parts of
RAM instead of swapping them to disk using zcache or zram (depending on
what's more important for you - caches or code). I've got an overview of
both at

The most recent item and probably the hardest for you to implement is using
a different CPU scheduler. Linux's default CFS is not a good thing for
realtime workloads mostly because it's not designed for them. For example,
it may very well make two realtime processes compete for accessing one CPU
core even if there are "spare" cores availalble (according to BFS
FAQ<>anyway). So it might
be a good idea to look into using RIFS:
Unlike I/O schedulers, changing CPU scheduler requires patching the kernel,
so I doubt you'll be able to tackle it soon.

Hope this will be useful for you. Corrections and suggestions are always

Sergey "Shnatsel" Davidoff
OS integrator @ elementary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Ubuntu-Studio-devel mailing list