In short
On a FiveM server, script load drives RAM needs more than player count. As a guideline: 4 GB for a light 32-slot server, 8 GB for a 64-slot ESX or QBCore roleplay server, 12-16 GB for 128 slots, and 24 GB or more for 200+ slots. For the CPU, check single-core speed before core count, because FXServer's main thread, which runs scripts and game logic, runs on one core.
In this guide
Short answer: a FiveM server's RAM needs depend more on how many scripts (resources) you load, and how well they are written, than on slot count. As a guideline starting point, a light 32-slot server needs 4 GB, a 64-slot ESX or QBCore roleplay server needs 8 GB, 128 slots need 12-16 GB, and 200+ slots need 24 GB or more. On the CPU side, look at single-core performance before core count. Below we explain where these numbers come from, how to measure your own server, and when it is time to move up a plan.
Where does a FiveM server spend its RAM?
"How much RAM is my server using?" is not a question about a single process. The same machine usually runs these components together:
- FXServer: FiveM's server software. Every loaded resource, the Lua and JavaScript runtimes, and the state of players and entities (vehicles, NPCs, props) consume memory here.
- MariaDB / MySQL: the database where frameworks like ESX, QBCore and QBox store player, inventory and vehicle data. Depending on the cache (buffer pool) setting, it can take anywhere from a few hundred MB to several GB.
- txAdmin: the web panel that manages the server; relatively light, but still worth counting.
- Operating system: a few hundred MB on Linux, more on Windows.
Addon vehicle, MLO and clothing packs mainly consume disk space and bandwidth when files are sent to players. But hundreds of streamed files also increase server startup time and memory usage. Finally, poorly written scripts leak memory over time, so we recommend always leaving about 25-30 percent headroom when planning RAM.
RAM/CPU table by slot count and script load
The table below shows guideline values, assuming the database runs on the same machine. "Light" means freeroam, drift or low-script setups; "medium" means a typical ESX/QBCore roleplay server; "heavy" means busy RP servers with hundreds of resources, many MLOs and addon vehicles.
| Slots | Light (fewer than 50 resources) | Medium (100-200 resources) | Heavy (250+ resources) | Recommended CPU |
|---|---|---|---|---|
| 32 | 2-4 GB | 4-6 GB | 6-8 GB | 2-4 fast cores |
| 64 | 4 GB | 6-8 GB | 8-12 GB | 4 fast cores |
| 128 | 6-8 GB | 12 GB | 16 GB | 6 fast cores |
| 200+ | 12 GB | 16-24 GB | 24-32 GB or more | 8 or more fast cores |
Use this table to pick a starting plan, not as a replacement for your own measurements. Two servers with the same slot count can easily differ by up to 2x; what decides it is how efficiently the scripts are written.
The table translated into plans
- 32 slots, medium load: 4-6 GB RAM and 2-4 cores; enough for a group of friends or a newly launched RP server.
- 64-slot ESX/QBCore roleplay: the OB-FIVEM-4 FiveM server plan, with 4 CPUs and 8 GB DDR5 RAM, is a direct match for this scenario.
- 128 slots or a heavy script load: the OB-FIVEM-6 plan, with 6 CPUs and 16 GB DDR5 RAM, leaves comfortable room for both FXServer and the database.
- 200+ slots: look at higher plans with 24 GB or more RAM and 8 or more cores; at this scale, also consider moving the database to a separate server.
Keep in mind: going above 48 slots is not just a hardware question; it requires OneSync and a Cfx.re Element Club subscription. For details, see the FiveM OneSync and slot increase guide.
Why is single-core performance critical?
Even when FXServer runs on a multi-core machine, the main server thread, the heart of the game logic, runs on a single core. Server-side Lua script loops, event handlers and the framework code that processes player data all run on this thread, one after another. If the work in one "tick" takes too long, the next tick is delayed; you see a server thread hitch warning in the console, and players notice lag, vehicles teleporting and slow-opening menus.
That is why 16 slow cores usually perform worse than 6 fast ones. When choosing a CPU, look at:
- Per-core clock speed and IPC: newer desktop-class processors (such as the AMD Ryzen 9 series) have an edge in single-threaded work.
- Cache: on servers running many small scripts, a large L3 cache makes a difference.
- Contention ratio: on an overloaded host, the real CPU time your virtual core gets goes down.
For an in-depth comparison, see the best CPU for FiveM guide.
When does core count matter?
Extra cores are not wasted; they cannot carry the main thread's load, but they take on the work around it. OneSync network sync, MariaDB queries, txAdmin, file downloads and the operating system run on the other cores. If you run a test server and a live server on the same machine, or your database is busy, we recommend not going below 4 cores.
Measuring what your own server actually needs
The table gives you a starting point; for the right decision, measure at peak hours.
- Wait for peak time. A measurement on an empty server is meaningless; check in the evening, when player count is at its highest.
- Open the txAdmin dashboard. The txAdmin home screen shows host CPU and memory usage plus a server performance chart; spikes in tick time show up here.
- Confirm with system tools. On Linux, the commands below show total memory and per-process usage. On Windows, the Details tab in Task Manager does the same job.
- Check the database cache. Do not blame FXServer before you know how much memory MariaDB has allocated.
- Monitor for a week. If memory usage climbs a bit every day, a script is leaking; txAdmin's scheduled restart feature is a temporary fix, and the real fix is correcting the script.
# Total and free memory
free -h
# Per-process CPU and RAM (press q to quit)
htop
# MariaDB InnoDB buffer pool size
mysql -u root -p -e "SHOW VARIABLES LIKE 'innodb_buffer_pool_size';"Client-side FPS drops, on the other hand, come from the scripts' client code, not server hardware; for that, use the script optimization with resmon guide.
How do framework and prebuilt server packs affect RAM?
ESX, QBCore and QBox do not use much memory on their own; the difference comes from the ecosystem built around them. A roleplay server with a framework core, inventory, phone, targeting system, garages and jobs easily reaches 150-250 resources. Prebuilt server packs often go even higher, because dozens of unused scripts come enabled by default.
Practical tips:
- Disable scripts you do not use. Every resource with an ensure line in
server.cfgcosts memory and CPU time, even if no player ever uses it. - Do not run two scripts that do the same job. Two inventories, two phones or two targeting systems mean both conflicts and unnecessary load.
- Review your stream packs. Hundreds of addon vehicles and MLOs lengthen server startup and increase the data players download on first connect.
- Prefer up-to-date libraries. Actively maintained libraries like oxmysql and ox_lib are usually more efficient than their older alternatives.
This cleanup often gains you more than upgrading to a bigger plan; trim first, then measure.
Common sizing mistakes
- Looking only at slot count: running a prebuilt pack with 300 resources at 32 slots can need more RAM than a lean 64-slot server.
- Filling RAM to the limit: once memory goes above 90 percent, the system falls back to swap and the server starts stuttering. Leave headroom.
- Ignoring slow disks: disk speed directly affects startup time while the database and hundreds of streamed files are read. That is why NVMe storage matters.
- Trying to fix script problems with hardware: a broken loop ruins the tick on any plan. Measure first, then scale up.
Which plan should you start with?
For a new roleplay server targeting up to 64 slots, OB-FIVEM-4, with 4 CPUs, 8 GB DDR5 RAM and a 70 GB NVMe disk, is a balanced start. For communities above 100 slots running heavy scripts and many MLOs, OB-FIVEM-6, with 6 CPUs and 16 GB DDR5 RAM, is a better fit. To compare all options side by side, browse the OyunBulut FiveM server plans; plans are hosted in Istanbul, with DDoS protection and automatic setup. If you are not sure which plan suits you, just send your resource list and target slot count in a support ticket.
Frequently asked questions
Is 4 GB of RAM enough for a FiveM server?
4 GB can be enough for a 32-slot server with few scripts. For an ESX or QBCore roleplay server with more than 100 resources, starting with 6-8 GB is safer.
How many cores does a FiveM server use?
The main server thread that runs the game logic runs on a single core, while network sync, the database and txAdmin use the other cores. That is why 4-6 fast cores are ideal for most servers.
How much more RAM do I need when I increase slots?
There is no fixed multiplier; the increase depends mostly on the script load and entity count players generate. A reasonable rule is to plan at least 50 percent more RAM when you double your slots.
Should the database run on the same server?
For most servers under 200 slots, running MariaDB on the same machine lowers latency and is enough. At very high slot counts with heavy query load, a separate database server is worth considering.
My server is lagging. Is it RAM or CPU?
If you see server thread hitch warning in the console, the cause is usually CPU time or a heavy script. When RAM runs out, memory usage hits the limit and the server falls back to swap; the txAdmin dashboard helps you tell the two apart.