Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My goal is to intelligently and permanently ionice the processes on my desktop for responsiveness under heavy disk and network load. By permanently, I mean that any changes made to the system will persist across reboots. I want to eliminate situations where I can't move a window because disk bandwidth is saturated by a process that isn't in anyway serving my GUI.

There are hundreds of processes running on my system. Which ones could be run with class idle and which ones with class real time?

Is it a good idea to set the X and gnome-shell processes to class real time?

How about setting cupsd, avahi-daemon, gnome-screensaver, deluge, ntpd and backintime to class idle?

Here's a list of the currently running processes on my system.

share|improve this question
It's probably best to leave the processes be, and to recognize that any given computer has final resources. Giving more priority to some will take resources from the rest, making one process more responsive will make the rest less so. – mikewhatever Feb 6 '12 at 12:38
@mike, do you mean finite resources instead of final resources? – user25656 Feb 6 '12 at 13:41
Yes, meant just that, thanks for the correction. – mikewhatever Feb 6 '12 at 13:58
@mikewhatever Giving more priority to some and taking resources from the rest is exactly what I want to do. – Richard Ayotte Feb 6 '12 at 14:20
+1 Thought the question was misspelled but now I see it's actually something interesting. I'd like to see some improvements in this area, too. I have plenty of RAM, fast disks, etc, and yet still frequently face this same problem with responsiveness. – Tom Brossman Feb 6 '12 at 17:17

I think you're going to have better results tuning your VM (virtual memory) and writeback tendencies (swappiness) than going the ionice route, though if you must.

You can use dpkg-divert to permanently move the interested binaries like /usr/bin/firefox -> /usr/bin/firefox.orig. Then you're free to create a shell script in it's place like this:

# straight from the ionice manpage
ionice -c 2 -n 0 /usr/bin/firefox.orig $@

Pretty clear what the outcome is.

You could also go the cgroups route which is probably more cost effective in the long run, but you also open yourself up to a host of new performance based problems. Once you start metering resources you can easily starve out processes unintentionally, it'll do exactly what you tell it to do, even if you don't understand all the repercussion.

It looks like duplicity or deja-dup is running (rsync), which will of course suck up all your ioband width, some cpu too. Another option is to simply schedule it for when you're not in front of the computer, that's what I do. The best solution I've seen for io management is dm-ioband but it lives out of tree and has been under constant development for sometime.

I wish I had a blanket solution for you but there's no such thing with performance engineering. Here's a good guide from IBM, but you'll notice it that it's mostly "here's how you get started" for each subsystem, there aren't many "do this and be happy" recipes as they don't exist, every system's needs is different when it comes to performance tuning.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.