XP: Is there a way to set Process "Priority" Indefinitely??

Caveman

Platinum Member
Nov 18, 1999
2,537
34
91
Is there a registry tag or something that controls this? Ideally, I want to be able to open the program and have it automatically start in a "high priority" or "realtime" mode. Anyone know how to do this?
 

S0Y73NTGR33N

Senior member
Sep 27, 2004
420
0
0
Here is a way to start a program and give it high priority at the same time. It requires the command line and that you know the exact location or path of the program to be... prioritized. ... an example:
This one should work if you have Word or Office 2000, and if Word's main executable is at "C:\Program Files\Microsoft Office\Office\"
- Start Menu / Run... / type CMD / press ENTER
- type cd /d "C:\Program Files\Microsoft Office\Office\"
- type start /high winword.exe

For long paths it's a pain, I know. A batch file can help out, one like this:

@echo off
cd /d "C:\Program Files\Microsoft Office\Office\"
start /high winword.exe

If I wanted to use a batch file to run the Mozilla page editor in High Priority mode, and without the splash screen, the lines would go like this:

@echo off
cd /d "C:\Program Files\Mozilla"
start /high mozilla.exe -nosplash -edit

<Note: The above path is not the default folder that Mozilla creates during installation. I chose this one because I already know that Mozilla.org is behind the software and I don't need a clunky looking folder name to be reminded of that.>
 

KoolDrew

Lifer
Jun 30, 2004
10,226
7
81
Does actually setting something to a higher priority help performance? Isn't any application that is open already given highest priority?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: KoolDrew
Does actually setting something to a higher priority help performance? Isn't any application that is open already given highest priority?

By open, I suspect you mean active? (since, all applications are kinda open by definition...) in which case the answer is 'sort of'. On the workstation OS the default is to give the foreground app a priority boost (but no where near high or realtime). The server OS default to not doing that boost (equally priority for all running apps).

As for doing this permanantely, there is nothing built in to do this (short of the start command as was posted, but unfortunately that won't help with services). There are some shareware apps that tackle this like this one that should do the trick.
 

S0Y73NTGR33N

Senior member
Sep 27, 2004
420
0
0
It helps performance of that application. It's not worth it to set multiple things to high priority.. or to change priorities if you are trying to multitask. You can actually speed up virus scans a little bit by setting them to high priority. If it is high priority it runs the app before the OS though and if you try and even open My Computer it takes forever!

-green
 

KoolDrew

Lifer
Jun 30, 2004
10,226
7
81
By open, I suspect you mean active? (since, all applications are kinda open by definition...) in which case the answer is 'sort of'. On the workstation OS the default is to give the foreground app a priority boost (but no where near high or realtime). The server OS default to not doing that boost (equally priority for all running apps).

Yes, I meant active.
 

BoboKatt

Senior member
Nov 18, 2004
529
0
0
I find this incredibly interesting. Would setting a priority for running two instances of the same program or game make any difference? I know this is a long shot but I tend to play 2 accounts of the same game like Everquest or DAoC at the same time to have to characters going and always note that when both are running it's at total pain.

Was just wondering if there was ever a practical reason to set priorities for things such as this... using set high or low or abovenormal or whatnot to somehow have the balancing be better. Also I know you can change priorities from the task bar but how come some applications you cannot? Some you can and others you cannot..

thanks

Bob
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Also I know you can change priorities from the task bar but how come some applications you cannot? Some you can and others you cannot..

Task manager does not take all of the rights required to modify certain processes. This is done so that an end user can mistakenly kill or change priority on system tasks (some of those tasks, if they die, cause the system to immediately shutdown). However, with other tools you can definately tinker away...

Bill
 

Jeff7

Lifer
Jan 4, 2001
41,596
19
81
Originally posted by: S0Y73NTGR33N
Here is a way to start a program and give it high priority at the same time. It requires the command line and that you know the exact location or path of the program to be... prioritized. ... an example:
This one should work if you have Word or Office 2000, and if Word's main executable is at "C:\Program Files\Microsoft Office\Office\"
- Start Menu / Run... / type CMD / press ENTER
- type cd /d "C:\Program Files\Microsoft Office\Office\"
- type start /high winword.exe

For long paths it's a pain, I know. A batch file can help out, one like this:

@echo off
cd /d "C:\Program Files\Microsoft Office\Office\"
start /high winword.exe

If I wanted to use a batch file to run the Mozilla page editor in High Priority mode, and without the splash screen, the lines would go like this:

@echo off
cd /d "C:\Program Files\Mozilla"
start /high mozilla.exe -nosplash -edit

<Note: The above path is not the default folder that Mozilla creates during installation. I chose this one because I already know that Mozilla.org is behind the software and I don't need a clunky looking folder name to be reminded of that.>


I've tried this already, at least with Windows Media Player (and just now with Winword.exe) and Task Manager always shows the process as being Normal priority.
This is under WinXP Pro too.

For those asking why this is desirable - I set WMP to high priority all the time when watching a long video, as other apps can compete for CPU time, and cause skips or slow playback. When set to high priority WMP does what it wants to, and everything else waits for the CPU. This does suck if WMP decides to crash, but luckily, it doesn't do it often for me; and even then, Task Manager can sometimes be brought up (its default priority is High) and wmplayer.exe terminated.
 

Aenslead

Golden Member
Sep 9, 2001
1,256
0
0
How about bringing Real-Time to explorer.exe?

You would have a mega-fast windows, nay?
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: Aenslead
How about bringing Real-Time to explorer.exe?

You would have a mega-fast windows, nay?

Except if explorer gets screwed up(something that happens to me once in a while), you'll be screwed, and will pretty much have to resort to the reset button.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
One thing that I noticed, at least subjectively in my observations about XP (SP1), as compared to W2K SP2 - processes running at the same base priority level, and trying to chew all CPU, tend to cause "scheduler starvation" moreso than in W2K. I'm not sure why, but it sure is annoying. Two processes running at the same base priority, should get nearly equal CPU-time scheduled, I would think. (Even taking into account the priority boost given to the currently-active frontmost app, or an app with pending input queue messages.)

I've also come to believe that the reason behind some of the different behavior that I've seen seeing, is a result of the "tweaking" that MS supposedly did to the process working-set adjustment algorithm in XP. It seems as though the amount of physical RAM that gets allocated to a process, depends on whether it is an "active" task or not (minimized main window = "inactive" on XP), and some processes that were running fine while not minimized (even if not the front-most application), when minimized, XP trims their working-set so badly, that they start running primarily out of the pagefile, and performance of that app tanks. I'm really rather disappointed at the changes made to XP, by choosing to use whether or not the main window was minimized or not as a heuristic for allocation of physical RAM/working-set sizing, to the detriment of actual working-set usage and actual performance. Dave Cutler is an OS design Ghod among mortal software engineers; and thee lowly software-maintenance engineer shall not change what the hands of Dave have created. (IMHO, at least.)

W2K is definately better in these two regards.
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
Setting a process to realtime will likely kill your box. A realtime process will starve other processes, including operating system processes. APC's and DPC's wouldn't get called and the box would, in effect, keel over dead.

The post about "task manager taking rights" is incorrect. A process is a kernel-mode object and as such has an ACL (access control list, i.e. permissions) associated with it. Some processes configure themselves so that users, even administrators, can't kill them. You could write an application that did the same thing.