PresentMon icon indicating copy to clipboard operation
PresentMon copied to clipboard

Suspicious GPU numbers in apex legends

Open VoeSo opened this issue 1 year ago • 10 comments

Hi,

I'm getting suspicous numbers reported in apex legends compared to other games

Issue 1:

Here is apex legends capped to 60 fps: pmissue4 GPUWait is very high, while GPULatency is low. GPULatency would indicate that gpu work on a frame is starting way before the cpu even starts simulation stage (since it's stalled by the framelimiter).

Here is a different game also capped to 60 fps without this issue: pmissue5

Issue 2:

There is significant DisplayLatency overhead in apex not accounted for by GPUBusy/GPUWait/GPULatency: pmissue6

For comparision a different game that works as expected: pmissue7 Here DisplayLatency is the same as GPULatency+GPUBusy+GPUWait as you would expect

EDIT: It's not an issue of apex legends vs other games....it's that I disabled fullscreen optimizations for apex, not for the other game. Independent flip gives good numbers, while legacy flip gives the issues above(tested and confirmed in multiple games now)

VoeSo avatar May 13 '24 11:05 VoeSo

Hard to say for sure without more debug, but this is likely expected. With legacy flip presentation mode, there can be a small amount of gpu work that needs to happen near display time, so for workloads that aren't gpu bound you can end up with a gpu work timeline that looks something like this:

[XX XXXXXXX]

Total GPU duration (end-start) will be ~frametime, but a lot of it can be GPUWait.

Total GPU duration (end-start) will be ~frametime, but a lot of it can be GPUWait.

FWIW I checked with the old msGpuActive metric and that works fine - no 16ms gpu duration. Also the reflex latency bars in rtss show normal gpu duration.....

VoeSo avatar May 14 '24 17:05 VoeSo

msGPUActive is not the same as GPU duration (end-start) it is just the part where GPU is doing something.

We will try to reproduce this and check if there is something wrong here. Also, if you can provide a short ETL we can check that (https://github.com/GameTechDev/PresentMon/blob/main/CONTRIBUTING.md#if-there-is-something-wrong-with-the-data-presentmon-is-reporting).

I tried to make the etl but get syntax error 4000 when running log.cmd syntax4000

To reproduce the issues, run any dx11 title in hardware legacy flip. I forgot to mention that the gpu render start point(CPUStartTime+GPULatency) is exactly the point where gpu render finished in the previous frame(prevCPUStartTime+prevGPULatency+prevGPUBusy+prevGPUWait).

VoeSo avatar May 15 '24 11:05 VoeSo

That syntax error in log.cmd is a known localization problem in the steps for gathering available memory for determining buffer sizes.

jenatali avatar May 15 '24 13:05 jenatali

That syntax error in log.cmd is a known localization problem in the steps for gathering available memory for determining buffer sizes.

If you can proivide me with steps to solve the error.....otherwise as I said, the issue is easy to reproduce on any system.

VoeSo avatar May 15 '24 14:05 VoeSo

Sorry, I wasn't aware of that issue -- I'll update the instructions.

It looks like there are some edits to the log.cmd that you could make. (e.g., https://www.yosoygames.com.ar/wp/2016/09/solving-gpuview-4000-was-unexpected-at-this-time-error/).

Another option is you can use the start_etl_collection.cmd and stop_etl_collection.cmd scripts here: https://github.com/GameTechDev/PresentMon/tree/main/Tools

Another option is you can use the start_etl_collection.cmd and stop_etl_collection.cmd scripts here: https://github.com/GameTechDev/PresentMon/tree/main/Tools

Is there an email I can send the etl file to, or any option other than posting it here publicly?

VoeSo avatar May 15 '24 16:05 VoeSo

"Issue #246 trace" -sent!

VoeSo avatar May 15 '24 19:05 VoeSo

Thanks for providing the ETL. I've reproduced your findings and see what the problem is, and am working on a fix.

We believe this has been fixed by the above code changes. Please let us know if the problem persists.

planetchili avatar May 28 '25 00:05 planetchili