Re:Use your Nvidia GPU's VRAM as swap space on Linux
by Phelinofist on Wednesday June 03, 2026 @03:38AM
(#48381066)
So can VRAM actually be used like regular RAM? E.g. if I have a 16GB module and my GPU has 16GB VRAM, could it be made so that my system reports 32GB RAM? What would be the implications of that?
[ Parent
| on HN ]
Re:Use your Nvidia GPU's VRAM as swap space on Linux
by tobyhinloopen on Wednesday June 03, 2026 @03:49AM
(#48381128)
It behaves like slower ram I assume, due to the increased distance from the CPU and overhead. Still, itβs much faster than normal SWAP which uses a disk or SSD.
How it is reported? As SWAP space, not as RAM.
Re:Use your Nvidia GPU's VRAM as swap space on Linux
by Tuna-Fish on Wednesday June 03, 2026 @03:47AM
(#48381118)
Typical desktop GPU ram does not support being write-back cached by the CPU. With PCIe resizable BAR, you could map the area into ram, so you could technically fit 32GB to memory, but it would have to be uncached (or write-combine cached), which would make it really, really slow.
There are a bunch of datacenter GPUs that support full cache coherency, but if you used them like that the VRAM would be very high latency from the CPU. So it would only be really slow.
Re:Use your Nvidia GPU's VRAM as swap space on Linux
by ChocolateGod on Wednesday June 03, 2026 @07:59AM
(#48382848)
I assume on Linux you could use something like daxctl to tell the kernel to treat the vRAM as normal RAM, but I think this would be Intel/AMD only.
Re:Use your Nvidia GPU's VRAM as swap space on Linux
by Tuna-Fish on Wednesday June 03, 2026 @08:59AM
(#48383411)
I don't think it would help. It's not just a software issue that can be fixed in the kernel, the hardware fundamentally isn't part of the cache coherency system of the CPU.
Re:Use your Nvidia GPU's VRAM as swap space on Linux
by tiberious726 on Wednesday June 03, 2026 @02:18PM
(#48387668)
This is correct, look at IBM's CAPI for an example of the needed hardware