Home/Guides/FiveM
// guide · fivem

FiveM Server Lag — the Real Fixes

“Why is my FiveM server lagging?” has about six real answers, and they’re findable. Running a 500-resource city has forced me to learn every one of them. Work this list top to bottom — it’s ordered by how often each one is actually the culprit.

1. Open resmon and believe it

In-game, resmon 1 shows per-resource CPU cost. Sort by cost, let it sit, and watch both idle and under activity. Any resource burning milliseconds while idle is a bug or bad code — the usual crime is a while true loop with Wait(0) polling something that changes once a minute. Fix the wait times or replace the script. This single step solves more “server lag” than everything else combined.

2. Server thread hitches: check the console

Console warnings like server thread hitch mean the main thread stalled. Common causes: synchronous database queries in hot paths (use oxmysql’s async patterns), a script doing heavy work on player join, or an event handler doing table scans across all players every tick. The console usually names a resource — that’s your suspect.

3. Oversized streaming assets (the silent killer)

That gorgeous 300 MB vehicle pack? Its 4K texture dictionaries are why players stutter driving into the city. Oversized .ytd files blow past streaming memory budgets, and duplicate archetypes (two addon packs defining the same prop or vehicle model) cause conflicts and crashes. Audit your streamed assets, downscale absurd textures, and de-duplicate models — I’ve built internal tooling for exactly this because it’s that common.

4. Database health

A roleplay city hammers its database. Symptoms of a sick one: laggy inventories, slow character loads, hitches on save cycles. Fixes: proper indexes on hot tables (players, inventories, owned vehicles), trimming runaway tables (millions of old logs), and making sure the DB runs on the same box or same-datacenter link — a database 80ms away makes everything feel broken.

5. Network vs server vs client — stop guessing

High ping for everyone = host/network problem (cheap VPS, wrong region, DDoS filtering gone wrong). High ping for one player = their connection. Low ping but stuttery gameplay = server performance (see 1–4). Low FPS client-side = usually those streaming assets again, or players with potato settings in a dense custom map area. Diagnose which one you actually have before changing anything.

6. The box itself

FiveM loves fast single-core performance. A 16-core server with weak cores loses to 8 fast ones. If you’re on budget shared hosting with “unlimited slots,” you found your problem. Check RAM headroom too — swapping is death.

When it’s a leak-dump server

If your city started life as a cheap prebuilt pack, lag is usually structural: duplicated resources, conflicting frameworks, abandoned dependencies. That’s less “tuning” and more “surgery” — here’s why those packs are broken by design. And if you’d rather hand the whole forensic job to someone who does it weekly, optimization & crash fixing is one of my core services. Building fresh instead? Start from my setup guide and you’ll avoid most of this list entirely.

// questions

FAQ

Use resmon 1 in-game and sort by CPU cost. Watch idle and active states — anything burning milliseconds while idle is misbehaving. Console 'server thread hitch' warnings also name suspects.

Almost always oversized streaming assets — 4K texture dictionaries in vehicle/map packs blowing the streaming memory budget, or duplicate archetypes between addon packs. Downscale textures and de-duplicate models.

8 GB is a workable floor for a small QBCore city; 16 GB gives comfortable headroom for a mid-size resource list. But single-core CPU speed matters as much as RAM — fast cores beat many cores.

Absolutely — slow character loads, laggy inventories, and save-cycle hitches are classic symptoms. Index hot tables, trim runaway log tables, and keep the DB on the same box or datacenter.

// skip the pain

Want it built right instead?

I build QBCore & Qbox servers and scripts for a living — tested on my own live 500-resource city.