Meta recently shared at the Linux Plumbers conference that,When Meta was looking for a more efficient CPU scheduler for Facebook's large data centers, it ultimately chose the CPU scheduler developed for Steam Deck.The CPU scheduler is a key component in a computer system that determines which programs will run on which CPU cores and when.
Since Linux systems are widely used in various devices from mobile phones to servers, its default CPU scheduler design is relatively conservative and difficult to meet the low-latency requirements under high load.
Meta tested a variety of enterprise Linux distributions while looking for a better scheduler for its data centers, but ultimately found its answer in the gaming space.
Meta engineers David Dai and Ran Newton revealed that Facebook's server cluster is currently deploying a scheduler called "SCX-LAVD" on a large scale.
This scheduler was originally developed by Igalia commissioned by Valve to solve the problems of frame loss, stuttering and input lag that may occur when Steam Deck is running AAA masterpieces.
Its core advantage lies in its dynamic task management. By continuously observing the behavior of tasks, it automatically estimates which tasks are more sensitive to delays and assigns earlier "virtual deadlines" to these tasks to ensure that they can run in time even when the system is busy.
After many actual tests, Meta found that this pursuit of "extremely low latency" characteristics is unexpectedly highly consistent with the needs of managing Facebook's massive web requests, back-end messages and caching services.
Meta finally transplanted this "game-specific" scheduler to the server side, optimized it for the server's multi-core, multi-level cache topology, and added its own business logic.
