01
What uses memory on a FiveM server
Cfx.re's server program, FXServer, is not the biggest consumer. Memory goes mostly into what you install on it:
- Scripts: each Lua, JavaScript or C# resource keeps its data in memory (online players, caches, tables loaded from the database). The framework and the inventory are among the largest. A badly written script that piles up data without ever freeing it makes memory climb hour after hour.
- OneSync: the server itself tracks players, vehicles, NPCs and synced objects. The more entities on the map, the more memory and processing it needs (see OneSync on FiveM).
- Connected players: each one adds their character, their inventory and whatever the scripts keep about them.
- Added content (MLOs, maps, vehicles and clothing): the server sends it to every player who connects. It weighs first on disk, on download time and on the memory of the players' game (see installing an MLO).
- The database: MariaDB stores characters, accounts and inventories. If it runs on the same machine as the server, as on a VPS, its memory adds to FXServer's.
02
Guidelines by players and use
Cfx.re's official documentation describes the server installation without giving a memory requirement. The figures below are therefore our estimates, the ones shown on our plans, for a server with common scripts:
- 4 GB: about 16 players;
- 8 GB: about 32 players;
- 16 GB: about 64 players;
- 24 GB: about 96 players;
- 32 GB: about 128 players.
Then adjust for how the server is used:
- Server without a framework (racing, training, testing): few scripts, memory stays low; the first tier is often enough.
- ESX, QBCore or Qbox roleplay with a standard set of scripts: the figures above apply (see ESX, QBCore or Qbox).
- Many scripts, MLOs and added vehicles: plan one tier above what the player count suggests.
The server calculator follows the same logic. Two limits have nothing to do with memory: beyond 32 players, OneSync is required, and beyond 48 players you need a key tied to your own Element Club subscription (see FiveM licence key).
03
Measuring real usage
An estimate is no substitute for a measurement. The official txAdmin repository lists among its features monitoring of the server's CPU and memory usage, plus a performance chart of the server threads alongside player count. Use it like this:
- Note memory at three points: right after a restart, at peak time, then just before the next restart.
- Compare: memory that rises with players and then levels off is normal. Memory that keeps climbing, even when the server empties, often points to a script holding on to data without freeing it.
- Add resources in small batches and measure after each one: you will know which one is expensive.
- For processing time, use the built-in profiler in the server console:
profiler record 500, then profiler view, which gives a link to the report to open in Chrome. It measures each resource's CPU time, not memory.
The txAdmin guide shows where to read this information, and the guide optimising a FiveM server covers the profiler and the most common causes of lag.
04
Signs of running short of memory
- The server stops abruptly, with no clear script error, often at peak time; txAdmin then restarts it automatically.
not enough memory errors in the console: this is the message Lua shows when it can no longer allocate memory.
- Memory hits your plan's ceiling every busy evening.
On the other hand, some symptoms do not come from memory:
server thread hitch warning messages while memory is not full: a script or a query is blocking the main thread;
- a single player lagging: it is usually their computer or their connection;
- all players disconnected at once while the console runs normally: a network issue, sometimes an attack (see protecting a game server from DDoS).
More memory does not make a server faster: it only helps if the server is short of it. Common error messages are explained in the guide FiveM server errors.
05
Processor, main thread and disk
Memory is only one of the limits. The others matter just as much:
- The main thread: much of the scripts' work goes through the server's main thread. When a resource blocks it, the whole server falls behind, however much memory is free. A processor that is fast per core therefore matters more than a large number of cores.
- OneSync and players: with many players and entities, the server does more processing: the processor is then often the limit before memory.
- Disk: Cfx.re's documentation notes that each added resource lengthens server startup. NVMe storage speeds up that startup, the database and players' content downloads.
- Scheduled restarts: once or twice a day, at a quiet hour, they let the server start again from clean memory. txAdmin schedules them with announcements to players.
06
On CloudFive: choosing your tier
Our FiveM hosting plans start at €2.50 per month. Every tier runs on an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage, in France on our own AS218808 network:
- Starter, 4 GB: about 16 players;
- Essentiel, 8 GB: about 32 players;
- Avantage, 16 GB: about 64 players;
- Performant, 24 GB: about 96 players;
- Expert, 32 GB: about 128 players;
- Ultime: memory with no cap set by us, within reasonable use of the shared machine.
Player counts are indicative estimates. Start with the tier that covers your players, add one if you install many scripts or MLOs, and change tier at any time from the customer area, without reinstalling.
txAdmin is included, ESX, QBCore or Qbox install in one click with their MariaDB database, and the customer area shows the installed artifacts version, the available versions and a button to roll back to the previous one (a backup is made first). The shared Patreon key provided at no extra cost is limited to 48 players: beyond that, get your own Element Club subscription on the Cfx.re portal. Anti-DDoS Premium is included, with a FiveM-specific profile, monthly with no commitment.
07
Frequently asked questions
How much RAM for a 32-player FiveM server?
As a rough guide, 8 GB is enough for a roleplay server with around thirty players and common scripts. With many scripts, MLOs or added vehicles, plan for 16 GB instead. Then measure real usage with txAdmin.
How much RAM for an ESX, QBCore or Qbox server?
It depends mostly on the scripts added to the framework. Plan for about 8 GB for around thirty players and 16 GB for around sixty, as a rough guide. A server heavily loaded with scripts needs one tier more.
Why does my FiveM server's memory grow over the hours?
Often because a script keeps data without freeing it. Note memory after a restart and before the next one, and add or remove resources in small batches to find the culprit. One or two scheduled restarts a day limit the problem in the meantime.
Will adding RAM fix lag on FiveM?
Only if the server is really short of memory. Most of the time, lag comes from a script blocking the main thread, flagged by server thread hitch warnings. Run the profiler before changing tier.
How many players with the key provided by CloudFive?
The shared Patreon key, provided at no extra cost, is limited to 48 players. Beyond that, you need your own Element Club subscription on the Cfx.re portal, with your key in the server's startup settings.