Steam Proposes Linux Kernel Changes To Improve Multi-Threaded Games

Steam's CPU test. Credit: SteamSteam’s CPU test. Credit: SteamSteam announced this week that it released the first build of Proton 4.11, which is based on WINE 4.11, the Linux utility that allows thousands of Windows games to run on Linux. The new version includes many bug fixes, as well as a new Vulkan-based implementation of Direct3D 9. Additionally, the new release includes functionality that could reduce the CPU overhead for multi-threaded games if Linux kernel developers adopt Steam’s proposed changes to the kernel.

The Steam developers said they forced “a CPU-bound scenario on a high-end machine by reducing graphics details to a minimum” to see the difference between the existing version of Proton and one that included the multi-threading improvement. We can see in the image above that the CPU load decreased by at least 10% in the Tomb Raider game. The developers expect the results to be reproducible on lower-end machines, too.

The new release also includes an experimental replacement for esync, an older WINE feature that could increase the multi-threaded performance for some games. However, according to the Steam developers, this feature comes with some major trade-offs, such as relying on the Linux kernel’s eventfd() functionality. The use of eventfd() can cause some file descriptor exhaustion on event-hungry applications and can result in extraneous spinning in the kernel. 

The Steam team then came up with some changes to the Linux kernel to extend the futex() system call to expose additional core functionality that could be used to support optimal thread pool synchronization. 

Proton 4.11 already includes the fsync() patches that will replace the older esync and take advantage of the new functionality, once the changes to the Linux kernel are made. In the meantime, the Steam team will continue to test its solution on Ubuntu and Arch Linux distributions with custom kernels that contain the above-mentioned patches.