Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping nsrexecd / save priority low, to avoid impacting other apps?

Status
Not open for further replies.

libove

MIS
Apr 9, 2002
56
0
0
US
How can I configure a Windows XP client so that when nsrexecd runs and when it kicks off any save (or other) child processes, the process priority of nsrexecd, save &etc are all "LOW" (per Windows XP process priority possibilities)?
I want to make sure that more time critical jobs (such as TV tuner / recorder) which can't afford to lose CPU time do not get pushed out by Networker backups which can wait a little.
Thanks!
-Jay
 
Hi Libove,

when a save is running on a Windows client, the processes using CPU are nsrexecd.exe and save.exe, so you have to set the priority of nsrexecd.exe to a lower value (save.exe is a child process of nsrexecd, so it will use its priority).

To script this, use the "SetPriority" method of the WMI class WIN32_Process (only for W2003 and XP, not for W2000).

In most cases, it's not necessary, because save.exe is ordinary low CPU (waiting for network or tape).
 
Thank you very much for the suggestion, speculos. Please pardon my ignorance as to how to implement your suggestion. My programming dates back to UNIX in the 1980s and early 1990s, not Windows in the 2000s! :-/

How do I script to call the SetPriority method for nsrexecd.exe ? Is it something which can be set up as part of the way the Service launches at system boot time? Must there be something kicked off as a Task on a regular basis to find and (re-)set the priority of the process?

An example would be much appreciated.

Again, thanks!
-Jay
 
You can set the priority with the graphical interface (Task manager/select process/right clic/set priority) or with a script launch after each boot:

Const ABOVE_NORMAL = 32768
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'nsrexecd.exe'")
For Each objProcess in colProcesses
objProcess.SetPriority(ABOVE_NORMAL)
Next

You will find documentation and many examples about WMI here: search keywords "SetPriority WMI
 
Wow, thanks! I need to look in to MSDN now to turn this in to reality; I really appreciate the detailed script example and the pointer!
-Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top