SUMMARY

This article explains how you can test the performance of Nuke nodes when trying to identify the cause of script slowdowns.

MORE INFORMATION

Trying to find out which parts of your Nuke script is slowing down your playback/render times can be difficult.

To facilitate this action Nuke provides a Performance Profiling mode which will give you node analytics that can be used to isolate particularly slow nodes and help you optimize your workflow.

Launching Nuke in Performance Profiling mode

To run Nuke in Performance Profiling mode you need to use the -P flag when launching Nuke. A list of instruction on how to do this can be found below for each operating system.

Windows:Open a Command Prompt window and run the following command:

"C:\Program Files\Nuke10.0v4\Nuke10.0.exe" -P

Mac OSX:Open a Terminal window from Applications > Utilises and run the following command:

/Applications/Nuke10.0v4/Nuke10.0v4.app/Contents/MacOS/Nuke10.0v4 -P

Linux:Open a terminal and run the command:

/usr/local/Nuke10.0v4/Nuke10.0 -P

Note: These instructions are based on having Nuke installed in the default location. If this is not the case then the commands will need to be modified accordingly to run from your custom installation location.

Information reported while in Performance Profiling mode

With Nuke launched in Performance Profiling mode, each node will report the following information:

• cpu - The time that the CPU spent executing the processing code, in microseconds, aggregated over all CPU threads.

For example, with multi-threaded processing this is typically much larger than the wall time. If the average CPU time per thread (cpu divided by the number of threads used) is much shorter than the wall time, this suggests the CPU threads have spent a lot of time not executing code and perhaps waiting on locks, which could indicate a performance problem.

NOTE: On Mac OS X and Windows, the CPU time is not currently accurate. On Mac OS X, the cpu value is always similar to the wall time.

• wall - The time taken as it would be measured by a clock on the wall - the actual time you have to wait for the processing to complete. The wall time is also measured in microseconds.

• ops - The number of operators called in the node. Operators are Nuke's building blocks that perform certain tasks. Nodes can contain one or more ops.

For example, when a node needs to resize something it would use a Transform op rather than an implementation of its own to do the same thing.

• memory - The total amount of system memory used by the node.

In addition to the timing information, nodes are color-coded according to their profiling, green through red, where red is a slow node. You can see from the example script that Defocus is a slow node, whereas Merge is doing no work at all.

With Nuke launched in Performance Profiling mode, you can reset, start and stop the timers in the Performance menu in the Nuke UI, as shown below: