Sponsored by Travelzoo
$52 and Up—Airlines Slash Fares On Peak Holiday Flights. view!
travelzoo.com - This year, waiting until the last minute is NOT the best strategy. See why.
31 Comments
- schestowitz, on 10/11/2007, -3/+15There was an interesting discussion about it here http://digg.com/linux_unix/CFS_scheduler_to_appear_in_Linux_kernel_2_6_23 just a few days ago. All these optimizations ought to be self-regulated/ing at kernel level.
- honds, on 10/11/2007, -1/+9Have you ever used Windows? Just asking, because my system loves to let other processes use all my hard drive cycle when all I want to do is save the document I'm working on right now. It may do it but it doesn't do it well.
- Urusai, on 10/11/2007, -0/+8It seems to me that applications like Nautilus or Konqueror should ionice themselves, since the big issue is interface responsiveness and if you are using a graphical file manager, you are obviously using a graphical interface and likely wanting it to remain responsive. In general, user responsiveness should always be high priority because the illusion of speed is more important than the substance in regular use. This isn't a trivial assertion; effective use of the computer depends highly upon timing. Imagine if your computer locked up every 5-10 seconds, for only half a second, while you are trying to type a long passage. It would drive you nuts, impairing your productivity significantly, not merely in a temporally empirical way, but in quality of work because your concentration is interrupted. It's like the Harrison Bergeron Effect.
- Wyzard, on 10/11/2007, -0/+5Fair enough, but still, switching to idle I/O class should be a permitted transition for non-root users, for their own processes.
- jdong, on 10/11/2007, -1/+6Solid state drives are currently faster at seek-based workloads by lightyears, slower at sequential read/write, and lasts for fewer rewrite cycles than mechanical hard drives. In other words... they aren't ideal for replacing your whole desktop's storage just yet :)
- toasterwaffle, on 10/11/2007, -1/+5Nice! (seriously, my initial and immediate response -- no pun intended)
- Baum, on 10/11/2007, -1/+5Or the more intensive operations could be put in threads separate from the thread containing the interface's event loop so that the interface would remain responsive during these tasks (although it doesn't increase disk I/O bandwidth,,,)
- hambend, on 10/11/2007, -2/+6Yeah! Normal priority is good enough for anything, dammit!
You ***** tool. - alphalux, on 10/11/2007, -1/+4"there are still some things that massive amounts of money thrown into a project can produce that a gathering of open source developers haven't figured out yet."
This has nothing to do with some enlightening effect you seem to think lots of cash has on software development and innovation. It is more likely a difference of ideology. My Linux system lets me make decisions on priority. In this area, Windows doesn't even compare. After using Ubuntu for 2 years, do you long for the old process manager with the "application priority" levels on a Windows box? Try changing anything in there and see how it works. Let's be honest here. Your comment, Sir, is irrelevant. Don't use the Windows app priority as a yardstick for Linux. - jdong, on 10/11/2007, -0/+3The OS does not know, however, how long a process takes. It just knows "N processes are demanding attention at this time". Same with the disk scheduler.
Same racing happens with the CPU scheduler. If you have a 100% CPU 5 hour media encoding app running, and then need another 5-second CPU job, the 5-second job will roughly take 10 seconds. That's when you need to use the nice command to tell Linux "look this quick job is more important to me. Do it before anything else". ionice provides the same abilities to disk scheduling. - TeacherOfHeroes, on 10/11/2007, -2/+5Yes.
There, our anecdotes cancel each other out - jdong, on 10/11/2007, -0/+3It would be nice, but until someone invents psychic OS'es there's no way for the operating system to know which programs running are important to *you*.
- init100, on 10/11/2007, -0/+3I agree. This lowers the priority, and should not require elevated privileges.
- toxiclove999, on 10/11/2007, -1/+4You might very well be surprised.
- jdong, on 10/11/2007, -1/+4This would be a GREAT path for UI responsiveness improvements to go down. Applications should be able to tell the kernel what level of responsiveness is desired. Nightly system maintenance scripts should call ionice by default in the distribution. In fact, I'll talk to Ubuntu developer buddies about this idea.
- jdong, on 10/11/2007, -0/+3This is not just decreasing priority (you're allowed to decrease round-robin priority with ionice without becoming root) -- this is switching *class* from normal to idle.
- Wyzard, on 10/11/2007, -0/+2What seems odd to me is that you need to be root to use ionice, even to *decrease* the priority of one of your own processes. Regular nice doesn't work that way -- root is only needed to increase priority, or to change another user's process.
- iapx, on 10/11/2007, -0/+2In the last 20 years, CPU real-speed raised by about X1000, while Disk sequential IO raised by about X300, and worse Disk random IO raised by only X3, on average!
Actual performances on our computers are impaired by Hard-drive speed, and the time needed to acces little to medium-sized chunk of data.
ionice is only a workaround for temporary problems (such as launching a DB importation or cleanup while working). Not a wide solution. - HonoredMule, on 10/11/2007, -0/+2This applies to all operating systems: we're way overdue for having task managers offer disc i/o prioritization as ubiquitously as cpu prioritization. Right click on a task, and whenever/wherever "Set priority..." is an option, there should instead be "Set CPU priority" and Set I/O priority."
- jdong, on 10/11/2007, -1/+2Meh a responsive "Please Wait Loading Document" message is pretty annoying too :D. But on the bright side you can wobble that around in compiz without it greying itself out!
- nailer, on 10/11/2007, -0/+1'I am surprised at how many people complain about IO responsiveness while multitasking, but have never heard of ionice(1).'
...
'Now of course, there are a couple gotchas with ionice: 1. It only works on kernels 2.6.13 and later '
I think there's your answer. But great article though - this has been needed for ages. And, for some apps, should be used by default more often. - hdante, on 10/11/2007, -0/+1You've got it wrong. The "ionice" article is about I/O scheduling (with the CFQ I/O scheduler, an already existent I/O scheduler in linux). You are talking about process scheduling (with the CFS process scheduler, a new scheduler that doesn't exist in linux).
- HonoredMule, on 10/11/2007, -0/+1All computing solutions are temporary.
Also, that sounds like calling CPU cache a temporary solution to poor system memory speed. I believe most people knowledgeable about hardware would agree that's a twisted and strange viewpoint to take. Furthermore, it's not like CPU scheduling algorithms and priority systems have become any less important with the spike in CPU speed. Using what resources hardware has in the way that most efficiently/effectively serves the user's needs is just smart...always. - inactive, on 10/11/2007, -2/+2It is possible for the OS to know which process to give priority too. If one process is doing a job that will take approximately 20 mins to complete (such as copying a file) and another process want to do a job that will take approximatly 1s then it should give priority to the process that is likely to finish first. It is easy for the system to make a guestimate about how long a process will take by just looking at the size of the files involved.
- pangobdx, on 09/11/2009, -0/+0idle priority requires extra privileges because it's potentially dangerous; some processes may wait "forever" for the disk becoming idle, and if this process has acquired other resources, it can in turn block other processes, etc. Check "priority inversion"
http://en.wikipedia.org/wiki/Priority_inversion
You don't need root to change priority within "best effort" class however:
$ ionice -n0 ls
$ ionice -n7 ls
... - Yoshi39, on 10/11/2007, -2/+1It can't know what is important for you no but it can separate bulk tasks from important ones case in point if someone is running a virus scan while simultaneously trying to start Firefox its not hard for the computer to realize that whether the virus scan takes 59:50 (mm:ss) or 59 flat doesn't matter but whether Firefox takes 00:50 or 00:10 to start makes a huge diffrence
- dougsk, on 10/11/2007, -1/+0Maybe it's me -- I read "eye on ice" and was like wth does ice have to do with linux? ... hmm is it a Gibson fan breaking through "ICE" with linux? Nope it's disk IO. Imagine that?
- mckirkus, on 10/11/2007, -4/+1Get a Sold State Flash drive, not exactly cheap but orders of magnitude faster than your archaic hard disk drives with moving parts.
- mossblaser, on 10/11/2007, -4/+0My personal experience with regards to stuff like that is that Linux is fairly good at it anyway - I don't think it's worth the trouble for the improvement gains. (IMO)
- ViciousDotOrg, on 10/11/2007, -8/+2This comment is irrelevant, Windows has been able to determine what apps should have what kind of priority for quite some time. Don't get me wrong, I've been an Ubuntu user for 2 years now, but there are still some things that massive amounts of money thrown into a project can produce that a gathering of open source developers haven't figured out yet.
- alexbu, on 10/11/2007, -6/+0Vista's I/O Prioritization is fine.


What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the