Live data from Hacker News

Linux 7.3 improves performance when running out of vRAM

pixelcluster.dev

31–40 of 328 posts

Re: Linux 7.3 improves performance when running out of vRAM

#31

I'm mostly excited for the VRAM savings from apps and games which have loads of unused or super rarely used textures. Game developers often aren't super careful with this stuff, and there could be literal gigabytes of data which isn't used at all.

I worked on a PC/PS4/Xbox One game once. I wish I remembered more details, but at some point when looking at memory usage I found a 2048x2048 (or something like that) texture for something on a character. This texture was never anywhere near occupying the full screen. It got downsized once I told one of the artists, but I wouldn't be surprised if some games are inadvertently shipping with that kind of waste.

Re: Linux 7.3 improves performance when running out of vRAM

#32
post #11

Gosh, 7.2 literally just dropped with a bunch of awesome of performance/gaming related improvements (large folios, cache-aware scheduling, improved MGLRU reclaiming, Fair GPU Scheduler etc)... and I already can't wait for 7.3 to come out. Meanwhile in the Windows world, users hate updates... Like I genuinely can't think of a single instance that made users exclaim, "oh boy I just can't wait for the next Patch Tuesday…

[1] Linux 7.2 Reverts DRM Scheduler Change After Serious GPU Regressions: https://www.linuxjournal.com/content/linux-72-reverts-drm-sc...

Ah, didn't know that was reverted. Cheers for the link.

Re: Linux 7.3 improves performance when running out of vRAM

#33
post #10

Great article. I find that I learn something every time I read a post about linux kernel work. I guess an LRU with priority would handle VRAM for games pretty decently without going getting too application specific. What about VRAM to Disk specifically NVME, would direct to disk be feasible for large workloads, I know it is used for streaming in assets directly via. PCIE, but i wonder how the performance would be on…

> but i wonder how the performance would be on compute workloads running with NVME as a swap for GPU VRAM.

4x as slow in absolute best case, NVMe drives have 4 PCIe lanes usually

Re: Linux 7.3 improves performance when running out of vRAM

#35

I'm mostly excited for the VRAM savings from apps and games which have loads of unused or super rarely used textures. Game developers often aren't super careful with this stuff, and there could be literal gigabytes of data which isn't used at all.

I worked on a PC/PS4/Xbox One game once. I wish I remembered more details, but at some point when looking at memory usage I found a 2048x2048 (or something like that) texture for something on a character. This texture was never anywhere near occupying the full screen. It got downsized once I told one of the artists, but I wouldn't be surprised if some games are inadvertently shipping with that kind of waste.

The release version of City Skylines 2 had enormous issues due to this problem. Some tiny details, like a pile of wood behind a shed, had ridiculous amount of pixels. I do believe that should be pretty much fixed in that title nowadays, however.

Re: Linux 7.3 improves performance when running out of vRAM

#36
This post focuses on performance, but what about crashing due to apps seeing no RAM available to allocate once VRAM is filled up?

I remember having this problem when I used an NVIDIA 750 Ti with 2 GB of memory. Just opening a few Firefox or Ghostty terminals (both are GPU accelerated) would result in those apps crashing or not being able to render their contents. Sometimes the compositor would crash or become unstable too (kwin, niri, etc.). I had to reboot every few hours. Complete system instability.

This problem only happened with Wayland, when I switched to X windows these problems went away.

Since then I switched to an AMD RX 480 (8 GB) GPU and never had an issue here with Wayland, if GPU memory gets full, system memory gets seamlessly used instead. It felt like with the NVIDIA card, it never allocated back to system memory if no VRAM was available. This was only a problem on Linux since that same NVIDIA card was fine in Windows for 10+ years with zero issues related to instability around VRAM allocation.

Tons of people reported the same issue on Linux on NVIDIA's forums for years.

I wrote a lot more details and recorded demo videos around 9 months ago here https://nickjanetakis.com/blog/gpu-memory-allocation-bugs-wi..., but since then a lot of these things have been resolved from switching over to AMD.

Re: Linux 7.3 improves performance when running out of vRAM

#37
post #30
post #24

Earlier quoted context omitted.

Sure. The Insider blog tends to be pretty up-to-date: https://blogs.windows.com/windows-insider/ They seem to be focused on performance improvements because of the MacBook Neo pressure and RAM crisis, but right now, I'm mostly excited for the right-click menu and taskbar improvements. You can already do this with third-party software, but it's not the best experience unfortunately.

Are they finally going to fix the issue of having introduced a second right click menu that forces me to click “show more options” literally every single time I want to do anything?

Run (as Administrator) in a terminal

  reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
Should restore the old right click menu (it did last time I used it at any rate).

So much of windows 11 configuration is removing things you never asked for and putting things back.

Source: https://learn.microsoft.com/en-us/answers/questions/2287432/...

Re: Linux 7.3 improves performance when running out of vRAM

#38
post #16

Earlier quoted context omitted.

Didn't we eagerly await on updates in the good old days of Windows?

Fair point, the old school service packs and hotfix rollups were cool. But I think that sort of enthusiasm towards updates ended with XP, at least it did for me, because I switched to Linux permanently after Windows 7 came out.

XP was indeed when I stopped caring about Windows updates, SP2 was a huge deal - after that they where either "eh" or actively things I didn't want.

To be honest I think the reason I stopped care was more that I started using Linux as an OS in the 90's and over time more and more of my computing life was on Linux (except gaming) so by 2004 (or a little earlier) Windows was just for games.

Re: Linux 7.3 improves performance when running out of vRAM

#40

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

Me too, but you can improve the behavior yourself too. It's been an issue with desktop linux and the default settings for a long time. You could maybe tune OOM killer settings, but another option is to use a package like earlyoom: https://man.archlinux.org/man/earlyoom.1.en
Post reply on HN