Urgent.News

What's breaking now, across thousands of outlets.

Tech

Linux 7.3 improves performance when running out of vRAM

Article URL: https://pixelcluster.dev/VRAM-Overcommit/ Comments URL: https://news.ycombinator.com/item?id=49342719 Points: 260 # Comments: 83

Earlier this year, I wrote about improving VRAM management for games. After months of discussion on mailing lists, the kernel patches are now merged upstream and queued for the upcoming Linux 7.3 release. One sentence in my previous post stated that games should perform more stably as long as they don't use more VRAM than available. However, what if they do use more than available? Many people expect games to crash or perform terribly when this happens. But is this just an unavoidable fact, or can we mitigate the impact?

In theory, running out of VRAM should only cause performance issues, not stability problems. GPU drivers have supported overcommitting VRAM for as long as GPU drivers have existed. When the driver overcommits VRAM, you can request as much VRAM as you want, and the kernel will allocate as much as it can fit into the physical GPU memory.

The primary reason for poor performance when running out of VRAM is that memory needs to be evicted from VRAM and moved to CPU RAM. This is problematic because accessing CPU RAM is significantly slower than VRAM, and the PCI bus adds extra latency and bandwidth limitations.

The maximum bandwidth available when overcommitting VRAM depends on the GPU connection. With a PCIe 4.0x16 connection, you get around 32GiB/s of bandwidth. In theory, at a minimum framerate of 30 FPS (33.3ms per frame), the GPU can only access about 1.075.5MiB of data per frame. Accessing more than 1GiB of data from evicted memory in a single frame would make it impossible to maintain 30 FPS.

However, caching plays a crucial role in mitigating performance issues. When GPU accesses CPU memory, the high initial cost of fetching data over the PCI bus can be reduced by cache hits. If the buffer fits into a higher-level cache, access latencies are the same for memory backed by CPU RAM and VRAM. The latency difference between CPU memory and VRAM access can be minimized with cache hits, but the first access will still have higher latency.

Evicted memory may still cause slower performance, but some memory allocations can be accessed cache-friendly ways, minimizing the slowdown. If the GPU only accesses a small portion of evicted memory or reads only a small part of the allocation, the overall performance impact may be less severe. These variables make it challenging to predict the exact performance impact when memory is evicted.

Written by urgent.news from Hacker News Best's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Every outlet that reported this, and when →

Read the original at pixelcluster.dev →

More in Tech

AWS vs Azure vs GCP: stop comparing feature lists

Every "AWS vs Azure vs GCP" article is a feature table, and every feature table is useless, because all three can do essentially everything you need.

  • Feature comparisons are largely useless in choosing a cloud provider
  • Team's existing knowledge and comfort with a provider is crucial
  • Azure benefits Microsoft users, GCP excels for data/ML workloads

Vilnius-based LITILIT secures €8 million financing to make femtosecond laser systems scalable

LITILIT, a Vilnius-based company, has received an €8 million loan from the Lithuanian National Development Bank ILTE for the development of a femtosecond laser modular system (FEMODA) intended to…

  • Vilnius-based LITILIT secures €8 million financing from ILTE
  • €10 million project aims to develop scalable FEMODA laser system
  • Modular platform will expand femtosecond laser applications

More from Tuesday 18 August →