I’m administrating a Rust server and encountering an issue with uneven CPU load distribution. The main load falls on 2–8 cores, while others are barely utilized.
Is it possible to configure Rust Server to fully utilize all CPU cores
1. No.
2. No.
3. Just about all of the optimisation you can do is in choosing your plugins wisely. If you have poor performance it's almost always caused by a bad plugin(s).
Rustserver uses all available cores during the startup phase but only one core for the game once up and running. It may occasionally use a 2nd core for peripheral stuff like networking but I'm not sure about that. In any case, your extra cores will stay idle and there's nothing you can do about it.
Rust’s game server primarily runs on a single thread due to the way Unity’s engine is designed. Unity has a historically single-threaded architecture, meaning that most of its core systems—such as physics, AI, and game logic—are executed on the main thread. This is a fundamental limitation of Unity’s design, as the engine does not natively support multithreading for these key processes.
Another key factor is RakNet, the networking library that Rust originally used.
RakNet, which was acquired by Oculus (Facebook) in 2014 and later discontinued, was a single-threaded networking solution. Since Rust’s networking stack was originally built on RakNet, it inherited these limitations. While Rust later moved away from RakNet in favor of a custom networking solution, the game’s architecture had already been designed around a single-threaded model, making it difficult to fully transition to a multithreaded system without major rewrites.
Why Rust’s Server is Mostly Single-Threaded
1. Unity’s Main Thread Dependency
In Unity, most engine components—such as physics calculations, game object updates, and AI—must run on the main thread. Even though rendering is not relevant for a dedicated server, the core simulation loop still depends on Unity’s architecture, keeping the server primarily single-threaded.
2. Limited Multithreading in Unity
Although Unity has introduced tools like the Job System and DOTS (Data-Oriented Technology Stack) for multithreading, Rust was built before these features were mature. Rewriting the server to fully leverage these newer multithreading capabilities would require extensive refactoring of legacy code.
3. Networking and I/O Can Be Multithreaded
Some operations, such as networking, database access, and world streaming, can be offloaded to separate threads. However, the core simulation loop—including entity updates, combat calculations, and physics—must still run on Unity’s main thread due to engine constraints.
4. Legacy Code and Performance Bottlenecks
Rust has been in development since 2013, and its codebase has evolved around Unity’s limitations. Overhauling the entire server to support true multithreading would be a massive undertaking, likely requiring a transition to a different engine or a complete rewrite of core systems.
The reason Rust’s game server runs mostly on one thread is due to a combination of Unity’s single-threaded architecture and legacy design choices from when the game was built. While some aspects, such as networking and I/O, can use multiple threads, the main game logic remains single-threaded because of Unity’s inherent limitations. Although Unity has since introduced multithreading capabilities, Rust’s server would require significant rewrites to take full advantage of them.