How to optimize FiveM server performance and hold 60 Hz tickrate

FiveM server lagging or tickrate dropping? Practical guide to read resmon, tune OneSync, fix heavy resources and stabilize the tick at 60 Hz.

FiveM server tick falling from 60 Hz to 30 Hz when the server fills up, players complaining about rubber-banding, vehicles freezing mid-air, combat sync dropping out. You run resmon, see 3-4 resources eating 5ms each, but have no idea which one to tackle first or where to start optimizing.

This scenario has a clear technical cause: the FXServer main thread runs on a single core, and any resource that takes more than 2-3ms per tick consumes nearly a full frame at 60 Hz. When 4 resources add up to 15ms+, the server literally cannot complete 60 ticks per second. That’s when desync, input lag and silent event drops start.

This guide covers the 6 areas where FiveM performance dies, in order of impact: measuring before optimizing, OneSync, heavy resources, asset streaming, network config and hardware. Estimated time: 45 to 90 minutes to apply all the optimizations and validate.

Prerequisites

What you need before starting

Administrative access to the FXServer host (SSH on Linux or RDP on Windows), permission to edit server.cfg and restart the server, access to the txAdmin panel for monitoring, and ideally a short maintenance window (10-15 min) to restart between changes. Server running FXServer build 6683 or higher.

Target tick 60 Hz
Resource budget < 3ms each
Total resources < 12ms combined
Recommended OneSync infinity

Measure before you optimize

Optimizing without measuring is guesswork. Before touching any config, you need a baseline — without it you have no way to prove that a change actually helped.

01

Join the server as a player and open the console with F8. Type the resource monitor command:

resmon 1

This opens the Resource Monitor in verbose mode. The columns that matter:

  • CPU ms — time spent on the main thread per tick. The sum of all rows is your total budget
  • Memory — RAM consumed by the resource (rarely the problem)
  • Streaming — assets streamed by the resource (relevant for map packs)

Note the top 5 resources by CPU ms. Take a screenshot for comparison later.

02

In the server console (SSH or FXServer window), run the command that shows the current tick:

status

You’ll see lines like Server thread hitch warning: frame time of 28ms. Frame time above 16.6ms means the server is dropping ticks. Note the average value over 5 minutes of normal gameplay.

03

Open txAdmin (default port 40120) and go to “Performance Chart”. This chart shows tick rate history for the last 60 minutes. If you see regular drops during peak hours, the problem is load — not a one-off bug.

Baseline at peak hours

Take measurements with a full server, not an empty one. Resources that cost 1ms with 5 players can cost 4ms with 50 — because they iterate over every player online. Optimizing for an empty scenario doesn’t fix the real problem.

Configure OneSync correctly

OneSync is FiveM’s entity synchronization system. The choice between legacy and infinity dramatically changes server performance and capacity.

01

Open your server.cfg and find the OneSync lines. Recommended config for modern servers:

set onesync on
set onesync_population true
set onesync_distanceCullVehicles true
sv_enforceGameBuild 2944
sv_maxclients 64

The onesync_distanceCullVehicles flag removes parked vehicles far from players — drastically cuts sync load. enforceGameBuild pins the game version to avoid bugs introduced by Rockstar updates.

02

If you’re running OneSync legacy and want to migrate to infinity, swap the line and test your resources:

set onesync infinity

Restart the server and test every critical script (combat, inventory, garage). Resources that relied on local network IDs may break — the infinity API uses state bags and routing buckets instead.

Routing buckets for isolated scenes

If you have missions, dungeons or interiors that should be isolated from players outside the scene, use routing buckets via SetPlayerRoutingBucket(playerId, bucketId). Without them, the server syncs entities from isolated scenes to all nearby players — wasted tick budget.

Identify and optimize heavy resources

This is the step where 70% of performance gains happen. Badly written resources with loops without Wait, synchronous queries and events firing at high frequency will bring down any server.

01

Go back to resmon and open the top 3 resources by CPU ms. Look through the code for problematic patterns. The most common one is a loop without proper Wait:

-- BAD: runs every frame, burns CPU
CreateThread(function()
  while true do
    local player = PlayerPedId()
    -- logic here
    Wait(0)
  end
end)

Wait(0) means “run every frame”. If the check doesn’t need to be that frequent, raise it to Wait(500) or Wait(1000). Practical difference: a loop with Wait(0) runs 60 times per second; with Wait(1000) it runs once. For proximity checks, UI status or inventory polling, 500-1000ms is plenty.

02

Look for synchronous SQL queries in hot paths (events called frequently). Replace them with async:

-- BAD: blocks the thread
local result = MySQL.Sync.fetchAll("SELECT * FROM users WHERE id = ?", {id})

-- GOOD: async callback
MySQL.Async.fetchAll("SELECT * FROM users WHERE id = ?", {id}, function(result)
  -- process here
end)

Sync queries block the entire main thread while the database responds — even if it only takes 5ms, that’s 5ms lost on every call.

03

Client→server events fired at high frequency are one of the worst offenders. Look for TriggerServerEvent inside player loops and add throttling:

-- Before
CreateThread(function()
  while true do
    TriggerServerEvent("updatePlayerPosition", GetEntityCoords(PlayerPedId()))
    Wait(100)  -- 10 events per second, per player
  end
end)

-- After
CreateThread(function()
  while true do
    TriggerServerEvent("updatePlayerPosition", GetEntityCoords(PlayerPedId()))
    Wait(2000)  -- 1 event every 2s — enough for most cases
  end
end)

With 50 players, that’s the difference between 500 events/second and 25 events/second on the server.

Be careful disabling resources

Before stopping a heavy resource, check dependencies with ensure in server.cfg. Core resources (like mysql-async, es_extended) will break the entire server if removed. Test in a staging environment first or during very low traffic.

Optimize asset streaming

Custom maps, MLOs and ymaps add hundreds of small files per region. Misconfigured streaming causes stutter when a player enters a new area.

01

Organize your stream/ folder into subdirectories by category — FXServer indexes them faster:

resources/[maps]/my-map/
├── fxmanifest.lua
├── stream/
│   ├── ymap/
│   ├── ytd/
│   └── ydr/

Flat folders with 5000+ files in the same directory add 10-30 extra seconds to server startup.

02

Enable asset cache in server.cfg:

sv_assetCacheEnabled true

This lets clients keep assets cached between sessions, reducing repeat downloads — less I/O and network pressure when players reconnect.

03

Look for duplicate or conflicting maps. Use the server console command to list resources with assets:

list

Find any two resources streaming the same ymap (e.g. two MLOs of the same building). Streaming conflicts cause flickering and sometimes crashes. Disable the duplicate.

Verification

After applying the optimizations, fully restart the server and redo the same measurements:

01

Compare resmon before/after with the server full. Every resource you optimized should be down at least 30%. Total resource sum ideally below 12ms.

02

In txAdmin, watch the Performance Chart for 30 minutes during peak hours. Tick rate should hold 60 Hz with at most 1-2 short dips. Average frame time below 16.6ms.

03

Ask 3-5 active players for feedback. Specifically ask about input lag in combat and vehicle sync. Numeric metrics don’t capture perception — players notice 8ms stutter that resmon won’t flag.

Next steps

FiveM performance is an ongoing process — every new resource you add can reintroduce a bottleneck. Some directions to go deeper:

  • Set up structured logs to identify which events fire most and when
  • Learn to use the FXServer profiler (profiler record and profiler view) for deeper analysis
  • If you’re moving this into production with 64+ slots and heavy custom maps, a Hostini VPS with high-clock CPU and NVMe makes a measurable difference in tick rate — proper hardware is just as important as optimized code
  • Build a staging environment to test new resources before pushing them to production
  • Document the current baseline (average tick, total resource budget) so you can compare when you change something later

Frequently asked questions

What tickrate should a 64-slot FiveM server target?

The target is a steady 60 Hz on the main thread. Anything below 50 Hz is already noticeable as input lag — melee hits register late and vehicle handling feels mushy. Servers with more than 32 concurrent players need OneSync infinity enabled and a CPU with high clock speed (5 GHz+) to hold 60 Hz consistently.

OneSync legacy or infinity — which one should I pick?

Use infinity whenever possible — it supports up to 1024 slots and has significantly better entity sync. Legacy is capped at 32 players and is effectively end-of-life. The only reason to stay on legacy is compatibility with old resources that never got updated to the infinity API.

My resmon shows a resource at 8ms. Is that bad?

Yes. Individual resources should stay under 2-3ms on the main thread. Above 5ms a single resource eats almost an entire tick (16.6ms at 60 Hz) and forces the server to drop ticks. Look for loops without Wait, events firing too often or synchronous SQL queries inside the resource.

Is txAdmin worth running just to monitor performance?

Yes. txAdmin aggregates tick rate, per-resource CPU usage, active players and crashes into a single dashboard. Unlike resmon (which shows an in-game snapshot), txAdmin keeps history — you can see whether tick drops happen during peak hours or right after a specific resource loads.

Do I really need NVMe SSD, or is SATA enough?

NVMe is clearly better for FiveM. Asset streaming (custom maps, MLOs, ymaps) reads hundreds of small files when a player enters a new region. On SATA that I/O spike causes local stutter; on NVMe it's imperceptible. Servers with large custom maps (50 GB+ of assets) only stay stable on NVMe.

Does lowering the slot count help when the server can't keep up?

It helps as a band-aid, not as a fix. If the tick drops at 48 players and stabilizes at 32, you bought time — but the root cause (heavy resource, bad OneSync config, saturated CPU) is still there. Reducing slots is fine while you investigate and optimize, not as a permanent solution.

Topics:
Next steps VPS, dedicated or managed panel for FiveM, SAMP, MTA, Tibia and more.Host your game server with Hostini →
Was this tutorial helpful?
Chat on WhatsApp