Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Process Explorer is able to show the effective IO priority of a given thread, but not change it. Seeing as IO priority support is a comparatively new feature, most programs don't set their own IO priorities. It appears that by default the IO priority is derived from the thread priority (rather than process priority), which Process Explorer can't modify either.

Are there any other tools out there that can help me change the IO priority of a given thread / all threads of a given process?

share|improve this question
    
There is almost the same question on Stack Overflow: stackoverflow.com/questions/301290/… –  Mehper C. Palavuzlar Apr 30 '10 at 6:34
1  
@[Mehper C. Palavuzlar] true, but this is not for software I develop - I'm looking for a ready-made tool to do this on third-party software. –  romkyns May 10 '10 at 10:58
add comment

3 Answers

up vote 6 down vote accepted

The answer is a simple API call to an NT Native API, NTSetInformationProcess. It is defined as the class 'IoPriority' in the 2008 DDK. In NT6 only two levels supported: Very Low (background) and Normal. There are technically 5 levels defined -- Critical, High, Normal, Low, and Very Low. The Critical level is reserved for paging operations. No data on the others.

However, the proper way to use the I/O priority is only to start a 'background mode' via a call to the Windows API SetProcessPriorityClass, supplying PROCESSS_MODE_BACKGROUND_BEGIN. This will cause it to use the very Low (background) I/O priority, along with an IDLE CPU priority class. When done, revert via PROCESS_MODE_BACKGROUND_END.

The SetThreadPriority API will also allow this same background mode for specific threads. Here you'd supply THREAD_MODE_BACKGROUND_BEGIN/END.

share|improve this answer
    
I'm not into windows programming and OS level stuff, but i've heard of bumping the priority of a thread, all the way up to THREAD_PRIORITY_TIME_CRITICAL is that possible with your program or any program? or is it still only IO PRIORITY that can be adjusted, and not thread cpu priority? I guess changing IO priority won't make much difference to CPU Usage, right? –  barlop Dec 14 '12 at 10:23
    
Yes. Both can be set, and persist. Many other things can also be set, or dynamically changed based on rules (e.g. CPU affinity). I/O priority is distinct from CPU priority, right. –  9090 Apr 4 '13 at 22:02
    
It's window, so i guess we need GUI Tools. –  Antony Lee Jul 5 '13 at 14:48
add comment

ProcessHacker is a GUI tool that can change IO priority of an arbitrary process.

share|improve this answer
    
Why does it look like something Russinovich did? –  Daniel Mošmondor Sep 14 '13 at 10:11
    
@DanielMošmondor Maybe it was inspired by ProcExp and its limitations? I personally switched because ProcExp showed completely wrong CPU usage on my laptop after version 14. –  romkyns Sep 16 '13 at 16:50
    
Not only that, ProcExp was also able to BSOD my comp, etc. Is it free? –  Daniel Mošmondor Sep 16 '13 at 17:38
    
@DanielMošmondor Yes, moreover it actually seems to do more than ProcExp in every way. Slightly different UI but very capable indeed. –  romkyns Sep 16 '13 at 18:12
add comment

I developed this after seeing nobody bothered with it: https://sourceforge.net/projects/iopriority/ (open source)

This program is able to set the I/O priority of a process, and all threads are being affected by it immediately. It's pretty easy to modify it to work with threads instead of processes.

share|improve this answer
add comment

Your Answer

 
discard

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.