Permanently Set Process Priority in Windows? 125
Dave asks: "I have a render farm set up for 3D Studio Max. I have a Render user that runs 3dsmax.exe when it is sent jobs by the render farm server. I have tried to set the process to low when it runs, and it works. However, when the computer is finished rendering the images, and is sent a new set to render, the priority goes back to normal (program closes in between renderings). This obviously defeats the purpose of rendering an image in the background while others are still working, as you can imagine having 3dsmax.exe pegged at 100% CPU, slows down the machine tremendously. Is there anything that can be done to set the render user's instance of 3dsmax.exe permanently to low? Or is it possible to just set 3dsmax.exe to the low priority. I know there is a command line that sets any .exe to low, but that also starts the program. I would like 3dsmax.exe to be set to low either: when render launches the program, or set 3dsmax.exe to low whenever it is launched. Can anything be done?"
start /low (Score:5, Informative)
'start
Prio - Process Priority Saver (Score:5, Informative)
Wrapper (Score:5, Informative)
Re:Another process question (Score:3, Informative)
Re:start /low (Score:2, Informative)
I had thought that SysInternals had something to do this with command line, but was unable to find it. There's this third party tool which claims to be able to change the priority of a running process, but I've never used it to vouch for it: http://www.teamcti.com/pview/prcview.htm [teamcti.com]
Sorry for the likely helpless quick-post. I should drink coffee either before or after reading, not at the same time!
Re:Wrapper (Score:1, Informative)
Re:Another process question (Score:3, Informative)
Assuming you're on Windows, and that by "busy", you mean how often the CPU has been in use, then go into the Processes tab of Task Manager and look at the CPU time column for PID 0 (System Idle Process). Subtract that time from system up time to get the amount of time the CPU was in use, or divide to get idle%.
A small programming project (Score:3, Informative)
The benefit of going this route would be that it doesn't matter how someone started the 3D Studio Max executable, it would always get changed to low priority. Actually I might do the modification myself because I'm kind of digging the idea. The list of programs that ProcessHunterD looks for is configurable, you could just as easily make the priority configurable as well so you could change it to give other executables higher priority if you'd like.
Re:start /low (Score:2, Informative)
ProcessTamer (Score:1, Informative)
I didn't try it, but if it does what it says on the tin then this is what you want.
Process Lasso (Score:3, Informative)
Re:Thanks... (Score:3, Informative)
You might be able to write a relatively simple program that just periodically sends a message to the window and looks for a response; if it doesn't get it in a certain time period, it assumes it to be unresponsive. I don't know what message is best to send (I don't know if there's a "ping" message, although presumably Task Manager is doing something like that so maybe there is), but I'm sure there's something you can use.
Unfortunately, that's about as far as I can take you, except to also suggest that you don't need to whip out Visual Studio for this; any number of more pleasent languages will be able to do this, too. Python with the Win32 extensions, for instance, can send Windows messages directly with a wrapped SendMessage call.
not using 3rd party tools.... (Score:1, Informative)
Re:More effective solution? (Score:5, Informative)
Usually the foreground app (ie window) gets a little bit extra so it makes Windows *more* responsive, but again, that doesn't help you if you're waiting for an app to start (as it'll be in the background...)(you can turn this feature off if you like - system control panel to make it more server like).
So, with the system proposed, the starting app would not start any quicker - it would still want 75% of the CPU, as would the running app. The only benefit would be that the CPU had 25% time to sit there doing nothing. If you think you could use another app while those 2 fought over their 75% CPU resources, think that the app you want to use is also limited to 75% (and assuming you make it work and not sit mostly idle) it would be grabbing CPU time away from the 2 original apps, making them slower still.
If you want more response, give 1 app a lower priority and Windows will leave it for a while until the higher priority app goes idle. I do not recommend doing this for explorer.exe
Incidentally, Linux uses a weighted round-robin scheduler (windows uses a plain one that gives equal time to all runnign aps of the same priority) that gives less time to apps the more they use the CPU, this is probably why you feel Linux is more responsive - an interactive app will spend more of its time waiting for the user, so when it does need to do something, it is given a larger amount of time than its peers. If you use it a lot though, you'd find it gets slower over time. (so if you have a text editor and a compiler running, the text editor gets more CPU time when it wants it, but if you set the editor to do a lengthy 100% CPU task, you'd find its responsiveness was not as good when it was finished).
Re:start /low (Score:3, Informative)
At that rate, he should be able to edit the file type association to invoke the program itself.
3DS Max Startup script (Score:5, Informative)
Or you could use a rendering manager which lets you control the priority of the render nodes, like Deadline [franticfilms.com] from Frantic Films.
ProcessTamer (Score:2, Informative)
Re:Except that Windows does it painfully (Score:3, Informative)