How to Fix Rust Server Lag: Plugins, Entity Counts and Server Performance

Which framework does your server run?The plugin and profiling commands on this page change to match.

Fix the lag at its source.

When doors open late, players rubber-band and loot takes a second to appear, your server is falling behind. Almost every case comes down to four things: plugins doing too much work, too many entities, a map that’s heavier than your hardware, or a server that has been up too long. This guide shows you how to measure each one and fix the right thing first.

Server lag or player lag? If only one or two players complain, it’s usually their PC (low client FPS) or their connection (high ping). If everyone feels it at the same moment, it’s the server. This guide is about the second case.

Find what’s causing it

Measure first, change one thing at a time, and measure again. Run these from the F1 console as an admin, or from RCON.

1

Check your server FPS and entity count

Run serverinfo. It prints the server’s current Framerate, EntityCount, memory use and player count. This is the same data RustAdmin, BattleMetrics and most RCON tools show on their dashboards.

Measure the server

  • serverinfo

    Framerate, entity count, memory and players at this moment.

Write the numbers down at a quiet time and again at peak. Lag that only appears with a full server points to plugins and player activity. Lag that’s there even when the server is empty points to entities, the map or a plugin running on a timer.

2

See how much time each plugin takes

Oxide keeps a running total of how long each plugin has spent in its hooks since it loaded. o.plugins lists every plugin with that total in seconds next to it. Run it twice, a few minutes apart: the plugin whose number climbs fastest is the one doing the most work.

Carbon tracks hook time, hook calls, memory, errors and lag spikes for every plugin. c.plugins lists them, and c.plugininfo breaks one plugin down hook by hook. Run c.resethooks first so you’re comparing fresh numbers, not totals from days ago.

Plugin timings

  • o.plugins

    Every loaded plugin, its version and its total hook time.

  • c.resethooks

    Clears hook time, calls, memory, errors and lag spikes, so you start from zero.

  • c.plugins

    Every loaded plugin with its stats.

  • c.plugininfo "Plugin name"

    One plugin in detail: which hooks it uses, how long each takes and how much memory it allocates.

  • c.hookinfo "Hook name"

    One hook in detail, including every plugin that uses it.

Also read the console. When a plugin’s hooks run too long, Oxide prints a warning like Calling 'OnEntitySpawned' on 'PluginName v1.0.0' took average 1611ms. Oxide checks a plugin’s total over a short window, so the hook named in the warning isn’t always the slow one, but the plugin named is the one to look at.

Carbon counts a hook call as a lag spike when it takes longer than c.hooklsthreshold, which defaults to 1000ms. A plugin with a growing lag spike count is the first one to look at.

3

Profile it when the numbers aren’t clear

Carbon has a built-in profiler that records where server time really goes, including inside plugins. Profiling makes the server slower while it records, so keep the recording short and do it off-peak.

Carbon profiler

  • c.profile

    Starts recording. Run it again to stop.

  • c.profile.plugin "Plugin name" "Duration"

    Profiles one plugin only, then turns profiling off again by itself.

  • c.profiler.print -t

    Prints the last recording as a table. Use -c for CSV, and add -f to write it to a file in the server folder.

34

Unload the suspect and measure again

Unload the plugin you suspect, wait a few minutes, and run serverinfo again. If the framerate recovers, you’ve found it. Load it back afterwards. Unloading doesn’t delete its config or data.

Test one plugin

  • o.unload PluginName

    Unloads the plugin until you load it again or the server restarts.

  • o.load PluginName

    Loads it back.

  • c.unload PluginName

    Unloads the plugin and marks it as ignored.

  • c.load PluginName

    Loads it back.

Test one plugin at a time. If you unload five at once and the lag goes away, you still don’t know which one caused it.

45

Find who is adding the entities

If the framerate drops a little more every day of the wipe, compare EntityCount from serverinfo with the number on wipe day. A count that keeps climbing usually means a few huge bases, abandoned builds that never decay, or a plugin that spawns things and never removes them.

Entities per player

  • entcount "SteamID64"

    How many entities that player has placed.

  • entity.deleteby "SteamID64"

    Permanently deletes every entity that player has placed, across the whole map.

Careful with entity.deleteby. It can’t be undone. Always use the SteamID64, never a name, run entcount first so you know how much will go, and do big deletions when the server is quiet.

How plugins slow a server

Plugins run inside the server’s own frame. Every hook a plugin uses runs every time that event happens, so a plugin that’s slightly slow on a hook that fires thousands of times a minute costs more than a heavy command someone runs once a day.

Hooks that fire constantly

Hooks on items moving, stacks, entities spawning and every server tick run all the time. CanAcceptItem, OnMaxStackable and OnEntitySpawned show up in hook warnings again and again for this reason. A plugin that does real work on them, instead of quitting early when the event isn’t relevant, adds up fast.

Timers and UI that never stop

A UI that redraws every second for every player, or a timer that loops over every entity on the map, costs the same whether anyone is looking or not. Check plugin configs for refresh rates and update intervals, and raise them where you can.

Two plugins doing one job

Two stack plugins, two loot plugins or two kill feeds all hook the same events and can fight over the result. Pick one per job and remove the other completely.

Outdated plugins after an update

After a Rust update, an old plugin can throw an error every time its hook runs. Errors are slow, and they fill the console so you miss real warnings. Check the console after every forced wipe and update anything that’s failing.

  • The number of plugins matters less than what they do. Twenty light plugins can cost less than one badly written one.
  • Turn off features you don’t use in each plugin’s config. Many plugins skip the work entirely when a feature is disabled.
  • Prefer plugins that are still updated and have a changelog, so fixes for new Rust updates actually arrive.
  • Remove plugins you no longer use instead of leaving them loaded “just in case”.
How ModPulse builds plugins. Our developers follow best practice on every hook, so plugins only do work when the event matters to them. Every plugin is also actively profiled before release, so it runs as light as possible on yours. Browse ModPulse plugins.

Entity counts

Every building block, door, box, sleeping bag, dropped item, NPC and loot crate is an entity. The server has to keep track of all of them, and the more there are, the less time each frame has for everything else.

Keep decay on

Decay is how Rust removes abandoned bases. Servers that turn it off or set decay.scale very low keep every build until the next wipe, and the entity count only goes up. Leave decay and upkeep on, so bases nobody pays for disappear by themselves.

Watch the biggest builders

A handful of mega bases or compound walls around half the map can hold more entities than the rest of the server put together. Use entcount on the largest clans, and set clear base size rules before the wipe, not after.

Let players clean up

Players rebuild and move all the time, and old walls, boxes and twig foundations stay behind. A remove tool gives them an easy way to take down what they placed, instead of leaving it for decay.

Check event plugins

Events that spawn crates, NPCs or structures should remove everything when the event ends. If EntityCount jumps after each event and never comes back down, unload that plugin and see whether the count stops growing.

Wipe schedule. The entity count is lowest right after a wipe and highest just before the next one. If your server is fine for the first few days and struggles at the end, a shorter wipe cycle may fix it faster than any setting.

Map size & monuments

The map sets your starting load before a single player joins. Monuments come with NPCs, loot spawns, puzzles and moving parts, and a bigger world fits more of them.

  • Match the size to your players. A huge map on a small server means more monuments, more NPCs and more loot to simulate, with no one there to use it. Smaller maps are also easier to fill, so players meet each other more.
  • Custom maps can be heavy. Maps with many prefabs, extra monuments, NPC spawners or IO setups start with a higher entity count than a procedural map of the same size. Check serverinfo on a fresh wipe and compare it with a procedural map you know runs well.
  • Monument plugins add up. Plugins that add NPCs, bosses or extra events at monuments add their own entities and hooks on top. Run the plugin timing check from step 2 with them loaded and unloaded.
  • Measure after every map change. Note the framerate and entity count on the first day of each wipe, so you can tell whether a new map or size is the reason things changed.

Setting up a custom map? See how to run a custom map on your Rust server.

Restarts & hardware

Restart on a schedule

A Rust server’s memory use grows the longer it runs, and some plugins build up data in memory over time. A daily restart at your quietest hour clears it out. Announce it in advance so players have time to get somewhere safe, and the restart won’t cost you players.

Clock speed over core count

Most of the server’s game logic runs on one main thread, so a CPU with a high clock speed helps more than extra cores. If you rent your server, ask your host what CPU it runs on before you upgrade to a bigger plan.

Lag spikes every few minutes? Note the time of each spike and compare it with the console. If spikes line up with the world save message, the save is the cause, and a lower entity count makes every save faster.

Plugins that help

These ModPulse plugins take care of the upkeep in this guide, so it doesn’t depend on someone remembering to do it. Every ModPulse plugin supports both Oxide and Carbon.

Plugin Update Checker

Checks your server for outdated ModPulse plugins and tells you, with optional Discord webhook alerts. It checks once when the server starts, so it adds no load while the server runs. Free.

View plugin

Restart Rewards

Schedules daily restarts, announces them to players, and rewards players who reconnect within a set time, so a restart doesn’t empty your server. It can also run your own commands a set number of seconds before the reboot.

View plugin

Base Remove

Lets players remove objects they placed themselves with /remove, so old walls and boxes come down instead of piling up. You can charge scrap, Economics or Server Rewards for it, and add a cooldown.

View plugin

Troubleshooting

Players say it lags, but the server framerate looks fine

Then the server isn’t the bottleneck. Ask what they see: low FPS on their screen is their PC, and teleporting players or delayed hits with a normal server framerate usually means high ping or packet loss between them and your host. Compare with players in other regions.

The lag started right after a Rust update

Check the console for plugin errors first. Outdated plugins often break on update day and throw errors on every hook call. Update or unload anything that’s failing, then check the timings from step 2 again.

The server gets slower every day of the wipe

That’s almost always entities. Compare EntityCount with wipe day, check the biggest builders with entcount, and make sure decay is on. See entity counts.

I see hook warnings for a plugin, but unloading it doesn’t help

A plugin can be blamed for a slowdown it didn’t cause. If the whole server pauses, for example during a world save or memory cleanup, whichever plugin was running at that moment gets the warning. Look for the plugin that shows up in warnings most often, not just once.

Should I remove all my plugins?

No. Plugins are why players choose your server. Measure, find the one or two that cost the most, and fix, replace or reconfigure those. Removing everything at once tells you nothing about which one caused the lag.

Facing lag you just can’t fix?

Contact us on Discord and we’ll try our best to help.