• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Graphic Card memory allocation/fragmentation

Joined
Jan 31, 2005
Messages
2,055 (0.29/day)
Location
Denmark
System Name Commercial towing vehicle "Nostromo"
Processor 5800X3D
Motherboard X570 Unify
Cooling EK-AIO 360
Memory 32 GB Fury 3666 MHz
Video Card(s) 4070 Ti Eagle
Storage SN850 NVMe 1TB + Renegade NVMe 2TB + 870 EVO 4TB
Display(s) 25" Legion Y25g-30
Case Lian Li LanCool 216 v2
Audio Device(s) Razer Blackshark v2 Hyperspeed
Power Supply HX1500i
Mouse Harpe Ace Aim Lab Edition
Keyboard Scope II 96 Wireless
Software Windows 11 23H2
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:
Joined
Mar 18, 2015
Messages
2,960 (0.88/day)
Location
Long Island
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.
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,081 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
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
 

AsRock

TPU addict
Joined
Jun 23, 2007
Messages
18,896 (3.06/day)
Location
UK\USA
Processor AMD 3900X \ AMD 7700X
Motherboard ASRock AM4 X570 Pro 4 \ ASUS X670Xe TUF
Cooling D15
Memory Patriot 2x16GB PVS432G320C6K \ G.Skill Flare X5 F5-6000J3238F 2x16GB
Video Card(s) eVga GTX1060 SSC \ XFX RX 6950XT RX-695XATBD9
Storage Sammy 860, MX500, Sabrent Rocket 4 Sammy Evo 980 \ 1xSabrent Rocket 4+, Sammy 2x990 Pro
Display(s) Samsung 1080P \ LG 43UN700
Case Fractal Design Pop Air 2x140mm fans from Torrent \ Fractal Design Torrent 2 SilverStone FHP141x2
Audio Device(s) Yamaha RX-V677 \ Yamaha CX-830+Yamaha MX-630 \Paradigm 7se MKII, Paradigm 5SE MK1 , Blue Yeti
Power Supply Seasonic Prime TX-750 \ Corsair RM1000X Shift
Mouse Steelseries Sensei wireless \ Steelseries Sensei wireless
Keyboard Logitech K120 \ Wooting Two HE
Benchmark Scores Meh benchmarks.
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.
 
Joined
Jan 31, 2005
Messages
2,055 (0.29/day)
Location
Denmark
System Name Commercial towing vehicle "Nostromo"
Processor 5800X3D
Motherboard X570 Unify
Cooling EK-AIO 360
Memory 32 GB Fury 3666 MHz
Video Card(s) 4070 Ti Eagle
Storage SN850 NVMe 1TB + Renegade NVMe 2TB + 870 EVO 4TB
Display(s) 25" Legion Y25g-30
Case Lian Li LanCool 216 v2
Audio Device(s) Razer Blackshark v2 Hyperspeed
Power Supply HX1500i
Mouse Harpe Ace Aim Lab Edition
Keyboard Scope II 96 Wireless
Software Windows 11 23H2
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:

AsRock

TPU addict
Joined
Jun 23, 2007
Messages
18,896 (3.06/day)
Location
UK\USA
Processor AMD 3900X \ AMD 7700X
Motherboard ASRock AM4 X570 Pro 4 \ ASUS X670Xe TUF
Cooling D15
Memory Patriot 2x16GB PVS432G320C6K \ G.Skill Flare X5 F5-6000J3238F 2x16GB
Video Card(s) eVga GTX1060 SSC \ XFX RX 6950XT RX-695XATBD9
Storage Sammy 860, MX500, Sabrent Rocket 4 Sammy Evo 980 \ 1xSabrent Rocket 4+, Sammy 2x990 Pro
Display(s) Samsung 1080P \ LG 43UN700
Case Fractal Design Pop Air 2x140mm fans from Torrent \ Fractal Design Torrent 2 SilverStone FHP141x2
Audio Device(s) Yamaha RX-V677 \ Yamaha CX-830+Yamaha MX-630 \Paradigm 7se MKII, Paradigm 5SE MK1 , Blue Yeti
Power Supply Seasonic Prime TX-750 \ Corsair RM1000X Shift
Mouse Steelseries Sensei wireless \ Steelseries Sensei wireless
Keyboard Logitech K120 \ Wooting Two HE
Benchmark Scores Meh benchmarks.
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.
 
Joined
Jan 31, 2005
Messages
2,055 (0.29/day)
Location
Denmark
System Name Commercial towing vehicle "Nostromo"
Processor 5800X3D
Motherboard X570 Unify
Cooling EK-AIO 360
Memory 32 GB Fury 3666 MHz
Video Card(s) 4070 Ti Eagle
Storage SN850 NVMe 1TB + Renegade NVMe 2TB + 870 EVO 4TB
Display(s) 25" Legion Y25g-30
Case Lian Li LanCool 216 v2
Audio Device(s) Razer Blackshark v2 Hyperspeed
Power Supply HX1500i
Mouse Harpe Ace Aim Lab Edition
Keyboard Scope II 96 Wireless
Software Windows 11 23H2
I have made a support case to Gaijin.... lets see what they have to say
 
Joined
Jan 8, 2017
Messages
9,033 (3.37/day)
System Name Good enough
Processor AMD Ryzen R9 7900 - Alphacool Eisblock XPX Aurora Edge
Motherboard ASRock B650 Pro RS
Cooling 2x 360mm NexXxoS ST30 X-Flow, 1x 360mm NexXxoS ST30, 1x 240mm NexXxoS ST30
Memory 32GB - FURY Beast RGB 5600 Mhz
Video Card(s) Sapphire RX 7900 XT - Alphacool Eisblock Aurora
Storage 1x Kingston KC3000 1TB 1x Kingston A2000 1TB, 1x Samsung 850 EVO 250GB , 1x Samsung 860 EVO 500GB
Display(s) LG UltraGear 32GN650-B + 4K Samsung TV
Case Phanteks NV7
Power Supply GPS-750C
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.
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,081 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
Joined
Jan 8, 2017
Messages
9,033 (3.37/day)
System Name Good enough
Processor AMD Ryzen R9 7900 - Alphacool Eisblock XPX Aurora Edge
Motherboard ASRock B650 Pro RS
Cooling 2x 360mm NexXxoS ST30 X-Flow, 1x 360mm NexXxoS ST30, 1x 240mm NexXxoS ST30
Memory 32GB - FURY Beast RGB 5600 Mhz
Video Card(s) Sapphire RX 7900 XT - Alphacool Eisblock Aurora
Storage 1x Kingston KC3000 1TB 1x Kingston A2000 1TB, 1x Samsung 850 EVO 250GB , 1x Samsung 860 EVO 500GB
Display(s) LG UltraGear 32GN650-B + 4K Samsung TV
Case Phanteks NV7
Power Supply GPS-750C
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:
Joined
Mar 11, 2019
Messages
296 (0.16/day)
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.
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,081 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
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?
 
Joined
Mar 11, 2019
Messages
296 (0.16/day)
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.
 
Joined
Jan 31, 2005
Messages
2,055 (0.29/day)
Location
Denmark
System Name Commercial towing vehicle "Nostromo"
Processor 5800X3D
Motherboard X570 Unify
Cooling EK-AIO 360
Memory 32 GB Fury 3666 MHz
Video Card(s) 4070 Ti Eagle
Storage SN850 NVMe 1TB + Renegade NVMe 2TB + 870 EVO 4TB
Display(s) 25" Legion Y25g-30
Case Lian Li LanCool 216 v2
Audio Device(s) Razer Blackshark v2 Hyperspeed
Power Supply HX1500i
Mouse Harpe Ace Aim Lab Edition
Keyboard Scope II 96 Wireless
Software Windows 11 23H2
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....
 
Joined
Mar 11, 2019
Messages
296 (0.16/day)
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



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


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.
 
Top