• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Graphic Card memory allocation/fragmentation

  • Thread starter Thread starter Deleted member 6693
  • Start date Start date
D

Deleted member 6693

Guest
Question to the supercilious people:
Is it the application, could be a game or any other application, that allocates VRAM resources or is it the driver?
And how is this managed?
Can VRAM be fragmented?

Mayby a bit silly question - but one partiqular game I run, Crossout, sometimes makes very odd horizontal stribes, after 2, or more hours of play.
I have begun investigating - and I can see the VRAM (Dedicated GPU memory usage) through Task Manager, is maxed out ... don´t know if that is an accurat way to see the VRAM usage

I presume it is the game that is poorly written - if it is the game that handles that part.......
 
Last edited by a moderator:
VRAM is RAM so fragmentation is meaningless. There is no platter that has to spin up and head that has move to another track to find the data.
 
I see no reason why VRAM can't end up fragmented too, just like main memory. Doubt that the GPU has a defragmenter. Doubt that it's an issue unless you craft a specific workload.

Your horizontal stripes are definitely not caused by this

@John Naylor Look up memory fragmentation
 
Do other games do it too ?, you may have a heating issue.

I presume it is the game that is poorly written

Could be just that too.
 
No heating issue - 2 weeks ago I ripped the cooler of the GPU and applied new thermal pads on the VRAM and Kryonaut Grizzly thermal paste on the GPU die.
I have many games - and only Crossout does it - not if I am playing for an hour - but around 2 hours, the VRAM is used 7.8 GB (the Task Managers Dedicated GPU memory usage says)
I have checked after an half hour of play - it uses barely 1.8 GB of GPU memory - so it seems to be piling up/cached up and not cleared when not used - or simple bad memory control from the game?

Has GPU-Z some sort of logging - maybe for VRAM usage? - found it - it has a Sensor Log - I´ll try to activate the log and see what happens.....
 
Last edited by a moderator:
Maybe it is the way the engine handles it when it runs out of ram ( leaking ), or just allowed to use what ever amount it wants. Makes me think of one build of 7DTD were it would use up to 8GB regardless how much you had and the game would start to stutter \ lockup and such, they fixed it now so it actually checks your card.

Maybe try dropping them a email or 2 about it.
 
I have made a support case to Gaijin.... lets see what they have to say
 
VRAM is RAM so fragmentation is meaningless.

No it's not and this can't be compared to hard drives. A fragmented memory can make the allocation of large continuous chunks of memory impossible even though there would be enough free space available. And some data structures have to be continuous in memory, there is no going around it.

I see no reason why VRAM can't end up fragmented too, just like main memory.

Yep, the driver will try to maintain the maximum amount of free continuous memory available in the same way the OS does with system memory.
 
Source? Are you claiming that GPUs implement LFH ? Excellent info on the various OS mechanisms here: https://www.blackhat.com/docs/us-16/materials/us-16-Yason-Windows-10-Segment-Heap-Internals-wp.pdf

I don't think they have anything like that, at least not that I know of, I was talking about something much more basic. With AMD I know the driver manages the memory in segments the size of the registers such that these segments can be allocated and coalesced together, leaving as much free continuous memory with every buffer allocation. Fragmentation isn't a big problem in GPUs since buffers are just loaded and left into memory typically until the application ends.

With Nvidia, they don't disclose anything of the sort but I imagine they must have something similar that minimizes fragmentation.
 
Last edited:
I see no reason why VRAM can't end up fragmented too, just like main memory. Doubt that the GPU has a defragmenter. Doubt that it's an issue unless you craft a specific workload.

Your horizontal stripes are definitely not caused by this

@John Naylor Look up memory fragmentation

Vram fragmentation is a common problem on the typical user pc today, thanks to myriad chat, tools and browsers that all consume that video memory, this is more a problem on D3D12 and Vulkan(Till now) thanks to these renderers not supporting things like the concept of pageable video resources.
VRAM is RAM so fragmentation is meaningless. There is no platter that has to spin up and head that has move to another track to find the data.

This comment unfortunately demonstrates a great deal of knowing nothing about memory fragmentation.
 
thanks to these renderers not supporting things like the concept of pageable video resources
Good point. Does dwm have a mechanism to improve on that?
 
Good point. Does dwm have a mechanism to improve on that?

Nvidia has Pageable Device Local memory in its Vulkan client driver for Turing+ on Windows since 470 VBD, and Linux since 531 VBD, that will allow Device Local to succeed even when it appears full, without returning OOM.

DXGI is used for GPU resource information, but i'm not sure if D3D12 has a pageable resource implementation.
 
Just an update on this old post. Gaijin never returned with an answer to the support ticket.
After upgrading from RTX 2070s to RTX 4070 Ti the problem is no longer there. Maybe bad memory on the RTX 2070s, although the issue only occured in this particular game....
 
After upgrading from RTX 2070s to RTX 4070 Ti the problem is no longer there. Maybe bad memory on the RTX 2070s, although the issue only occured in this particular game....

On nvidia hardware, if you are basing your graphical resource allocations on assumptions instead of monitoring available memory, you can hit a case where your allocation fails and when it comes time to process and render the effect using those resources on screen, it can result in multicolour corruption, strobing, flickering, and well, this is my worst case in Serious Sam Fusion

unknown.png


I recently forced my old IvyE system to win 11 because there was a condition being hit that caused Explorer.exe to consume all vram anytime the DPI changed, from doing something like turning off the tv a few times during the week, the same thing would happen to Ryujinx as soon as it opened, didn't evne have to go beyond the game lister to see it.

Killing the worst vram using process, and the issue would subside
unknown.png


I initially investigated this as being faulty video memory or gpu, but eventually I linked it to the driver simply exceeding the available device local memory pool, and came to find it reported and a common occurence with the Cemu emulator, it just happened that my system habbits were heavier than the norm and consumed more vram than as typical.
 
Back
Top