Jump to content

Understanding VRAM and its usage, real usage compared to VRAM allocation

ExTeR

Hi all!

 

Is there any video where the real usage of VRAM is used by the games? All the videos I can see have allocated vram, which typically matches a % of the total VRAM from the graphics card.

 

As NVIDIA graphics have 8/10 GB of ram (3070 and 3080) and AMD has 16 GB I was wondering to check real usage and what happens if the game needs more than the VRAM on the graphics card.

 

Thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

You can't measure the actual used RAM unless you have access to the debug tooling of the engine used. Usually GPU stuff make use of arena allocators, meaning that they reserve the max memory then can in order to avoid having to allocate and deallocate blocks (which is somewhat costly on GPUs).

 

Here's an example of me allocating VRAM to use as a "ramdisk", but not actually using everything on it. The OS has no way to know if that requested vram is actually being used or not.

 

9 minutes ago, ExTeR said:

what happens if the game needs more than the VRAM on the graphics card.

It'll try to swap stuff from/to system RAM, and even disk if your ram is also full. If you actually try to allocate more memory than the GPU can handle at once, it'll just throw an exception and crash your application.

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to comment
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

×