Specify base priority when launching programs
5 February 2001 by Snakefoot | Comment » | Trackback OffWinNT is able to give different amount of CPU time to each program dependent on their priority. This can be used to launch an application (Like a Game) in high priority so other applications will have a hard time stealing the CPU time:
Note instead of making a batch file for every application to launch it with a certain priority, then one can send an application into a certain priority by creating a batch file High.bat with the following contents and save it in the SentTo-Folder:
More Info MS KB Q103475
More Info MS KB Q103810
More Info MS KB Q106253
More Info MS KB Q191771
Related Change your Processor quantums to tweak your applications
Credits ntfaq.com
It can also be used to launch certain background applications (SETI, Folding, Grid etc.) with low priority, so they cannot take CPU time from other applications.Start "StartHigh" /HIGH C:\Q3\Quake3.exe
To see the possible startup options run:Start "StartLow" /LOW C:\Ud_Agent\Ud.exe
Besides using HIGH you can use these (Avoid RealTime if having only one CPU):Start /?
| Priority | Level |
|---|---|
| Realtime | 24 |
| High | 13 |
| Normal | 8 |
| Low | 4 |
| Abovenormal | (Win2k+ only) 10 |
| Belownormal | (Win2k+ only) 6 |
Note one can also add a new item "Start High Priority" to the context menu, so when right clicking an exe-file, one have the option to launch the exe-file with a certain priority.Start "StartHigh" /High "%1"
Note one can also change the priority right on the fly for a running application by using the Task Manager (CTRL+SHIFT+ESC).REGEDIT4
[HKEY_CLASSES_ROOT\exefile\shell\StartHigh]
@="Start &High Priority"
[HKEY_CLASSES_ROOT\exefile\shell\StartHigh\Command]
@="cmd.exe /c start \"StartHigh\" /High \"%1\""
More Info MS KB Q103475
More Info MS KB Q103810
More Info MS KB Q106253
More Info MS KB Q191771
Related Change your Processor quantums to tweak your applications
Credits ntfaq.com
Tags:
Category:
Updated: 21 January 2010
Comment by Larry Miller - 17 March 2009 @ 16:57 Reply
Changing an application’s priority should be used only to solve specific problems, it will rarely improve performance. The system uses priority to decide which thread will run at any given time, not to allocate processor time. Warning: never set a CPU bound application to Real Time as this will starve vital system threads that run at a lower priority. This could cause a deadlock, requiring a reboot to restore operation. This is less likely, but still possible, on a system with multiple CPU’s. Also, never attempt to change the priority of any system process as this can cause serious problems.
Larry Miller
Microsoft MCSA