How did the popular shooter game VALORANT reduce server-side processing time from 50 milliseconds to less than 2 milliseconds?

Developing online games requires attention to both the client and server sides, and in particular in shooter games where a difference of a few milliseconds can make a difference in the outcome of a game, thorough optimization, including on the server, is necessary. The developer blog for the popular shooter game
VALORANT's 128-Tick Servers | Riot Games Technology
https://technology.riotgames.com/news/valorants-128-tick-servers
VALORANT is designed to process 128 operations per second on the server side. If each server core processes one match, the time allotted for each operation is 7.8 milliseconds. However, from a cost perspective, it is necessary to process as many matches as possible per core. In the end, it was decided to process three matches per core, which meant that the time allotted for each operation in each match was just 2.6 milliseconds.

In the early stages of VALORANT's development, each transaction took 50 milliseconds. The development team divided the game's code into 10 categories: Replication, FoW, Network, Animation, Gameplay, Movement, Equippable, Character, Physics, and Other. By measuring the processing time for each category, they were able to identify the areas causing the increase in processing time.
The graph below shows the processing time by category, with the horizontal axis representing the build number and the vertical axis representing the processing time. Looking at the graph, we can see that the Replication (orange) processing time increased significantly due to changes implemented between build 445887 and build 446832. Categorizing the code in this way makes it easier to identify problem areas.

The table below compares the processing times for various categories after optimization (Final Conc.) and as of May 28, 2018. We can see that the processing time for the Replication category, which took 4.54 milliseconds, has been reduced to 0.4505 milliseconds.

The Replication category includes processes that synchronize data between the client and server, such as 'when a player's health decreases, the server also decreases the health.' The development process used a feature called '
VALORANT also uses various other techniques to reduce processing time. For example, in the early stages of development, the same animations were processed on the client side and the server side, but processing time was reduced by devising measures such as 'pausing server-side animation processing during purchase phases such as purchasing weapons.'

Additionally, the development team worked with Intel to conduct CPU-level analysis and optimize performance. The graph below shows the number of instances running simultaneously on the horizontal axis, and the processing time on the vertical axis. In the early stages of development, processing time increased as the number of instances increased. This will become a major problem once the game is released, as a large number of instances will be running simultaneously.

The diagram below shows a simplified view of how a server's CPU accesses cache memory and system memory. As you can see, L1 and L2 caches are assigned to each core separately, while L3 cache is shared by multiple cores.

As a result of the analysis conducted by the development team in collaboration with Intel, it was discovered that the processing speed was slowed down due to the 'mechanism (inclusive cache) that copies the contents of the L2 cache to the L3 cache' adopted in the server CPU 'Intel Xeon E5' series. As a result of switching to a new Xeon platform that does not use inclusive cache, performance was improved by about 30% even at the same clock frequency.
The development team also worked on CPU and OS-level optimizations, which helped reduce the server-side processing time for VALORANT to less than 2 milliseconds.
Based on these findings, the development team emphasized the importance of measurement in game optimization, saying, 'Even for the same application, the performance needs may change significantly a year from now. The only sure way is to create reproducible tests and measure them. For example, if you implement a 'processing time reduction method' you learned about in an online blog post without taking into account the needs and special considerations of your application, it may actually decrease performance rather than improve it.'
Related Posts:







