Skip to content

Machine Performance

In order to keep at framerate it’s a balancing act between GPU time and CPU.

Every frame follows a simple pattern

CPU updates everything and sets up the rendering for that frame, then at the end it calls ‘present’. ‘Present’ then blocks any further CPU action until the GPU outputs the frame to the screens.

The following graphs are useful to address performance concerns:

FPS

It’s good for a simple overview

GPU

Shows the time spent in the frame: the dotted red line is what you want to be underneath, This is your ms budget per frame to hit every genlock pulse.

CPU

Shows some info on where the CPU is spending most of its time.

Graph data

  • working time is the actual time the CPU spent doing things.
  • present wait time shows how much time the CPU sat there waiting for the GPU to finish it’s job.
  • present wait time does not include the working time, so after the working time the CPU still waits that amount of time for the GPU to finish.
  • you will always block on present because the GPU won’t output until a genlock pulse is received (or a vsync pulse if you are locked to the server’s own timing).
  • If in free run the GPU can just output whenever present is called; present will still block until all outputs have finished so the balancing act .is making sure the CPU finishes in under the ms budget, and making sure the GPU finishes in time for the genlock pulse.

Troubleshooting Framedrops

  • If your working time is under-budget but your present time pushes you over budget, your GPU is causing the framedrops.
  • If your working time is over-budget then your CPU is causing framedrops.
  • With Notch there is both CPU work and GPU work so you have to consider both.

Profiler

  • For a breakdown of CPU timings you can press CTRL + ALT + P to see the Profiler which shows functions and how much time (in ms) is spent there
  • D3::frame is the root.
  • You can find NotchModule calls to see how much cpu time is spent on notch calls; this helps you figure out if you are going over your frame budget because of what you’ve got in Disguise or what you’ve got in Notch.

If you are actually waiting for the GPU to finish then it’s more difficult to get a breakdown; it’s best to mute the layer and see if it is purely the cause of GPU time being so high in that section.

Once you know the cause you can now address things appropriately.

  • If Notch is spending too much of your CPU time then this is down to parameters.
  • If it’s GPU then it’s down to rendering techniques.