Bottleneck detection

Started by
14 comments, last by alex997 20 years, 7 months ago
I've come across some API calls that involves profiling, but that seems a little bit too much work. Maybe they have a deal with Intel so they can sell more of their VTune, who knows?!

And yeah, the NVidia docs ARE good!

---

Found this on a web site: "Although Visual C++ does not ship with a profiler", so I guess profiling stops with VC++ 6.0 . At least easy profiling...

Also, it seems like it's just the .NET Framework that has the profiling API calls when I read on.

---

I found a free profiler to use with VS.NET. Haven't tried it, but if someone is interesed, the link is:

http://www.compuware.com/products/devpartner/profiler/default.asp

[edited by - ALiENiD on August 19, 2003 9:01:48 AM]
Advertisement
iNsAn1tY, using the profiler will show where a bottleneck occurs within the code. This assumes that the main bottleneck of the program is in the CPU, i.e. your fps are limited by the number of calculations the CPU is having to perform for each frame (e.g. AI, collision detection, occlusion culling etc.).

If the bottleneck is in the GPU (e.g. fill-rate limits as I mentioned in my previous post) the CPU is basically waiting around for the gfx card to finish drawing the scene, and the profiler cannot help you (since making any CPU routines run faster will not help your fps - the CPU will still be waiting for the graphics card to catch up).

I believe the depth-buffer can help in fill-rate limited scenarios: While the vertex data still has to be sent to the gfx card, the depth buffer will prevent hidden surfaces from being rendered, since they are behind other polys. This means the texturing and lighting operations (and maybe others?) will not need to be performed for the hidden polys and so the frame rate will increase. Hence if decreasing the window size increases the frame rate, the bottleneck was the fill-rate limitations of the gfx card (fps increases because there are fewer pixels to "fill"), it cannot be the cpu since the same number of calculations are still being performed by the CPU (sending vertices etc.)

Are the only two types of bottleneck therefore fill-rate limited and CPU limited then? Or have I forgotten others? I guess vsync could be seen as a bottleneck in that it is a fps limiter!

iNsAn1tY, your post on the profiler was very useful, I had heard of it but never got round to using it. I guess it would be used to locate the source of a CPU bottleneck more precisely, but won''t tell you if your bottleneck is fill-rate or GPU limited, AFAIK.
Devpartner is really cool.

Enabling profiling info is in the property windows (ALT + ENter) of the solution. But i don''t find a way to do profiling with VS.Net only.

_______________

Jester, studient programmer
The Jester Home in French
_______________
Jester, studient programmerThe Jester Home in French
Hmmm. Yes, if it is a fill rate problem, then profiling won't be much use. However, it is an excellent optimization tool, and you can catch other bottlenecks with it, like inefficent code. You should see the speed increase in function call times when you use glDrawArrays/glDrawElements instead of the high-level glBegin/glVertex3f/glEnd functions. Another good utility for checking graphics card fill rate, CPU and GPU loads and a whole heap of other stuff is 3D Mark 2003. Plus, it's demos are really quite impressive. You can find 3D Mark 2003 (for modern machines) and 3D Mark 2001 (for older machines) at Futuremark's website.

By the way, the depth buffer still performs it's test on a per-fragment basis though. It has to check whether each fragment of a polygon is visible, and with large numbers of polygons, performance can be seriously slowed. The best option for reducing geometry is still frustum culling and spatial occlusion (BSP, etc).

There's a nice tutorial on frustum culling at www.gametutorials.com...


Coding Stuff ->  [ iNsAn1tY Games | DarkVertex | How To Do CSG | Direct3D Vs. OpenGL | Google ]
Fun Stuff    ->  [ Evil T-Shirts | Stick-Based Comedy | You're Already Here | The Best Film Reviews ]

[edited by - iNsAn1tY on August 19, 2003 12:52:42 PM]
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]
A program can be fill bound or transform bound. There was a nice two part article on it in Game Developer magazine recently(june and july) by Guillaume Provost. Hopefully it''ll appear on Gamasutra soon.
Look at superpig''s engine tutorial, it has info about how to create a profiler; allowing you to see which parts take up the most time

Oli

All the best problems start with C

The Manta-X Homepage

This topic is closed to new replies.

Advertisement