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.
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:
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.
http://www.redbooks.ibm.com/redpapers/pdfs/redp4285.pdf