Jump to content

I have a 16GB card. Can anyone tell me why after a longer game session the usage creeps up and begins to stutter? I can see why it creeps up. It's stored too many dif things. The problem is it's telling me I'm at 9.2 and that's where it starts stuttering. Another thing that kind of bugs me is that even at 0% usage the vram is always sitting at about 1.2 or so idling in windows. If that wasn't the case, I don't think I would get up the stuttering point. That's prob a stupid thing to say there. But what the hell are the other 5GB supposed to be for if I can't get to 10 before I have problems? I doubt it but, is there a way to dump some no longer needed vram allocation without restarting the game? Usually, the only thing I have running is windows, taskman, hwmon, a browser and the game. Pretty sure the only thing using vram is windows and the game.

Link to comment
https://linustechtips.com/topic/1602819-vram-allocation/
Share on other sites

Link to post
Share on other sites

20 minutes ago, dverdier said:

I have a 16GB card. Can anyone tell me why after a longer game session the usage creeps up and begins to stutter? I can see why it creeps up. It's stored too many dif things. The problem is it's telling me I'm at 9.2 and that's where it starts stuttering. Another thing that kind of bugs me is that even at 0% usage the vram is always sitting at about 1.2 or so idling in windows. If that wasn't the case, I don't think I would get up the stuttering point. That's prob a stupid thing to say there. But what the hell are the other 5GB supposed to be for if I can't get to 10 before I have problems? I doubt it but, is there a way to dump some no longer needed vram allocation without restarting the game? Usually, the only thing I have running is windows, taskman, hwmon, a browser and the game. Pretty sure the only thing using vram is windows and the game.

The stuttering has nothing to do with VRAM. The game allocates the size it needs, no matter how small. I suggest installing MSI Afterburner and using the in-game overlay to monitor the CPU and GPU temperatures. 

*using non-conversational, sketch-level language to gesture at structure and direction.
The GB8/12 Liberation Front

 

 

Link to comment
https://linustechtips.com/topic/1602819-vram-allocation/#findComment-16663808
Share on other sites

Link to post
Share on other sites

48 minutes ago, dverdier said:

I have a 16GB card. Can anyone tell me why after a longer game session the usage creeps up and begins to stutter? I can see why it creeps up. It's stored too many dif things. The problem is it's telling me I'm at 9.2 and that's where it starts stuttering. Another thing that kind of bugs me is that even at 0% usage the vram is always sitting at about 1.2 or so idling in windows. If that wasn't the case, I don't think I would get up the stuttering point. That's prob a stupid thing to say there. But what the hell are the other 5GB supposed to be for if I can't get to 10 before I have problems? I doubt it but, is there a way to dump some no longer needed vram allocation without restarting the game? Usually, the only thing I have running is windows, taskman, hwmon, a browser and the game. Pretty sure the only thing using vram is windows and the game.

C++ garbage collection. Memory leaks. Basically when your program chooses to just let things go out of scope the runtime has to garbage collect the memory, but with a GPU, that has to be done on the GPU, and thus letting something go out of scope on the GPU doesn't guarantee that the driver will garbage collect it when the CPU side does which is done in the c++ runtime.

 

When you use stuff like Unreal Engine, usually it will NOT leak, you have to do something immensely wrong for that to leak. However Unity is not very good at it.

 

Reference counting doesn't free memory until the counters hit zero, and may cause a chain of other memory objects hit zero. Like never mind "loading screens" imagine if you have an open world sandbox game and have to stop every few minutes to free a few megabytes of GPU memory to keep it from leaking or even trying to page out the GPU. Once video memory starts getting paged out to system or virtual memory, your performance will tank 1000 fold.

 

Hence why games are usually designed in a "allocate all memory up front" manner to avoid having the game stutter from garbage collection and reference counting.

 

What you're describing is also something that happens when people have dual GPU setups (eg laptops, iGPU and dGPU) and are playing the game off the iGPU even though the dGPU is actually doing the work. So in those cases, there's a possibility of having GPU memory reserved for the frame buffer.

 

So a 4K screen is 3840x2160, at 4 bytes per pixel non-HDR, and you minimally have frame double buffering. So 32MB is always going to be in use by every GPU running at native screen resolution. 32MB per buffer. So if you have like a 6-screen setup you'd have 12x32 (384MB) always unable to be used by the game.  So there is ALWAYS going to be VRAM in use from the OS and it will reflect the number of physical and virtual screen space you are using.

 

But let's be honest. You're using the wrong tool to answer the question.

 

System Informer (successor to Process Hacker)

image.thumb.png.c90c8bfd41c59276d4b8375b949f92eb.png

 

image.png.1148b7fb169ad1c2f469abe038e742c2.png

Epic Games Launcher will just sit there and suck up 2GB of video memory for no reason for example.

Link to comment
https://linustechtips.com/topic/1602819-vram-allocation/#findComment-16663817
Share on other sites

Link to post
Share on other sites

4 hours ago, Timme said:

The stuttering has nothing to do with VRAM. The game allocates the size it needs, no matter how small. I suggest installing MSI Afterburner and using the in-game overlay to monitor the CPU and GPU temperatures. 

I'm not saying you're wrong. It may be coincidence and something else is causing it. The game will start out under 9 and hours in it will stutter and I find it at 9.2. Sometimes I'll deal with it. It will stop at some point and it's back to 8.9 or 9.0. I'm going to get this tool the other person talked about and see what is using it.

 

4 hours ago, Kisai said:

C++ garbage collection. Memory leaks. Basically when your program chooses to just let things go out of scope the runtime has to garbage collect the memory, but with a GPU, that has to be done on the GPU, and thus letting something go out of scope on the GPU doesn't guarantee that the driver will garbage collect it when the CPU side does which is done in the c++ runtime.

 

This is a little messy but hopefully you can follow me here:

 

I'm going to get this system informer. Your explanation is a little over my head. I'm interested to see what is using it though. Plus the other guy said it's not vram that's causing it. So, I want to get as much info as I can about the whole deal.  I've got a 7950x, 64gb at 6400mts and a 4080oc on a single 4k hdr tv that I'm using and the game in question is rdr2. Kind of separately but more to the original question is...I have to run dlss to have this game maxed or I get like 20 couple fps. With all maxed, it's wanting like 12gb and for whatever reason, it won't handle it. Turning on dlss turns off some of the features that raises vram usage. So, I can still run at 4k. So again, what are those other gb for if I can't use them? Back to where you lead me. It sounds like what you're saying is that rockstars game engine isn't very good at clearing data stored in the vram that is no longer needed. I know agpu is like it's own little local pc inside a pc. So, if software isn't up to the same performance as the hardware is capable of, you can't really fully utilize your hardware then.

 

Something else you mention was interesting. Having a igpu and dedicated. I have a laptop that's a little older. Its got an 11th gen cpu with 32gb of shared ram. A crap mx450. I inherited this and tried to run some games on it but I can't even get 1080 with med settings out of it. All low just looks ridiculous. By all accounts that 450 is better than the igpu but it's only got 2gb vram. When using the igpu I can't run it using nearly all that 16gb. Am I somehow able to tell it to run windows on the I and the game on the D. Or can I somehow force it to use that shared when using the I. Same kind of question for my desktop. Every now and again I'll notice a couple usage spikes on the I even tho I'm using that 4080. Can I somehow dedicate windows to the I and leave the D to games only?

Link to comment
https://linustechtips.com/topic/1602819-vram-allocation/#findComment-16664022
Share on other sites

Link to post
Share on other sites

7 hours ago, dverdier said:

 

I'm going to get this system informer. Your explanation is a little over my head. I'm interested to see what is using it though. Plus the other guy said it's not vram that's causing it. So, I want to get as much info as I can about the whole deal.  I've got a 7950x, 64gb at 6400mts and a 4080oc on a single 4k hdr tv that I'm using and the game in question is rdr2. Kind of separately but more to the original question is...I have to run dlss to have this game maxed or I get like 20 couple fps. With all maxed, it's wanting like 12gb and for whatever reason, it won't handle it. Turning on dlss turns off some of the features that raises vram usage. So, I can still run at 4k. So again, what are those other gb for if I can't use them? Back to where you lead me. It sounds like what you're saying is that rockstars game engine isn't very good at clearing data stored in the vram that is no longer needed. I know agpu is like it's own little local pc inside a pc. So, if software isn't up to the same performance as the hardware is capable of, you can't really fully utilize your hardware then.

 

I use that program to check if a program is leaking cause if it's leaking you'll see a gradual uptick in the GPU allocation. If it's not leaking (eg it's relatively flat) then that's not the problem. It might just be other stuff you have running that is "locked" by other processes.

 

DLSS is a type of upscaling tech. Where we used to "Antialias" by rendering more and then scaling down, DLSS renders less and scales up. So yes, using DLSS should use less video memory in the render buffer, but it should come at some additional GPU expense, but since it's rendering at a lower resolution, that might trade straight off. That's why DLSS works fine as an antialias mechanism when set at 100%, but when set at 50% it introduces some blurs and latency that might be felt.

 

 

7 hours ago, dverdier said:

Something else you mention was interesting. Having a igpu and dedicated. I have a laptop that's a little older. Its got an 11th gen cpu with 32gb of shared ram. A crap mx450. I inherited this and tried to run some games on it but I can't even get 1080 with med settings out of it. All low just looks ridiculous. By all accounts that 450 is better than the igpu but it's only got 2gb vram. When using the igpu I can't run it using nearly all that 16gb. Am I somehow able to tell it to run windows on the I and the game on the D. Or can I somehow force it to use that shared when using the I. Same kind of question for my desktop. Every now and again I'll notice a couple usage spikes on the I even tho I'm using that 4080. Can I somehow dedicate windows to the I and leave the D to games only?

 

You can force applications to use the iGPU or the dGPU, but usually on these lower-tier laptops there's not a huge benefit to manually doing it.

image.thumb.png.2aba13f4066ff236b41d2c13fd22477f.png

 

Basically, if your device has exposed HDMI/DP ports, usually on laptops you can tell the BIOS you want those to be the iGPU or the dGPU via the mux setting in the BIOS if it has one, otherwise they are always iGPU, and the dGPU is not exposed except via the DirectX Render device and OpenCL/CUDA (nvidia)

 

Link to comment
https://linustechtips.com/topic/1602819-vram-allocation/#findComment-16664321
Share on other sites

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

×