Players notice a slow server as low FPS, stutter and rubber-banding. Most of the time a few resources cause it, and you can find them with the tools FiveM already gives you. This guide shows how.
Step 1: Measure with resmon
Open the F8 console in game and run:
resmon 1A list of resources appears with their CPU time (ms) per frame and memory use. Run it once standing still, then again in a busy area. Compare the numbers instead of chasing a single reading. resmon 0 turns it off.
How to read it
- A well-written resource is near zero when idle and rises only while a player uses it.
- A resource that stays high with nobody using it is usually running a loop every frame.
- Add the numbers up. Many small values still cost frame time together.
Step 2: Check the server side
Open the txAdmin dashboard and watch the server thread and player count over time. A server that struggles only at peak hours points to too many heavy resources or limited hardware, not one broken script.
Step 3: Fix the usual causes
- Per-frame loops: a
while true do Wait(0)that runs all the time. Good scripts use longer waits when nothing is happening, or events and targets instead. - Constant distance checks: replace repeated checks with zones, targets or longer sleep times when the player is far away.
- Database in loops: run queries when needed, not every tick.
- Too many overlapping scripts: two resources doing the same job (two HUDs, two notification systems) waste time.
- Heavy assets: oversized textures and unoptimised custom vehicles cost memory and streaming.
Step 4: Test after every change
Disable or replace one resource at a time and compare resmon before and after. Change too many things together and you will never know what helped.
Choose lightweight scripts before you buy
Prevention is cheaper than debugging. Before buying, look for a listing that states performance claims, dependencies and framework support clearly, and ask the author what the idle cost is. At ALN DEV, performance is a priority for every script: see the catalogue, or try the interface in the DUO Phone live demo.
Setting up from scratch? Start with the txAdmin setup guide and QBCore vs ESX vs Qbox.
