1

Integrated GPUs (iGPUs) use the system RAM to store GPU VRAM. How to know VRAM usage of iGPU? explains usage of GPU-specific tools to monitor the amount of VRAM, but I'm interested in whether the corresponding amount of RAM usage appears for iGPUs (and would not appear for discrete GPUs because it's stored in a physical VRAM separate from the main memory).

For example, if my process allocated a 512MB chunk of VRAM:

  • Do standard linux memory statistics (such as the ones shown by the htop or free which show nothing about GPUs AFAIK) show this as part of the amount of RAM allocated by processes?

  • Or is this counted globally somewhere else in the system RAM usage?

  • Or does it effectively "disappear" from the system, meaning that the total amount of usable RAM (reported by free) would be variable?

2
  • IIRC there was at least a time that with at least iGPU and/or driver from a certain vendor (well Intel), the memory set to be reserved for video in BIOS/UEFI settings will "disappear" from the system, and that with the driver the iGPU won't even be able to make good/full use of it. It is hence called "stolen memory". I don't know if either has changed though. As for the memory (dynamically?) allocated by/through the driver, AFAIR it won't "disappear" (it would be quite insane if it will, I think), and can be observed in one of the fields in free or so. Commented Nov 5, 2024 at 21:13
  • But hey, there was at least a time on at least some OS (meh Windows) display cards could use system memory too! (NVIDIA TurboCache, no?) Commented Nov 5, 2024 at 21:14

1 Answer 1

0

show this as part of the amount of RAM allocated by processes?

No.

Or is this counted globally somewhere else in the system RAM usage?

Read on.

Or does it effectively "disappear" from the system, meaning that the total amount of usable RAM (reported by free) would be variable?

Yes.

If you run top/htop/free you will simply notice that the amount of free/available RAM has decreased but there will be no processes with this amount of RAM (VRAM) taken. Free/Available RAM simply "disappears".


Is RAM-backed VRAM from an iGPU counted in regular linux memory statistics?

Yes and no. Regular Linux memory statistics includes processes memory mappings and filesystem buffer/cache. Applications allocating VRAM simply "eat" free/available RAM but they don't show up as RAM consumers.

3
  • I think by disappear he meant whether e.g. the value under the column Total (instead of just free/available) in free would be constantly changing as the iGPU/driver allocates (and releases) memory. Commented Nov 6, 2024 at 9:19
  • Total doesn't change. Commented Nov 6, 2024 at 10:00
  • Thanks, that confirms something I've long suspected, I'll accept the answer! (Tangentially: I'm particularly curious about how Linux handles contention between VRAM and RAM for iGPUs ; in low memory conditions having a separate subsystem invisibly compete for memory sounds like a recipe for disaster.) Commented Nov 7, 2024 at 21:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.