Jump to content
  • Advertisement
Sign in to follow this  
BlueSpud

OpenGL Possible Causes of Performance Degradation Over Time

This topic is 637 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey,

So I was working on my OpenGL engine today and I noticed that if I leave it running for ~a minute and a half I start to experience some significant framerate drops. The first thing I did was make sure that there were no OpenGL allocations every frame. After both a code check and a separate profile application check I verified that I am not calling something like glGenBuffers() or something like that. Then I checked for possible issues with dynamic allocations per-frame. The code executed every frame is relatively large, but it doesn't seem like there are any dynamic allocations in the rendering pipeline. I checked the graph of memory usage and it doesn't even seem like I'm allocating any memory except for a little bit here and there, which I assume is coming from PhysX or OpenAL which are both in the program.  

 

I thought that perhaps my CPU or GPU could be thermal throttling (I'm on a laptop). I ran the program until I experienced performance issues, closed it and immediately ran it again. The performance issues stopped once the application was re-run. What also strikes me as odd is that when I tab-out and tab back in the performance issues stop for a short period of time.

 

I'm a bit puzzled at what is happening here. I highly doubt it's a driver issue as other games work fine, although I haven't tried it on another computer. I've run some standard time-elapsed CPU profiling to try to figure out where the code was getting slow (I know these are generally unreliable because the GPU operates independently) and it just seems like anywhere that is touched by OpenGL just runs slower after the game is left running. Any ideas to what might be causing this? I've noticed this issue for a while but I've always ignored it thinking it was just something else running on the computer until I did extensive testing now so I don't know what code specifically changed this. 

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement
The alt-tabbing behavior sounds like thermal throttling to me, or possibly a flush of accumulated GPU resources (though I'm only familiar with what DirectX does when it loses its device - not sure if OpenGL does that as well).

Have you tried using GPU-Z or some similar GPU monitoring tool to check whether it shows anything interesting in the "PerfCap Reason" field? Edited by Nypyren

Share this post


Link to post
Share on other sites

The alt-tabbing behavior sounds like thermal throttling to me.

 

Yeah - I suspect that too. I wouldn't be surprised if the management of the CPU/GPU clock speed is dynamic enough that launching a new program or alt-tabbing out could lead to a temporary speed recovery.

Share this post


Link to post
Share on other sites

 

The alt-tabbing behavior sounds like thermal throttling to me.

 

Yeah - I suspect that too. I wouldn't be surprised if the management of the CPU/GPU clock speed is dynamic enough that launching a new program or alt-tabbing out could lead to a temporary speed recovery.

 

 

Here are some graphs of the thermals running the game for ~7 minutes.

http://imgur.com/a/zZ1iq

It seemed like the there could perhaps be some throttling, but for the long patch where the temperature remained constant, the game was still running at 60FPS (V-sync was enabled). This was a fresh reboot, so it could still be a temperature issue, but I'll have to do more extensive tests later on that if there aren't any other ideas.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!