limit threads in a mayapy session

107 views
Skip to first unread message

3da...@gmail.com

unread,
May 4, 2017, 1:00:22 AM5/4/17
to Python Programming for Autodesk Maya
Hi All
        Am trying to do some alembic caching in maya in a mayapy session on farm and currently it used all the availbale threads, I was wondering if there is a solution
to actually specifically say maya run within certain number of threads.

I tried to use cmds.threadCount, don't seem to be working for me, it still uses all threads.

thanks

Arjun

Marcus Ottosson

unread,
May 4, 2017, 3:01:37 AM5/4/17
to python_in...@googlegroups.com
Do you mean processing cores or logical processors?​

Justin Israel

unread,
May 4, 2017, 6:05:19 AM5/4/17
to Python Programming for Autodesk Maya


On Thu, May 4, 2017, 5:00 PM 3da...@gmail.com <3da...@gmail.com> wrote:
Hi All
        Am trying to do some alembic caching in maya in a mayapy session on farm and currently it used all the availbale threads, I was wondering if there is a solution
to actually specifically say maya run within certain number of threads.


What farm solution do you use? What operating system? 
Maya aside, can you make use of cpu affinity? Any good render farm solution should have the ability to bind the task to the allocated cores. 


This is the basic level support we apply in our render farm. But on linux we make use of cgroups for maximum control. This way it doesn't matter what the settings are in the software. It can't steal more cpu than it was allocated. 

I don't know much about Alembic support, but I see Maya gives control over than thread count setting. I don't know if that controls an actual thread pool or a constant value as an advisory amount. Or even if 3rd party code has to abide by it. Plugins could still use threads regardless. 



I tried to use cmds.threadCount, don't seem to be working for me, it still uses all threads.

thanks

Arjun

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/933e67f7-69f6-42ff-89f6-43f930142aba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arjun Thekkummadathil

unread,
May 4, 2017, 8:32:25 AM5/4/17
to python_in...@googlegroups.com
@marcus I was talking about logical processor 

@justin am aware of cgroups unfortunately we don't use that we use an open source system by blur studio called arsnel

But I figured out the problem threadCount command in maya works well. Just that if I import pymel.core it will spawn up all the available threads and put it in sleep mode. 

So when I use htop it will show my process linked to all threads but only what's specified using threadCount is used.

Thanks 

Arjun 


Reply all
Reply to author
Forward
0 new messages