Menu

1 / 5

I Turned My Laptop's Idle 6GB of VRAM Into Swap and It Stopped Crawling at 90% RAM

DEV Community: opensource·Usman Khan·14 days ago
#lnCKrias
#devtoopensource#devto#dev#vram#swap
Reading 0:00
15s threshold

Two IDEs, Chrome with too many tabs, and Steam updating a game in the background. That's a normal afternoon on my Lenovo LOQ, and it's exactly when the laptop starts to feel like it's wading through mud. The RAM meter sits at 90%. Clicking a tab takes a second. Switching back to the IDE takes three.

Nothing crashes. It just gets slow, and then slower.

The machine has 16 GB of RAM, one SODIMM, and an RTX 3050 with 6 GB of its own memory. That GPU memory was doing almost nothing. On this laptop the screen is driven by the Intel GPU, so unless I start a game, the NVIDIA card sits there holding a few hundred megabytes and waiting.

So I built USM , which makes that idle VRAM the first place Linux swaps to. The code is on GitHub , MIT licensed, in beta.

Why 90% Full Feels So Bad

Linux doesn't wait for RAM to hit 100%. Somewhere around 90% it starts swapping, moving memory pages nobody touched lately out to the disk.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.