Halloween Edition36 maps, limited runlimited runShop the drop
Chapter 11 of 17The Server Handbook for FiveM

Performance: server lag, FPS and texture loss

In short

Measure before you change anything. Server lag, client FPS drops and texture loss have different causes and different tools.

SymptomToolUsual cause
Everyone rubber-bands at onceHitch warnings in the console, profilerA resource blocking the server thread
One player lagsTheir ping, their F8 consoleTheir connection or PC
Low FPS for everyoneresmon 1 in F8Client scripts working every frame, heavy NUI
Textures pop or go missingOversized-asset warningsToo many large textures
Server slows over hoursEntity counts, memory in resmonLeaks: entities never deleted, growing tables
Server console — record the profiler while the lag happens
profiler record 500
profiler view
  • Client loops: sleep when nothing is near (Wait(500) or more); use Wait(0) only while drawing or reading controls.
  • Replace polling with events, state bags and ox_lib points or zones.
  • Database: asynchronous queries, indexes, and never a query inside a loop over players.
  • Lower AI population with density multipliers, or set onesync_population false if you need none.
  • Delete entities when a job ends, when a resource stops and when a player drops.
PoolMax increase (FiveM)
TxdStore26000
AnimStore20480
EntityDescPool20480
Building20000
FragmentStore14000
CWeaponComponentInfo2048
Object2000
fragInstGta2000

Set with `increase_pool_size "TxdStore" 6000` at startup; inspect pools in F8 → Tools → Streaming → Pool Monitor.

The Server Handbook for FiveM

This chapter is one of 17. The handbook also carries the console command and convar cheat sheets, a glossary and the official references every chapter is checked against.

Open the handbook