Ubuntu's Linux Scheduler or Why Baloo Might be Slowing Your System in 14.04

Last month I posted about packaging and why it takes time. I commented that the Stable Release Update process could not be rushed because a regression is worse than a known bug. Then last week I was pointed to a problem where Baloo was causing a user's system to run slow. Baloo is the new indexer from KDE and will store all your files in a way you can easily search for them and was a faster replacement for Nepomuk. Baloo has been written to be as lightweight as these things can be using IONice, a feature of Linux which allows processes to say "this isn't very important let everyone else go first".

Except IONice wasn't working. Turns out Ubuntu changed the default Linux scheduler from CFQ to Deadline which doesn't support IONice. Kubuntu devs who had been looking at this for some time had already worked out how to change it back to the upstream defaults in our development version Utopic and in the backports packages we put on Launchpad. Last week we uploaded it as a proposed Stable Release Update and as expected the SRU team was sceptical. We should have been faster with the SRU which is our fault. They're there to be sceptical but the only change here is to go back to using upstream defaults. After much wondering why it was changed in the first place it seems that Unity was having problems with the CFQ scheduler and so it was changed, now we have suggestions that Baloo should be changed to adapt to that which is crazy. Nobody seems to have considered fixing Unity or that making the change in the scheduler in the first place would affect software outside of Unity. We tried taking the issue to the Ubuntu Technical Board but their meeting didn't happen this week.

So alas no fix in the immediate future, if it bothers you best use Kubuntu Backports. When someone on the SRU team is brave enough to approve it into -proposed we'll put out a call for testers and it'll get into -updates eventually. It's what happens when you have a large project like Ubuntu with many competing demands, but it would be nice if the expectation was on Unity to get fixed rather than on Kubuntu to deal with the bureaucracy to workaround their workarounds.


I have been searching at your KDE web page a Suggestions section and i did not found it.

I have just watch at Linux Action Show a nice analog clock at kubuntu with KDE plasma 5.1 and I would like to suggest to be able to set it to 24h analog sphere plus old internet time 24h=1000 beats, I think that idea of 1 day =1000 beats for internet time was great, but too advanced for when it was done and now, with the great success of telegram, whatsup and similar apps would be great to recover it when it is used from different time zones. Even more at USA that uses several time zones for the same country.

Also put that 24h +1000 beats sphere as default as a postmodern detail that can be set up to "normal" 12h sphere setup, knowing most of people would not setup presettings.

And this kde new watch can be also offered as watch and advertisement with very little work for Android, Android watches, and other mobile OSs waiting for a KDE 5 that would work well at tablets, specially those powered by Intel SoCs, I would love to have a cheap KDE Intel SoC tablet, and I think those under 100 USD 8" Intgel SoC tablets or under 200 USD 10" ones would be best selled even than first chromebooks where, even more if they are KDE branded with pacman delta repositories that I do not why no distro use.

By Miguel Mayol at Tue, 10/21/2014 - 16:05

Just discovered this post (and that linked thread with the Ubuntu guys).
This has really opened my eyes. I now understand why my indexing experience on Kubuntu has sucked for the last several major releases. You were far more diplomatic in that mail thread than it deserved.

I have a quad core Xeon, scads of RAM. And I have about half a million (mostly static) files on rotating media... so when I rebuild the index, it runs for several days.

The KDE desktop is basically unusable during indexing.
Weird stuff like menus and keystrokes that ought not be in contention with disk I/O - there's a whole _other_ thread to that.

Seriously, I can encode H264, compile C++, have Boinc plugging away in the background and watch TV on Kaffeine and the machine doesn't even notice the load. Turn on baloo and it's unusable.

I was about to go off investigating how to get cgroups and baloo to play. Will go play with I/O schedulers and udev instead. Maybe post a bug against Ubuntu 15.04 :)

btw on Kubuntu 15.04 for me:

$ uname -a
Linux ironsky 3.19.0-17-generic #17-Ubuntu SMP Wed May 6 16:46:12 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
/boot$ grep DEFAULT_IOSCHED config-3.19.0-17-generic

By Happy Heyoka at Mon, 05/18/2015 - 15:01