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.
| Symptom | Tool | Usual cause |
|---|---|---|
| Everyone rubber-bands at once | Hitch warnings in the console, profiler | A resource blocking the server thread |
| One player lags | Their ping, their F8 console | Their connection or PC |
| Low FPS for everyone | resmon 1 in F8 | Client scripts working every frame, heavy NUI |
| Textures pop or go missing | Oversized-asset warnings | Too many large textures |
| Server slows over hours | Entity counts, memory in resmon | Leaks: entities never deleted, growing tables |
profiler record 500
profiler view- Client loops: sleep when nothing is near (
Wait(500)or more); useWait(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 falseif you need none. - Delete entities when a job ends, when a resource stops and when a player drops.
| Pool | Max increase (FiveM) |
|---|---|
TxdStore | 26000 |
AnimStore | 20480 |
EntityDescPool | 20480 |
Building | 20000 |
FragmentStore | 14000 |
CWeaponComponentInfo | 2048 |
Object | 2000 |
fragInstGta | 2000 |
Set with `increase_pool_size "TxdStore" 6000` at startup; inspect pools in F8 → Tools → Streaming → Pool Monitor.
Go deeper:Find the resource that is eating your frames →Fixing server thread hitch warnings →Improving FPS on FiveM →Entity limits and cleanup on a FiveM server →Traffic and pedestrian density on a FiveM server →Streaming memory and texture loss in FiveM →Desync, rubber-banding and network issues in FiveM →