Just a side note for anyone joining this thread. This is a heavily modded server that is operating my CPU optimization code. The mod is named BrainZ and is publicly available for free.
This game provides harmony support by default which can be used to modify the game code on the server side. I have been modifying the assembly-csharp.dll game code for around 4+ years now
Experimentation has been done for years with various builds throughout alpha 18, 19, 20, 21 and now 1.0 release. The optimizations utilize multi core design along with improvements to data orientation, ram allocations, general stability and some improvements to sections of the base game code located in the assembly-csharp.dll that I have injected over.
The mod is currently running on multiple servers with the same results showing improved general performance, stability and capacity. Take note, the screenshot does come from a very high end performance server so it will not be a consistent reflection of potential but the mod has improved every single server it has been attempted on which is now over 20 through the various years. This includes but is not limited to the largest servers many have played on. There is a very high probability many of you have been playing with these optimization running when you joined large servers in the past. The reason many of these servers were able to handle the player capacity was due to this optimizer we have been running quietly.
As someone else stated, stability over 20 fps in the base game can create instability. Utilizing the optimization mod allows you to run the server longer than the base game with less problems or the need for restart. An issue in ram allocation and stack management is that data will eventually create holes that become harder and harder to fill as a server continues to operate. This is from data entering and exiting the ram allocations. Typically a load screen allows for a game to clean up the ram but we don't have a load screen. All servers will eventually have to restart but the ram allocations are important in reducing the time it can remain stable. Reducing these allocations prevents garbage build up and the need for restart. To anyone that is not familiar with programming, garbage is an actual term in programming. I am not slandering their code. Many games have what is called a garbage collector that helps clean unused ram allocations. Developers can specify how long specific data stays in ram depending on the conditions of the game or let it automatically clean itself based on data utilization.
Unity has a system called IJob which is designed to avoid ram allocations entirely and allow burst compiler functionality. I am utilizing the IJob system to improve one portion of the game code that tracks the closest player to the target entity. I was able to reduce the runtime by half of this one section of code.
Overall my optimized code reduces the ram allocations by cleaning up some of the most common code that is run each update frame. Especially within the entity update process. This in turn helps reduce garbage build up inside the garbage collector and helps avoid the bloat it creates. This in turn means you can operate longer without the need for a restart to clean up the ram allocations.
I will keep developing this mod in parallel to the main games development. I am not from the dev team, I dont want any confusion. This is a third party modification to the games base code that helps to utilize your cpu more efficiently while adding some improvements to the games base code function.