The short answer
Remove badly optimised plugins first, because they cost more than everything else combined.
Then set batching.colliders "0", cap fps.max between 30 and 100,
raise server.saveinterval "600", and consider nav_disable "true"
and ai.think 0 if you can live without animal movement.
Key points
- Rust needs clock speed, not core count. Unity's core functions are single threaded.
- One badly coded plugin can undo every other optimisation on this page.
- Server FPS is not player FPS. They are different numbers measuring different things.
- Measure with the Performance Monitor plugin, then remove it. It costs performance too.
- Every convar here is a trade. Know what you are giving up before you set it.
What actually affects performance
Consistent performance is what reassures your players that they have a safe place to play, where they will not lose a fight to lag or rubber-band off a cliff edge. It is worth being precise about where it comes from, because time spent on the wrong thing is wasted.
Roughly in order of impact:
- Plugins. A single poorly written one can dominate every server tick.
- CPU clock speed. The ceiling everything else operates under.
- Entity count. Late in a wipe cycle, this is what changes underneath you.
- Save operations. On a large world, noticeable every time they run.
Hardware: clock speed over core count
You will see dramatically better server performance from providers using faster CPUs clocked upwards of 3GHz. The reason is architectural rather than incidental: Unity core functions are single threaded, so they run on one core and cannot be spread across others. A 32 core CPU at 2.2GHz will run a Rust server worse than an 8 core at 4GHz.
Core count is not irrelevant. Things like NPC and animal AI, and other map-related objects, can be spread across multiple cores, which is why higher population servers genuinely benefit from extra cores. A good host should offer the option of more cores for a bigger server, and should be hosting Rust on high frequency CPUs in the first place.
This is the single most useful thing to check before you buy. If a host advertises core count and RAM but not clock speed, that is usually because the clock speed is not the selling point.
Plugins: the biggest single factor
uMod is a Rust modding addon that lets servers run plugins developed mostly by the community. Server performance will not be impacted by well written, actively maintained plugins.
It will be destroyed by a bad one. Without your awareness, a small piece of code in any of your plugins could severely degrade your server's performance, and there is nothing about a plugin's size or apparent simplicity that tells you which. Even the smallest, lightest looking plugin can cause chaos, as any experienced Rust server owner or plugin developer will confirm.
Avoid running too many plugins. The count itself has a cost, quite apart from the quality of any individual one, and the answer to a problem is more often removing a plugin than adding one.
Optimising the plugins you keep
Some plugins expose performance-tuning settings such as timers and intervals. These are usually off by default or set conservatively. Look in the plugin's configuration file and enable them, because a plugin polling every tick when it could poll every thirty seconds is doing thirty times more work than it needs to.
Measuring before you change anything
Guessing at performance problems wastes time. There are two measurements worth taking.
Server FPS
This is the frame rate the server is operating at. It has no direct influence on
your players' frame rates, though high entity counts in one area will affect both.
Monitor it over RCON with the FPS command.
The Performance Monitor plugin
The Performance Monitor for uMod reports real-time information on memory usage, plugin hook time and other timings that affect server performance. It will show you which plugin is consuming the most time on a single hook, which turns "the server feels bad" into a name.
Do not leave the Performance Monitor running indefinitely. The monitoring itself consumes resources and will worsen the performance you are trying to measure. Install it, take your readings, act on them, then unload it.
The convars that matter
Each of these is a trade rather than free performance. The gains are real, and so are the things you give up.
batching.colliders "0"
Removes the need for the server to batch entities. This is a large performance gain: with batching enabled, every time someone builds, the server has to unbatch and then rebatch all related entities.
The caveat: if your server goes over 265,000 entities you will need to re-enable it to work around the Unity entity limit. Late in a long wipe cycle on a busy server, that is a real number rather than a theoretical one, so it is worth keeping an eye on.
nav_disable "true"
Disables the NAV mesh on your server. The performance gain is large. The cost is that animals and NPCs stop moving entirely.
Whether that is acceptable depends on your server. On a heavily PvP-focused server where nobody is hunting deer, it is close to free. On a PvE or roleplay server, it removes a meaningful part of the game.
ai.think 0
You may have noticed on large servers that animals do not react or fight back. That is
ai.think set to 0. It has a significant positive effect on performance,
particularly when player numbers are high and players are frequently close to animals.
server.saveinterval "600"
You may see server-side FPS drops when the server saves on a high entity server. Increasing the duration between saves keeps that to a minimum.
The trade here is risk: a longer interval means more progress lost if the server crashes between saves. 600 seconds is a reasonable balance, but if your server is unstable for other reasons, do not fix the symptom by making the crashes more expensive.
fps.max
Controlling your server's FPS is a good idea generally, to stop the server working harder
than it needs to at no benefit to your players. Facepunch have said players would not notice
a server limited to 30 frames per second. Setting fps.max to a number between
30 and 100 is strongly advised.
Restarts
Daily restarts can help performance on modded servers. Long-running processes accumulate memory pressure, and plugins that leak slowly are common enough that a scheduled restart is a reasonable insurance policy.
Schedule them at a quiet hour and announce them. global.restart gives players a
300 second warning at 5 second intervals, which is enough time to get somewhere safe. A
silent restart mid-raid will lose you more players than the performance gain wins you.
What to do, in order
-
Measure first
Check server FPS over RCON and run the Performance Monitor briefly. Without a baseline you cannot tell whether anything you did helped.
-
Remove the worst plugin
Whatever the monitor named. This is almost always the single biggest win available, and it is free.
-
Tune the plugins you keep
Timers and intervals in their config files, where they exist.
-
Apply the convars
Start with
batching.colliders "0",fps.maxandserver.saveinterval, which cost you nothing your players will notice. Considernav_disableandai.thinkonly if you can accept static wildlife. -
Measure again
Same tools, same conditions, ideally at a similar player count. Then unload the monitor.
-
Look at the hardware
If you have done all of the above and performance is still poor, the ceiling is the CPU, and no amount of configuration gets past it.
If you are at that last step, our guide on what to look for when buying a Rust server covers what to ask a host before you move.