tagosaku Posted February 26, 2020 Share Posted February 26, 2020 Hi, I have a question about how to manage CPU usage when rendering Mantra. When I do a local Mantra test, or batch render from mantra node > Render to Disk, my workstation is a kind of freezing because Mantra really forces to use CPU 100%. Then I go to tasks manager > details > mantra.exe and set to either a lower priority or remove some CPU cores. It really works to get Windows performance back. However, when mantra finishes a job per frame or session, the CPU setting gets reset and back to full CPU usage again. Thus I wonder if we can change a default CPU setting for mantra permanently. Thanks Quote Link to comment Share on other sites More sharing options...
ikoon Posted February 26, 2020 Share Posted February 26, 2020 Hi Tagosaku, I am just shooting in the dark: https://www.sidefx.com/docs/houdini/hom/hou/maxThreads.html Or environment variable HOUDINI_MAXTHREADS: https://www.sidefx.com/docs/houdini/ref/env.html Quote Link to comment Share on other sites More sharing options...
Skybar Posted February 26, 2020 Share Posted February 26, 2020 Mantra ROP -> Rendering -> Render -> Use Max Processors 1 Quote Link to comment Share on other sites More sharing options...
tagosaku Posted February 28, 2020 Author Share Posted February 28, 2020 >skybar Test rendering from render view works with exact number of CPUs, and does not control the number of CPUs for batch render, but definitely reduce CPUs usage, great! Thanks Quote Link to comment Share on other sites More sharing options...
tagosaku Posted February 28, 2020 Author Share Posted February 28, 2020 > iKoon I tried hou.setMaxThreads() from python shell, and got error return _hou.setMaxThreads(*args) Error: Max threads can only be set from the main thread and not sure what's 'the main thread' mean. I have a couple of questions for the below: - Where can I find houdini ENV file? - Should I just add line like this? HOUDINI_MAXTHREADS=16 - what does -j option means?? HOUDINI_MAXTHREADS Controls the maximum number of threads to use for compute-intensive operations in Houdini. The default of 0 means to use all available processors. Positive values will limit the number of threads that can be used. A value of 1 will disable multithreading entirely (limiting to only one thread). Positive values will be clamped to the number of CPU cores available. If the value is negative, the value is added to the maximum number of processors to determine the threading limit. For example, a value of -1 will use all CPU cores except 1. This control can be overridden by the -j option to most applications. Quote Link to comment Share on other sites More sharing options...
Undertone Posted March 25, 2021 Share Posted March 25, 2021 On 2/26/2020 at 12:30 AM, tagosaku said: Hi, I have a question about how to manage CPU usage when rendering Mantra. I use a program called "Process Lasso" to manage cpu usage across programs. https://bitsum.com/ You can give each program settings, and in general... any program that can max the processor, I remove from thread0 "cpu affinity" and that causes the 0 thread to stay clear, so that the OS -never- goes unresponsive. This is also helpful for Unreal when it's compiling shaders and otherwise locks up your pc. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.