Nuke Timeout – EP04 – Profile Node

Nuke’s Profile node offers a great way of monitoring your script and node performance – if you want, even by measuring in separate isolated areas.
We just need to pop in one (or multiple) profile node(s) and plug it right into the stream where we would like to receive our data from.

The node properties itself don’t offer you much besides defining the frame range you want to get your data for and opening the profile panel in a floating window. You can also open it from every available pane menu.

We can use frame ranges (1-10), groups of ranges (1-10, 20-30), ranges by every nth frame (1-100×10) as well as individual frames.

PROFILE PANEL

Now we just need to select the Profile node we would like to process and hit the profile button.
Time to grab a coffee – this can take as long as locally rendering your script.

During the measuring process – similar to running performance timers – Nuke starts color coding your nodes based on performance with red being very slow over to green being very fast – relative to each other.

There are 4 different data types which you can create profiles for:

  • CPU – time in microseconds that your CPU spent executing the processing code (aggregated over all CPU threads)
  • WALL – actual time in microseconds you have to wait for the processing to complete
  • OPS – number of operators called in the node
  • MEMORY – total amount of system memory used by the node

The most important one (WALL) is calculated regardless. You need to have at least one type enabled though – otherwise even the wall data will not be processed.
It doesn’t hurt to run them all. We will have a viewing filter option later on to hide unnecessary information.
After all the frames have been processed, we can see the first charts popping up.

We have graphs for all data types available and like I said, we can filter them out if needed.

Nuke does a good job in converting all the measured times into percentages. You can choose if you want to see the results grouped by node class or individual nodes. That way you can judge if a specific node class is slow in general or if one specific node of that class is just acting up.
Please be aware that this interface only shows you the top 15 nodes. The rest is collected under other.

Alternatively you can select nodes in the node graph and add them to the display filter.

Also, you can switch the chart type to table and all of the nodes will be listed.

Here you will also be able to select nodes in order to find them in the node graph.

The pie chart gives us a different kind of view on how much every node contributes to 100% processing time, while timeline gives us the chance to judge the performance over the whole frame range.

Pie Chart
Timeline Chart

Talking about time. By default the other 3 charts show us an average value for the chosen frame range. We can switch it to frames though and click through them step by step.


Also to mention is the threshold filter. Here you can set a minimum percentage value, so nodes below a certain contribution will not show up in the charts.

This filter only works for the table chart type.

If we now want to process another profile node, you have to be aware that your current stats will be gone and you will have to reprocess them. Luckily you can export the profile data into an xml file and reload it later.
Now comes the great part.
That way we can also import xml files previously created via Nuke’s performance timers.
Please check out Nuke Timeout episode 3 to see how you can write xml files during render time.
It is way more convenient to open those files here in the profile interface and you can see that you don’t have to be in the actual script the xml is referring to.

Let’s do a quick comparison between both approaches, performance timers and profile node and also think about how we can get the best out of both of them.

My conclusion and personal preference of use is the following:

It’s great to have both options available.