Sign in to follow this  
EvilNando

How to measure VRam usage?

Recommended Posts

Hi guys Im having performance issues in my game using the task manager I can see that the CPU is not the bottleneck (stays at 20%) My guess is that Im running out of VRam. How can I demonstrate this to my colleagues? thanks

Share this post


Link to post
Share on other sites
I'd suggest using Perfhud. Amongst other things it will report ram usage and let you try various changes to see how they affect frame rate. The documentation includes a good guide for tracking down your performance bottlenecks.

Also if you are running out of vram then applying DXT compression to your textures should help performance significantly (as a quick test you can do it at load time with D3DXLoadTextureFromFileEx()). Make sure you use DXT1 if they have no alpha channel, and DXT5 if they do.

Share this post


Link to post
Share on other sites
perfhud works on ATI GPUs?

Ive been trying to use texture compression in the past but I end getting artifacts on my textures , im using png files for textures

Share this post


Link to post
Share on other sites
Quote:
Original post by EvilNando
perfhud works on ATI GPUs?

Ive been trying to use texture compression in the past but I end getting artifacts on my textures , im using png files for textures
Nope, NVPerfHUD is NVidia only. I think there's an ATI equivalent, but I'm not sure what it is and I've never used it.

As an aside; the format of the textures is only PNG on disk. When you load the texture, a BMP takes as much VRAM as a PNG or JPEG. Compressed texture format (D3DFMT_DXT*) are the only ones that are actually compressed when they're in VRAM.

If you're getting artifacts on your textures, then you're probably using the wrong compressed texture format. What sort of artifacts do you mean? Any chance of a screenshot?

Also, how are you determing you're having performance issues? If you're just using the frame rate, what FPS are you getting? And is V-sync disabled?

Share this post


Link to post
Share on other sites
I was getting some white pixels on unexpected areas of the textures, I cant show u a screen of it because its a very old build, ( now we just load unconpressed )

my reasoning for detecting the performance issue was to put a counter of how many messages the mainwindow processes

usually the counters (which prints to a logfile)
shows like 40 messages per tickcount, when I get to the slowdown it shows that it only processes 10 or 15 , also my cpu usage never goes above 20%



Share this post


Link to post
Share on other sites
Quote:
Original post by EvilNando
Im having performance issues in my game
using the task manager I can see that the CPU is not the bottleneck (stays at 20%)

My guess is that Im running out of VRam.
How can I demonstrate this to my colleagues?


It's probably much more likely you're just GPU-bound. Have you ever used PIX before? If you haven't, now would be a great time to learn. Use PIX to start up your app, and have it capture a few seconds' worth of frames. Then you can look at your CPU/GPU usage for each frame in the graph, and determine whether your GPU is just working for the whole frame or whether its stalling to wait for resource access or to synch with the CPU.

Share this post


Link to post
Share on other sites
As a general point, DONT use task manager for any sort of profiling. At the very best it might give you some crude guidance and at the worst (and more likely) it'll give you utter rubbish with no useful meaning whatsoever [smile]

Get proper CPU and GPU profilers instead [smile]

(try this one if you're using ATI hardware)

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by EvilNando
my reasoning for detecting the performance issue was to put a counter of how many messages the mainwindow processes
Wait, what? Window messages? The ones that only get sent when your window needs to do something? And the ones of which you won't get any sent if your app is just sitting there?

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Quote:
Original post by EvilNando
my reasoning for detecting the performance issue was to put a counter of how many messages the mainwindow processes
Wait, what? Window messages? The ones that only get sent when your window needs to do something? And the ones of which you won't get any sent if your app is just sitting there?


oh Im sorry I meant messages with the center

its a 3layered application

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this