VOOZH about

URL: https://www.phoronix.com/news/Mesa-Single-File-Cache-Issue

⇱ Mesa Falling Back To Its Multi-File Cache Due To Performance Reasons - Phoronix


👁 Phoronix

Mesa Falling Back To Its Multi-File Cache Due To Performance Reasons

Written by Michael Larabel in Mesa on 24 April 2025 at 06:08 AM EDT. 16 Comments
Mesa has supported on-disk shader cache for years to help speed-up game load times and overall system efficiencies. They had shifted from a multi-file cache layout to a single file cache for greater space savings. Steam also added support for the single-file cache. But now upstream Mesa is shifting back from the single-file cache default to the multi-file cache over performance issues.

Dmitry Osipenko made the change to re-enable the multi-file cache by default. The multi-file cache causes greater disk usage than the single-file cache, but performance issues have been coming up when the single-file cache is rather full.

The MESA_DISK_CACHE_DATABASE=1 can be used to activate the Mesa-DB single file on-disk shader cache for those preferring it, but the default is back with the multi-file cache layout.

In the merge request now merged to Mesa Git it's summed up as:
"Over past months a performance issue was found with the Mesa-DB cache implementation that results in a too slow cache startup time when cache is full. A better indexing strategy will need to be invented to mitigate the issue. Until then, let's default back to the multi-file cache."

So for now, back with the multi-file cache which is still better than no cache at all.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.