Skip to content

How to Reduce Game Server Lag: Tickrate, RAM, and Network

"Server lag" describes several different problems, and the fix depends on which one you have. Treating them all as a ping issue leads to the wrong solutions. Here is how to identify the cause and fix it.

What actually causes server lag

The four main causes are distinct from each other. Treating them all as "ping problems" wastes time on the wrong fix.

CPU overload

The server cannot process game logic fast enough. All players experience jitter simultaneously. Caused by Lua scripts, physics, or player count exceeding hardware limits.

RAM pressure

The server runs out of RAM and the OS swaps memory to disk. Symptom: the server runs normally most of the time, then freezes for 2-5 seconds, then resumes. Gets worse as the session ages.

Tick rate issues

The game loop is running slower than it is configured to. The server logs "Server is running too slow!" and sv value in net_graph rises above the expected interval.

Network lag

Packets are taking too long between the player and the server. Usually affects individual players, not everyone at once. High ping in the scoreboard is the symptom.

Key diagnostic question: is it just one player lagging, or everyone simultaneously? If one player, it is almost certainly their connection. If everyone, it is the server.

What tickrate actually is

A game server runs a loop: read player inputs, simulate physics and game logic, send updated state to all players. The number of times this loop runs per second is the tick rate.

Garry's Mod defaults to 33 ticks per second. At 33 ticks, the server processes updates 33 times every second, meaning each tick is about 30 milliseconds of game time. For DarkRP (roleplay, prop placement, economy), 33 tick is completely fine. For fast-paced PvP gamemodes like TTT, 66 tick is worth testing if your hardware can handle it.

Increasing tick rate uses significantly more CPU because the game loop runs more often. A server "dropping ticks" -- where it cannot sustain its configured tick rate -- produces worse performance than running at a lower tick rate reliably. If you raise tick rate and the server cannot sustain it, you have made things worse, not better.

Network lag vs server lag

These are different problems. Confusing them wastes time on the wrong fix.

Network lag

  • High ping in the scoreboard
  • Usually one player, not everyone
  • Server CPU and RAM are normal
  • Fix: player-side (ISP, routing, VPN)

Server lag

  • Everyone rubber-bands at the same time
  • sv in net_graph above expected interval
  • Console logs "running too slow"
  • Fix: server-side (CPU, addons, RAM)

Run net_graph 1 in the GMod console. The sv value is server tick time. If it is consistently above 30ms on a 33-tick server, the server is struggling to keep up with its own tick rate.

Latency from UK players to our Germany servers is typically 15-40ms. If a player sees 200ms ping, it is their routing, not the server location.

RAM and CPU causes

RAM pressure

When a server uses more RAM than is physically available, the OS writes memory to disk (swapping). Disk access is orders of magnitude slower than RAM. The characteristic symptom is a server that runs normally then freezes for 2-5 seconds at irregular intervals that get worse as the session ages. On the server panel, watch RAM usage over time during peak hours -- if it climbs steadily toward the limit, you are hitting memory pressure. Fix: upgrade the plan or reduce heavy addons. Restarting temporarily clears it.

CPU overload

GMod's Source engine runs its game loop on a single thread. More CPU cores do not help -- what matters is single-core speed. Heavy Lua scripts are the most common CPU cause. A script that runs expensive operations every server tick (33 times per second) can consume a meaningful portion of a single core by itself. Multiply by 60 addons and the problem compounds. Physics calculations and iterating over all players every tick are also common culprits.

Rust is different: it uses multiple threads more effectively. But even in Rust, world simulation, animal pathfinding, and chunk management create single-thread bottlenecks on loaded servers.

How addons cause lag and how to find them

Every server-side addon in GMod runs Lua code. The worst offenders use hook.Add("Think", ...) or hook.Add("Tick", ...) to run expensive operations 33 times per second. Multiplied across dozens of addons, this is where server performance disappears.

Using the GMod profiler

-- Start profiling (run in server console)
lua_run gm.Profiler.Start()

-- ... let the server run for 1-2 minutes ...

-- Stop and view results
lua_run gm.Profiler.Stop()

The profiler output shows which hooks consume the most CPU time per tick. Common offenders: frequent database queries, large table scans in Think hooks, and event scripts that do unnecessary work when nothing relevant has happened.

Fixing Think hook lag

-- Expensive: runs 33x per second
hook.Add("Think", "myCheck", function()
    -- expensive database query
end)

-- Better: runs once per second
timer.Create("myCheck", 1, 0, function()
    -- same expensive query
end)

Practical steps to fix server lag

  1. Check the profiler first. Do not disable addons randomly. Use gm_profiler to find which hooks are actually expensive before making changes.
  2. Replace Think hooks with timers. timer.Create running once per second instead of 33 times cuts the overhead by 97%.
  3. Limit physics objects. Set sbox_maxprops to a reasonable number. Unlimited props cause physics overload.
  4. Schedule daily restarts. A restart at low-traffic hours resets Lua garbage, clears accumulated memory, and keeps the server stable. Most panel schedule configurations support this.
  5. Audit your addon list. An addon installed six months ago that nobody uses is still running code every tick. Remove it.
  6. Watch for "Server is running too slow!" in the console. This confirms CPU is the constraint.
  7. For Rust: reduce world size if possible, or lower server.tickrate (default 10) to 5-7 on a CPU-limited server.
  8. For Minecraft: use Paper's recommended JVM flags for garbage collection. Default GC settings are not optimised for server use under player load.

What your host can and cannot control

Your host controls

  • CPU speed and core count
  • RAM available on your plan
  • Network bandwidth
  • DDoS mitigation at the network level

Outside the host's control

  • Efficiency of your Lua scripts
  • Player count vs plan size
  • Bugs in third-party addons
  • Players' ISP last-mile connections

Lag caused by a slow Lua script is not fixed by upgrading your plan. More RAM or CPU helps if those resources are the bottleneck, but bad code is bad code regardless of hardware. The Zeros Host panel includes Server Vitals with live CPU and RAM graphs so you can see whether the issue is hardware or application-level code.

See exactly what your server is doing

The Zeros Host panel includes Server Vitals -- live CPU, RAM, and tick graphs. Spot lag causes without guessing. Start a 24-hour free trial with no card required.

See GMod hosting

Frequently asked questions

What is server tick rate and does it matter for DarkRP?

Tick rate is how many times per second the server processes game logic and sends updates to players. Garry's Mod defaults to 33 ticks per second. For DarkRP, 33 tick is perfectly fine. Tick rate matters more for fast-paced PvP gamemodes where individual shots and collisions need precise timing. Raising tick rate increases CPU load, so only do it if you have headroom and a specific reason.

How do I find out which addon is causing my GMod server to lag?

Use the built-in GMod profiler. From the server console, run lua_run gm.Profiler.Start() to start profiling, play normally for a minute, then run lua_run gm.Profiler.Stop(). The output shows which hooks are consuming the most CPU time. The worst offenders are usually Think hooks that run expensive operations every tick. Once identified, check whether a newer version of the addon exists, or disable it if not essential.

Why does my server freeze for a few seconds then return to normal?

This pattern -- periodic stalls of 2-10 seconds followed by normal operation -- is almost always RAM pressure. The server is running out of available RAM and the OS is swapping to disk. Disk reads are far slower than RAM, so the server stalls while waiting for data. Fix: upgrade to a plan with more RAM, or reduce the number of memory-heavy addons. A restart resolves it temporarily.

Is server lag the same as players having high ping?

No. High ping is a network issue -- packets are taking a long time to travel between the player and the server. Server lag is when the server process itself is slow -- not enough CPU to process game ticks fast enough. If only one player has high ping while others are fine, it is their connection. If everyone experiences the same stuttering simultaneously, it is the server.

Does upgrading server RAM fix lag caused by bad Lua scripts?

Not directly. If the lag is caused by Lua code running slowly or running too frequently, more RAM will not help -- the problem is CPU time, not memory. More RAM helps if you are hitting RAM pressure. The right tool for Lua lag is the profiler, not a plan upgrade.