Electronics

Valve Engineer Improves Linux Memory Management for GPUs with 8 GB VRAM or Less

Valve Engineer Improves Linux Memory Management for GPUs with 8 GB VRAM or Less

Valve’s Linux developer, Natalie Vock, has introduced a new method for handling memory management on GPUs with 8 GB or less VRAM. Since a large part of the gaming community uses systems with limited resources, improving performance and VRAM allocation is an excellent way to maximize frames per second. According to Vock’s solution, GPUs with 8 GB of VRAM or less on Linux will now benefit from better background VRAM management, allowing more free space for games. Several Linux kernel patches have been submitted to guide how Linux manages resources when a game is loaded. Previously, when a game used too much VRAM on a low-VRAM GPU, the Linux Graphics Translation Table (GTT) would move data to system RAM to prevent the game from crashing. Since Linux doesn’t prioritize programs, it could sometimes move the actual game from VRAM to system RAM to make space for something like a browser or another third-party app.

In Vock’s testing before these new patches, running Cyberpunk 2077 resulted in the system using only 6 GB of the 8 GB of available GPU VRAM, with about 1.37 GB spilling over to GTT and being allocated in system RAM. This could lead to game stuttering and frame-pacing issues. Now, Vock has developed a real-time dmemcg-booster, which stands for Device Memory Control Groups, to inform Linux when a program running on the GPU VRAM needs to stay there without being moved to GTT and then to system RAM. With the new patch, running Cyberpunk 2077 now uses almost the entire available system VRAM, reaching 7.4 GB, while GTT allocation has been reduced to 650 MB, cutting usage by more than half. In the picture below, you can check the “GameThread” behavior before and after the patch is applied.

This patch comes just in time for Valve’s Steam Machine arrival, which also has 8 GB of GDDR6 memory as VRAM. Valve probably intended to make these enhancements for its own hardware found in the Steam Machine, Deck, and any future hardware releases. However, as there are millions of gamers using a GPU with 8 GB VRAM or less, everyone will get the added benefit. We still need to see more detailed performance testing, but the good thing is that many Linux distributions are already in the process of integrating these patches into their releases. Finally, the KDE desktop environment also received a patch to be aware of which window is in the front and active, so the system gets an idea of where to push the GPU VRAM.

Leave a Reply

Your email address will not be published. Required fields are marked *