Remix.run Logo
Use your Nvidia GPU's VRAM as swap space on Linux(github.com)
66 points by tanelpoder 2 hours ago | 15 comments
RachelF a minute ago | parent | next [-]

Nice idea, but something has gone very wrong here:

>Sequential throughput: ~1.3 GB/s

[on a RTX 3070 Laptop]

This RTX 3070 chip is on PCIe 4.0 x16 which should give 64GB/s. The 8GB of GDDR6 is 448GB/s.

Swapping to an NVMe drive would be twice as fast, but with higher latency.

yjftsjthsd-h an hour ago | parent | prev | next [-]

> Built for laptops with soldered memory and no upgrade path. If you have an RTX card sitting there with 8GB of VRAM and you're getting swapped to SSD, this puts that VRAM to work.

Well, that does at least answer my immediate question about why I would ever swap from expensive RAM to really expensive RAM:) Feels niche, but when you want it it's a good idea.

xfalcox 42 minutes ago | parent | prev | next [-]

Given my dev machine has 32GB of RAM and 32GB of VRAM that sits mostly idle when I'm not running AI models, this is not that bad of an idea.

willis936 13 minutes ago | parent | prev | next [-]

I'm more interested in the opposite. Nvidia linux drivers crash when you try to address more VRAM than you have. It'd be nice if they didn't.

SV_BubbleTime 3 minutes ago | parent [-]

They already do that on windows and it kinda sucks. If you are targeting something like LMStudio or ComfyUI, both of those have superior methods to do exactly this.

dragontamer 22 minutes ago | parent | prev | next [-]

Remember how 16GBs used to be an enterprise level database mainframe?

Well, GPUs also have stupid amounts of compute on them. I have to imagine that there is some kind of database format that's useful with GPU compute attached.

Since the data is already in VRAM, the GPU can sort, join, or otherwise manipulate data as needed.

hardwaresofton 20 minutes ago | parent | prev | next [-]

You want to waste VRAM, in this economy?

effnorwood 5 minutes ago | parent | prev | next [-]

use your car for an anchor on a big boat!

SV_BubbleTime 2 minutes ago | parent [-]

I mean, if you aren’t using the car while using the boat and it won’t really damage the car… yes?

jcmfernandes an hour ago | parent | prev | next [-]

Q: Why? A: Why not?

bobsmooth 5 minutes ago | parent | prev | next [-]

RAM disks have always fascinated me. In a different timeline every PC has a 100gb of RAM and 50TB HDDs are the norm.

simonask an hour ago | parent | prev [-]

I mean, cool, but I’d rather not?

margalabargala 39 minutes ago | parent | next [-]

So don't. Not everything is for you.

gchamonlive 39 minutes ago | parent | prev | next [-]

Wouldn't it be faster to swap to vram if you are sitting there with 8gigs of it unused than swapping to ssd and burning its write cycles, assuming you absolutely need swap

dspillett 43 minutes ago | parent | prev [-]

So, erm, don't?