Linux Desktop Latency

20th January 2011 (13 years ago)

It seems there are is a lot of activity at the moment in the Linux community to make the desktop as responsive as possible.

In mid-November Mike Galbraith wrote the now-famous 200 line patch that groups processes together to make the desktop experience more interactive. This was accepted by Linus Torvalds and should be in the 2.6.38 kernel when it's released next month.

Lennart Poettering wrote an alternative shell script soon after that performs a similar operation. I followed the instructions on my Ubuntu machine, as it was easier than recompiling my kernel, and noticed significant improvements on slower machines.

Linus prefers having these improvements in the kernel to make it simpler for users but I'm sure we'll continue to see the original patch improved for quite a bit longer.

The latest development in desktop scheduling takes a different angle in the form of ulatencyd. The application runs in the background as a daemon, monitors what applications are in use and creates cgroups dynamically. There are several included filters and custom ones can be written in the Lua language.

It is still at an early stage but you can build and run the application right now or download a pre-build Ubuntu package from a PPA. Here's how you do that:

sudo add-apt-repository ppa:poelzi/ulatencyd-stable
sudo apt-get update
sudo apt-get install ulatencyd</code>

I've often thought there could be more intelligent ways of assigning processes priority when my systems are under heavy load. I've made several attempts at tweaking memory usage and other schedulers but finally it seems like we may soon have the most responsive desktop as a default. I'll be excited to see how it progresses over the coming months.