Permanently Set Process Priority in Windows?
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?"
If you check out 'help start' you can see that setting the priority of a process is pretty simple at the time of invocation.
/low 3dsmax.exe' or 'start /low [program.exe]' should work for you.
'start
"We are not always what we seem, and hardly ever what we dream."
Schmendrick the Magician
Your solution is here
Mabye replace "3sdmax.exe" with a shellscript that runs the real "3dsmax.exe" with the correct priority. You might have to work out how the renderer gets its data, so your shellscript can make sure it isn't dropped somewhere along the way.
Swedish plasma phys. PhD student; MSc EE; knows maths, programming, electronics; finance interest; seeks opportunities
The hourglass is just a picture. It has no intrinsic meaning as far as the application goes. You're supposed to change the cursor to the hourglass when your program is about to do something that will cause it to cease reacting to user input. Then, after the blocking call, you change it back to a pointer. A process could be pegging the CPU and still be showing the arrow pointer because it can still respond to you (think software HD video decoding). It could also be showing an hourglass and not using any CPU or disk resources at all (like a network application waiting for the server to respond).
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%.
If you're a programmer you could grab the source code for a utility I wrote to kill processes by name as they appear and modify it to change the priority any time the process appears. The tool is called Process Hunter Daemon. You can get the source code at my homepage (http://yakko.cs.wmich.edu/~rattles/development/wi ndows/#phunterd).
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.
Erik http://yakko.cs.wmich.edu/~rattles
I'd love to know if there's a way to limit ALL processes to a certain percentage of total CPU... say 75%. There's no reason programs should routinely be able to run up every bit of processing power.
Did you Google a little farther and find the answer to the question that was asked? The network rendering manager is spawning 3DSM, not somebody sitting at the computer. The start command won't work unless the network renderer is modified. What he needs is for Windows to always recognize that
"I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)
You can do that with Process Lasso. http://www.bitsum.com/ProSuper.asp
For this particular problem, the easiest solution would be to use a startup MAXscript on your render nodes which sets the priority.
Or you could use a rendering manager which lets you control the priority of the render nodes, like Deadline from Frantic Films.
"From my cold, dead hands you damn, dirty apes!" - CH