Pending RADV Driver Change Leads To Much Lower System RAM Use For Some Games
A pending change to the Mesa Radeon Vulkan driver "RADV" is leading to much lower system RAM use for some games that make use of many Vulkan Graphics Pipeline Libraries (GPL). The game causing this issue to be investigated was Valve's Dota 2 on RADV and is now seeing an 85% reduction in system RAM use by this open-source Radeon Linux driver.
Prominent Valve Linux graphics driver developer Mike Blumenkrantz blogged about the recent adventure in working on this Dota 2 issue that was causing excessive system memory use with RADV. He was seeing 3GB+ memory use by the RADV driver in the system RAM while running Dota 2... It was then realized to be from the RADV Graphics Pipeline Library (GPL) support being enabled, which is likely to be the default with next quarter's Mesa 23.1 release.
Samuel Pitoiset also of Valve's Linux GPU driver team then tracked down the issue, as noted on Mike's blog and in turn the change under review led to an 85% reduction in system RAM use.
The change is to use serialized NIR for graphics libraries with the RETAIN flag. Pitoiset explained in the commit:
This RADV driver change is now working its way to Mesa for what will be a very exciting Mesa 23.1 release next quarter with tons of graphics driver improvements in store.
Prominent Valve Linux graphics driver developer Mike Blumenkrantz blogged about the recent adventure in working on this Dota 2 issue that was causing excessive system memory use with RADV. He was seeing 3GB+ memory use by the RADV driver in the system RAM while running Dota 2... It was then realized to be from the RADV Graphics Pipeline Library (GPL) support being enabled, which is likely to be the default with next quarter's Mesa 23.1 release.
Samuel Pitoiset also of Valve's Linux GPU driver team then tracked down the issue, as noted on Mike's blog and in turn the change under review led to an 85% reduction in system RAM use.
The change is to use serialized NIR for graphics libraries with the RETAIN flag. Pitoiset explained in the commit:
"Cloning NIR shaders consumes too much RAM and this can easily explode in memory for games that create a ton of graphics libraries. Using serialized NIR shaders help considerably.
This reduces RAM usage in dota2 with GPL from 3GiB to 400MiB."
This RADV driver change is now working its way to Mesa for what will be a very exciting Mesa 23.1 release next quarter with tons of graphics driver improvements in store.
26 Comments