What happens when VRAM is full?
Asked Answered
E

1

7

I want to know the current nvidia/AMD implementation of handling VRAM resource allocation.

We already know that operating systems use swap/virtual memory when system RAM is full, then what is the equivalent of swap when it comes to VRAM? Do they fall back to system RAM or hard disk?

I thought that falling back to system RAM is rational, but from my experience video games lag horribly(1/20 of typical FPS) when they are out of video memory space, that made me doubt that they are using system RAM because I think system RAM is not that slow to make the game lag so much.

In short I would like to know what the current implementations are and what is the biggest bottleneck that causes the game to lag under out-of-memory situations.

Embow answered 25/4, 2015 at 12:25 Comment(1)
have retaged your question (as I see it should) so check it/repair if you do not agreeCrafty
C
5
  1. the swapping is really done to RAM

    if there is enough RAM to swap to. Swapping to file is unusable due to slow speed see next bullet

  2. The RAM it self is not that slow (still slower) but the buses connected to it are

    while swapping system memory to swap file the memory swap occur when needed (change focus of application,open new file/table,...) this is not that frequent but if you are out of VRAM then you are in trouble because usually most of gfx data is used in each frame.

    This leads to swapping per frame so you need to copy usually very large data blocks very often for example swapping 256MB 20fps leads to:

    256M x 2 x 20 = 10 GB/s read
    256M x 2 x 20 = 10 GB/s write
    

    which is 20GB/s bandwidth needed of coarse depending on the memory controller and architecture You can do read/write simultaneously up to a point so you can get close to 10GB/s in total theoretically but still that is huge number for only 256MB chunk of data look here:

    My setup at that time has memory write only around 5GB/s which is nowhere near the needed memory transfer rate needed for such task

Crafty answered 27/4, 2015 at 7:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.