"The server is lagging" is the most common and least useful sentence on a FiveM Discord. It covers at least four different problems with different causes and fixes. Before buying a bigger machine, which often changes nothing, here is how to find out what is really happening.
1. Start by describing the symptom
| What players see | What it probably is |
|---|---|
| Choppy frames, but other players move normally | A client-side problem: the player's PC, or resources too heavy to display. |
| Vehicles and players teleport, everyone is affected at once | The server can no longer keep up: the main thread is saturated. |
| High latency for some players only | The network, or geographic distance. |
| The server slows at the same times, or after several hours | A memory leak, or too few resources under load. |
Also ask how many players were connected when it happened, and whether it followed an update or a new script. These two questions often narrow the search.
2. Read resmon, the tool that gives the answer
In game, open the console with F8 and type:
resmon 1
A table appears with one line per resource. The column that matters is the execution time in milliseconds: the time the resource uses on each frame on the client, or each tick on the server.
| Time shown | Meaning |
|---|---|
| Under 0.5 ms | Normal. |
| 0.5 to 2 ms | Keep an eye on it, especially if several resources are in this range. |
| Over 2 ms continuously | Abnormal: this resource is probably badly written. |
| Over 5 ms | On its own, it degrades the experience for everyone. |
Check the values at rest, with the player standing still. A resource using 3 ms when nothing is happening is looping for no reason, usually a while true without enough wait. Fix or replace it first. These thresholds are practical guides, not official limits.
3. On the server side: ticks
In the server console or in txAdmin, watch the main thread's tick time. If the server runs at 20 ticks per second, it has 50 ms for each tick. When resources exceed this budget, the server falls behind, and players feel it as teleporting.
txAdmin also shows a performance chart. A curve that shoots up at fixed times points to a scheduled task, often a backup or a badly tuned database clean-up.
For a precise measurement, the built-in profiler records a few seconds of activity, which you then analyze in the browser:
profiler record 5
profiler save /tmp/profile.json
4. The usual culprits
- SQL queries in a loop. A script querying the database every tick for every player brings it to its knees as soon as the server fills up.
- Loops without waits. A
while trueloop withWait(0)runs on every frame. This is sometimes necessary, but usually not. - Entities never cleaned up. After a few hours, abandoned vehicles, placed objects and NPCs make the simulation more and more expensive. A clean-up script solves this.
- Heavy custom maps, which mainly weigh on the client and cause stutter when entering an area.
- Badly configured OneSync, or an old mode left on a server with more than 32 players.
5. Is it really the machine?
Connect to the server and look while it is lagging:
htop # live load and memory
free -h # available memory and swap used
- One core at 100%, the others idle: FiveM's main thread is saturated. More cores will not help: fix the resource, or choose a CPU with a higher clock speed.
- Memory full and swap in use: the server really is undersized.
- CPU and memory calm, but it still lags: the problem is in the scripts or the database, not the machine.
6. Or the network?
Ask a player who is complaining to run:
ping SERVER_IP
tracert SERVER_IP # Windows
If latency jumps in bursts while the server is calm, the problem is on the network path. If all players see latency explode at once, consider an attack: see understanding Anti-DDoS protection and our FiveM protection page.
7. The method in five steps
- Note the exact symptom, the time and the number of connected players.
- Run
resmon 1and list resources above 2 ms at rest. - Check the server load with
htopduring the incident. - Disable the suspect resource and observe: that is the only real proof.
- If the scripts are clean and the machine is saturated, only then change your plan. See our FiveM server plans.
Server not starting at all? See common FiveM startup errors.
Frequently asked questions
How do I find which FiveM resource causes lag?
Open the F8 console and type resmon 1, then look for resources using more than about 2 ms while nothing is happening. Disable the suspect and check whether the problem goes away.
Will more CPU cores fix FiveM lag?
Often not. If one core is at 100% and the others are idle, the main thread is saturated, so fixing the resource or using a faster CPU helps more than adding cores.
Why do players teleport on my FiveM server?
Usually because the server's main thread can no longer keep up. Check tick times in the console or txAdmin, then look for the heaviest resources.










