Garry's Mod server lag: tick rate, addons and finding the cause

Why Garry's Mod servers lag: tick rate, physics and props, and addon hooks. How to profile with FProfiler, and how to catch the addon behind a spike.

PerformanceBy the ServerStats teamUpdated 6 min read

Questions

What tick rate should a Garry's Mod server use?

66 is the default and right for most servers. Busy DarkRP and roleplay servers often run -tickrate 33 to halve the server's per-second work, at the cost of less responsive physics and hit registration. Only go higher if your tick time is well under the smaller budget.

How do I find which addon is lagging my GMod server?

Use FProfiler as a superadmin to profile the server realm during the lag, and look at the functions with the most total and per-call time; their file paths name the addon. For spikes you can't catch live, time hook listeners continuously and record the slowest one in each spike.

Why does my GMod server lag with props?

Every unfrozen physics object is simulated each tick, and props touching each other are the expensive case. Stacked or intersecting props, wire contraptions and dupes can take a whole tick's budget. Freeze props, limit props per player and use an anti-crash or anti-prop-spam addon.

Can a hook listener really lag the whole server?

Yes. Every hook listener runs on the one server thread. A Think or Tick listener that does 5 ms of work adds 5 ms to every tick, which is a third of the 15 ms budget at 66 tick.

Catch the addon behind your next lag spike

Free for one server, no card. About five minutes to install.