Private customers Business customers

Improve FiveM server performanceMeasure instead of guessing: find the bottleneck

When an RP server stutters, the first reflex is usually the wrong one: booking a bigger package. In most cases, the hardware is not at its limit - a single resource is permanently eating CPU time. This guide shows how to find it - and what really helps afterwards.

resmonScript loadRestartsDatabase

Published on · last updated on

Measure first

FiveM comes with a built-in resource monitor. You open it in the game via the console and see a list of all running resources with their respective CPU time - client-side and server-side.

What matters is less the absolute value than the ratio: a single resource that permanently uses many times more than all the others is practically always the cause. Typical candidates are scripts with endless loops that check something every frame instead of waiting for an event.

In addition, the live console in the web interface shows warnings and errors that get lost in the game. A script that writes an error message every second not only costs CPU time but also gives away its problem right away.

FiveM server hosting from €7.99 / month

Prepaid without a contract, DDoS protection up to 250 Gbit/⁠s.

View plans & prices

The usual suspects

  • Loops without a pause. The most common case in freely distributed scripts. A look at the code is often enough to recognize the pattern.
  • Too many database queries. If something is looked up at every step a player takes, the database becomes the bottleneck.
  • Duplicate features. Two inventory scripts, two HUDs, two vehicle systems - grown servers often drag something like this along.
  • Too much streamed content. MLOs and vehicles mainly cost memory and loading time, but in total also performance.

Strikingly often, the problem is not in the largest but in the most inconspicuous script - for example, a small display that constantly queries positions in the background.

Clean up instead of upgrading

Once you have found the culprit, there are three ways - in this order:

  1. Remove it. Does the server really need the script? In grown projects, the answer is surprisingly often no.
  2. Replace it. For almost every feature, there are several implementations of varying quality. Switching is usually done faster than a repair.
  3. Repair it. The best way for your own scripts: defuse loops, switch to events, bundle queries.

Only when all resources work cleanly and the server still reaches its limits is a bigger package the right answer - the overview is under how much does a FiveM server cost?.

Restarts as a tool

A FiveM server that runs for hours collects ballast - players who have left, vehicles standing around, objects from scenes that ended long ago. A scheduled restart clears that up.

Two ways are available: the task scheduler in our web interface or the schedule in txAdmin, which also announces the restart in the game. For roleplay servers, the announcement is worth its weight in gold, because nobody gets thrown out in the middle of a scene. Use one of the two - not both.

Restarts in the early morning hours have proven themselves, supplemented by one in the afternoon if the server is busy around the clock.

What hardware can do - and what it cannot

FiveM processes the game logic essentially in a single thread. That means: the performance of a single CPU core decides the tick rate, not the number of cores. That is exactly what our game servers are designed for.

This leads to the most important sentence of this guide: more memory does not fix a bad script. RAM helps when you run out of memory - typically with a lot of streamed content. Against a resource that maxes out a core, it does not help. The general picture is explained in how much RAM do I need?.

When it only stutters for some players

Not every stutter is a server problem. If only some of your players complain while the rest are happy, that points to the client side: weak hardware, overloaded client mods or a poor connection.

A good test is to look at the server performance in the monitor while someone is complaining. If the values are unremarkable, it is not the server. If, on the other hand, it hitches for everyone at the same time and always in the same place - for example in a particular building -, you have found your candidate.

If disconnects come on top, it is worth looking at the address and ports: ports and firewall explains how the server address is made up and where it can be blocked.

Frequently asked questions

With the built-in resource monitor. It lists all running resources with their CPU time - the outlier at the top is almost always the cause.

Only if memory is actually running short - for example with many MLOs and vehicles. Against a script that maxes out a CPU core, memory does not help.

For most RP servers, a scheduled restart in the early morning hours is enough; with consistently high load, add one in the afternoon.

Rarely. If the server values are unremarkable, it is the client side: the hardware, client mods or connection of the player in question.

FiveM server with high per-core performance

Processors with high single-thread performance, NVMe storage, task scheduler for restarts and txAdmin on request - prepaid, made in Germany.

View plans & prices

FiveM server hosting

from €7.99 / month

Prepaid without a contract, DDoS protection up to 250 Gbit/⁠s, hosted in Frankfurt am Main.

View plans & prices

Go straight to checkout

Read more


Discover more