Advertisement

Frame delayed when Captured in Nsight

Started by May 27, 2020 09:23 PM
4 comments, last by delifaz 4 years, 8 months ago

Hey,

So I've been bashing my head against the wall trying to figure out what could be the cause of this.
Basically, whenever I take GPU captures in Nvidia Nsight, it looks like my entire frame is being delayed by several milliseconds.

Here's a picture for reference.

As you can see, my entire capture reads 29.33ms, but there's no actual work being executed until about 14ms have passed.
There's no sync events, no stalls. The SM Occupancy reads 100% idle in the empty area.
My first guess was that the capture was going from present → present, and that there's idle time in between.
But I'm not sure at all since the present command isn't showing in the capture.

Have anyone else had similar issues, or knows Nsight a bit better than me who can explain?

For my case,

I only worked with the frame debugger in openGL, to compute the start and the end of a frame it needs to link to an event that tell him to do so. In openGL it happens when the software is swapping frame (double buffering). If you use the frame debuger and navigate in the timeline to the start and the end it will tell you which event are used.

Advertisement

@Baemz Hi There,
I am Dana Elifaz from Nvidia Graphics Devtools team.
You have guessed right, we do measure a frame from present to present.
Here are some questions for you to maybe clear up the issue you are seeing:
- Have you turned Vsync off?
- Are you running your live application or is it the Nsight Graphics C++ capture?
- Have you tried to capture few frames and see if this gap repeats?
- It might be that the GPU Idle you are observing in the beginning of the trace reflects that the CPU is working and doesn't offload work to the GPU. You can try using Nsight Systems to understand if/what on the CPU, it limiting the work

@delifaz
Hi Dana,

Thank you for replying.
The fact that the capture was made present to present cleared up quite a bit for me.
I realized that the gaps in the caputure was indeed GPU idle time due to CPU work blocking. I've since improved my CPU performance in the beginning of the frames and are now seeing very much improved captures.

Awesome! Glad it was helpful

This topic is closed to new replies.

Advertisement