How to debug performance issues?

When running a fairly intensive graphics app I intermittently get a really slow framerate. To get back to 60fps I have to restart my computer which is a bit of a buzzkill.

What I’m doing is intensive but well within the capabilities of the hardware - does anyone have some general recommendations for debugging performance issues?

Can I monitor/log my GPU activity? I’m using OSX 10.9.4 on a late 2011 Mac.

i’ve had this problem for some time and finally discovered that the graphics card was overheating and it enters a low power consumption mode where it works much slower, sleeping the computer or turning it off makes the gpu go back to normal mode. the only solution is usually to clean the fans :slight_smile:

I suspect something similar to what Arturo is saying … :wink:

On Mac you can use the built-in Activity monitor to check overall system performance and for instance iStat for detailed info about GPU performance, memory and temps. iStat has a free trial…

Also you can stress-test your gfx card by using the geeks 3d test


It may also work a little faster if you build it in Release mode instead of Debug mode, but I think the above solutions sound more serious.

Another case I had in the past; if you make intensive operations with using both cpu and gpu, the hardware heating is doubling. In this case, try to keep most of the things only on gpu.

For example; if you calculate a data array in each frame (on cpu) and update the gpu again, calculate all instances in the beginning and put them to the gpu in the beginning.

Xcode has great profiling tools:

for GPU performance, it’s usually a good idea to get as specific as possible. it’s too difficult from your description to guess what is wrong… but the classic way to find performance problems is to start pruning, turning things off. turn one part of it off – does it still drop frames intermittently? turn another part off, and another. turn everything off except a single quad – does it still drop frames intermittently?

i’ve had good results asking on the powerVR forum about getting their hardware to run fast… try to find the most technical forum on the site of the company who made your GPU, and then be as specific as possible when you describe the situation in which it is dropping frames.

p.s. apple’s developer forums are ‘just alright’ for this, better than nothing but usually just other people with problems helping you out. it’s a different feel than the people who made the hardware.

p.p.s. some of this is powerVR specific, but other is good advice for all graphics:

1 Like

Some great answers here. Wasn’t really looking for a ‘silver bullet’ answer to a specific problem, just wanted to turn up some options to help me profile and debug going forward. Definitely got that - thanks!