ID 317219 - Nukes Project 3D node performance varies based on thread usage.

Follow

Problem summary
Project3Ds performance is affected by thread usage. 

Customer reported version
nuke.10.5v6

Customer reported platform
centos6

Steps to reproduce

1)Launch any release of Nuke from the command line using the -P flag to observe performance and paste the following script.



set cut_paste_input [stack 0]
version 11.0 v2
Camera2 {
 inputs 0
 translate {0 0 2.2}
 name Camera1
 selected true
 xpos -736
 ypos -1038
 addUserKnob {20 ALCheckin t "Checkin Management"}
 addUserKnob {1 computedLpath l cLpath t "Computed lpath"}
 computedLpath /JOB(peter)/SCENE(zex01)/SHOT(zex01_001)/ASSETDIR(assets)/ASSET(comp)/COMPASSET(elementscript)/ELEMENTSCRIPT()
 addUserKnob {1 userLpath l uLpath t "User lpath: this overrides cLpath"}
 addUserKnob {6 exemptFromCheckin t "Exempts this node from checkin. Not user selectable." -STARTLINE +DISABLED}
}
set N5efe610 [stack 0]
push $N5efe610
ColorWheel {
 inputs 0
 gamma 0.45
 name ColorWheel1
 selected true
 xpos -545
 ypos -1205
}
Project3D2 {
 inputs 2
 crop false
 name Project3D1
 selected true
 xpos -550
 ypos -1100
}
Card2 {
 control_points {3 3 3 6

1 {-0.5 -0.5 0} 0 {0.1666666865 0 0} 0 {0 0 0} 0 {0 0.1666666865 0} 0 {0 0 0} 0 {0 0 0}
1 {0 -0.5 0} 0 {0.1666666716 0 0} 0 {-0.1666666716 0 0} 0 {0 0.1666666865 0} 0 {0 0 0} 0 {0.5 0 0}
1 {0.5 -0.5 0} 0 {0 0 0} 0 {-0.1666666865 0 0} 0 {0 0.1666666865 0} 0 {0 0 0} 0 {1 0 0}
1 {-0.5 0 0} 0 {0.1666666865 0 0} 0 {0 0 0} 0 {0 0.1666666716 0} 0 {0 -0.1666666716 0} 0 {0 0.5 0}
1 {0 0 0} 0 {0.1666666716 0 0} 0 {-0.1666666716 0 0} 0 {0 0.1666666716 0} 0 {0 -0.1666666716 0} 0 {0.5 0.5 0}
1 {0.5 0 0} 0 {0 0 0} 0 {-0.1666666865 0 0} 0 {0 0.1666666716 0} 0 {0 -0.1666666716 0} 0 {1 0.5 0}
1 {-0.5 0.5 0} 0 {0.1666666865 0 0} 0 {0 0 0} 0 {0 0 0} 0 {0 -0.1666666865 0} 0 {0 1 0}
1 {0 0.5 0} 0 {0.1666666716 0 0} 0 {-0.1666666716 0 0} 0 {0 0 0} 0 {0 -0.1666666865 0} 0 {0.5 1 0}
1 {0.5 0.5 0} 0 {0 0 0} 0 {-0.1666666865 0 0} 0 {0 0 0} 0 {0 -0.1666666865 0} 0 {1 1 0} }
 name Card1
 selected true
 xpos -544
 ypos -1033
}
push $cut_paste_input
ScanlineRender {
 inputs 3
 conservative_shader_sampling false
 shutteroffset centred
 motion_vectors_type distance
 name ScanlineRender1
 selected true
 xpos -547
 ypos -931
}

2) With the script in place, connect your viewer to the Scanline Render node and monitor the load time of the Project 3D node. 

3) Note that its performance is slow. 

4) If you launch Nuke using a limited thread count via the -m flag you can also notice an increase and decrease in performance based on the number of threads.*
*during my test I used a stopwatch so my results may vary slightly from a different users test but are still accurate enough for an indication. 

Nuke 11.0v2
Threads       Time
1     - 5.2 
2     - 5.18
3     - 5.38
4     - 4.06*
5     - 3.16*
6     - 3.54*
7     - 4.1
8     - 5.1
9     - 5.2
10     - 4.48
11     - 5.5
12     - 5.2
13     - 4.7
14     - 6.0
15     - 5.47
16     - 4.56

=================================

Nuke 10.5v6
Threads     Time 

1-4.18
2-4.21
3-4.76
4-4.91
5-4.32*
6-4.2*
7-3.36*
8-3.78
9-3.86
10-4.10
11-4.36
12-3.31
13-4.32
14-4.16
15-4.12
16-4.85




Workaround
For optimum performance launch Nuke with limited threads via the -m flag, my tests showed that Nukes optimum performance was between 4 and 6 threads. 
The Knowledge Base article on utilizing the -m flag to limit thread usage, that I have linked below can assist you with this.
Launch Nuke with a limited number of threads -m flag


Reproduced by support
This bug has been reproduced in:
Nuke11.0v2 - CentOS 7
Nuke 10.5v6 - CentOS 7


Earliest version tested
Nuke11.0v2

Expected behaviour
Nukes performance to vary based on thread count. 

Actual behaviour
Nukes performance varied based on thread count, however with more thread usage the performance decreased. 

    We're sorry to hear that

    Please tell us why