In this article, we will review the topic of server performance and how it relates to operation of a Rust server. Consistent, good performance will help your server by reassuring your players that they have a safe place to play without the risk of losing fights to lag, or rubber-banding off of a cliff.
There is much to consider when it comes to server performance.
That which comes up the most often is undeniably server hardware, and is commonly what players and server owners alike suspect to be the problem whenever they start to encounter lag issues. In some cases, this is true, but a lot of the time, there are other underlying issues at fault. At Host Havoc, we use high performing hardware with flash storage (SSD / NVMe).
Facepunch is constantly adding new content to the game, which in part is what makes Rust so great. Unfortunately, we sometimes see patches released that will temporarily diminish server performance until things can be further optimized down the road.
It is important that your server is hosted on a reliable, low-latency network with DDoS protection in place to ensure optimal performance and server uptime. Host Havoc's Rust Server Hosting is served out of top-tier data centers and backed by superior DDoS protection.
Entities (and colliders)
The more entities on your map, the lower your server's performance will be. An entity is any object that exists in the game world - this includes base structures, furnaces, ores, sleeping bags, code locks, vehicles, etc. There is no entity limit, but there is a collider limit.
uMod is a modding implementation for Rust that enables servers to run community-developed plugins. Generally speaking, well-written and maintained plugins will not diminish Rust server performance. A small block of code in any one of your plugins can completely destroy your server's performance without you even knowing. It is imperative that you only use plugins that you know to be performance-friendly. Even the most lightweight, simple plugins can cause performance problems for your server.
As a server owner, there is much we can do to assess and monitor our server's performance.
This is the rate at which your server is running - it does not have an impact on your players' frame rates (but high entity counts in one area would, for example). You can poll the server's FPS using the fps command via RCON.
By default, time warnings are not reported to the console. We can enable this using the global.timewarning 1 setting; this can be enabled dynamically while the server is running by using RCON. Anything over 2 seconds is an indication of a problem.
Performance Monitor Plugin
Performance Monitor for uMod is a plugin for rust that gives you real-time data abou your server's memory usage, plugin hook time and other timings that have an impact on server performance. Do consider using it to identify performance-degrading plugins by identifying which are consuming the most time on hooks. Do not leave this plugin active indefinitely as it may further hinder performance.
Optimizing the Server
The biggest improvement for most server owners will come from removal of poorly optimized/resource-consuming plugins. Any experienced Rust server owner or plugin developer will tell you, a plugin that is seemingly lightweight can completely destroy your server's performance if it is written poorly. Through the use of our best judgement and tools like Performance Monitor (see previous section), we can clean up our plugin list. Remember, the more plugins you have, the more of a performance overhead your server is going to have. This, of course, compounds with player counts.
Some plugins have performance-tuning settings such as timers and intervals.
Limiting server FPS
It is generally a good idea to limit your server's FPS as to not make it work harder than it needs to (at no benefit to your players). Facepunch has said that you can cap your server at 30 FPS and your players would not know the difference. We recommend setting fps.max to a value anywhere between 30 and 100.
Disabling AI movement
You may notice that on large servers that you've played on, animals do not move/fight back. This is because ai.think has been set to 0. This appears to have a notable impact on server performance, particularly when the player count is high and players are consistently in proximity of animals.
Increase the server save interval
Adjusting server.saveinterval to be of a higher value will reduce the frequency of saves, which will help if you have a large save file and experience a stutter. Although we run our servers with SSD/NVMe storage, an extremely large save file will be prone to stutters.
Adjusting these settings to result in faster decay will undeniably increase your server's performance by reducing the amount of unused entities (bases) on the map.
Sometimes, daily restarts for modded servers can help with server performance.