01
What uses memory
A Garry's Mod server keeps in memory everything it loaded at startup and everything that exists in the game. In order of importance:
- the Workshop collection and addons: maps, models and Lua code stay loaded as long as the server runs, whether they are used or not;
- addon Lua code and its data: inventories, money printers, job systems, tables that grow over the hours;
- entities and props: every placed object is tracked by the server and computed by the physics engine;
- the map: a large roleplay map weighs more than a small building map;
- connected players: each one adds their data, their props and their network traffic.
So the gamemode matters less than what you install around it. A TTT or Prop Hunt server with a few addons stays light, because the map is reset every round. A DarkRP server with hundreds of Workshop items and dozens of scripts is the most demanding case.
02
Guidelines by use
The official Garry's Mod wiki (wiki.facepunch.com) explains how to install and run the server, but gives no memory figure. The guidelines below are our estimates, the ones shown on our plans; they vary a lot with addons.
- Among friends, Sandbox, TTT or Prop Hunt, about 8 players: 4 GB.
- Small community, about 16 players, a reasonable Workshop collection: 8 GB.
- DarkRP server of about 32 players, with a large collection: 16 GB.
- Large community of 48 to 64 players: 24 to 32 GB, provided the server runs in 64-bit (see below).
To weigh these guidelines against the processor and disk, try the game server calculator. Before adding memory, trim the collection: it is often the most effective way to use less (see Workshop addons).
03
32 or 64-bit: the limit to check
A 32-bit program cannot address more than 4 GB of memory, however much memory the machine has. The Garry's Mod server was a 32-bit program for a long time; the official wiki describes an x86-64 branch, which provides a 64-bit server and installs with SteamCMD:
steamcmd +login anonymous +force_install_dir ~/gmodds +app_update 4020 -beta x86-64 validate +quit
To find out which one you are running, type in the server console:
lua_run print(jit.arch)
x86 means a 32-bit server, x64 a 64-bit server. In 32-bit, a 16 GB plan adds nothing to the memory of the server process itself: the 64-bit branch is what lets you use it. Binary modules (gmsv_… files in the lua/bin folder) must then exist in a 64-bit version; otherwise the addon that depends on them no longer loads. To go back to the stable branch, the wiki gives -beta public: simply removing -beta is not enough.
04
Measuring usage and spotting a shortage
Measure at peak hours, not on an empty server: a server with no players goes into hibernation and does not reflect the real load.
- Process memory: on a VPS,
htop shows the memory the server really occupies (RES column). Note it every day at the same time.
- Lua memory:
lua_run print(collectgarbage("count")) shows, in kilobytes, the memory used by addon code. If it climbs day after day without coming down, an addon keeps data without releasing it.
- Entities:
lua_run print(ents.GetCount()) counts the objects on the map; a number that keeps rising points to an addon that creates them without removing them.
Signs of a real memory shortage: crashes with a memory error in the console (for example not enough memory), crashes that recur when the server is full or after several days without a restart, or memory approaching the ceiling, 4 GB in 32-bit or the plan's memory in 64-bit. A leak is fixed by finding the addon (the guide GMod server errors helps read the console); meanwhile, a daily restart at off-peak hours limits the damage.
05
Other limits: processor, tick and disk
A lagging server is rarely short of memory. The server runs physics and Lua code on a single core: the speed of that core sets how many players and props it can handle. The tickrate (66.6666 by default) multiplies that work: raising it loads the processor, not memory. Causes and fixes are covered in optimising a lagging GMod server.
The disk comes into play at startup, when the server downloads and reads the Workshop collection, and at every map change: NVMe storage shortens these times. Players' first load depends on the size of the collection and on how content is served to them (see FastDL for GMod).
06
Choosing your plan at CloudFive
Our Garry's Mod hosting plans, from €2 per month, all run on AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage, in France on our own network (AS218808). Player counts are indicative estimates:
- Starter, 4 GB: about 8 players;
- Essentiel, 8 GB: about 16 players;
- Avantage, 16 GB: about 32 players;
- Performant, 24 GB: about 48 players;
- Expert, 32 GB: about 64 players;
- Ultime, for the largest communities.
Start with the plan that matches your use, measure for a week or two, then switch plans from the customer area manager.cloudfive.fr if needed, at any time. DarkRP, the Workshop collection and ULX install in one click (see creating a DarkRP server); the console, SFTP file access and backups are in the customer area. Anti-DDoS Premium is included, with a profile specific to the game. Monthly, with no commitment, and support in French 7 days a week.
07
Frequently asked questions
How much RAM for a 10-player Garry's Mod server?
For a Sandbox, TTT or Prop Hunt game with few addons, 4 to 8 GB is enough as a rough guide. With DarkRP and a large Workshop collection, plan for 8 GB or more. The official wiki gives no figure: measure real usage at peak hours.
How much RAM for a DarkRP server?
It is the most demanding mode, because of the Workshop collection and the scripts. As a rough guide, plan for about 16 GB for around thirty players and 24 to 32 GB beyond 48 players, provided the server runs in 64-bit.
Can a GMod server use more than 4 GB of RAM?
Only in 64-bit. A 32-bit program cannot address more than 4 GB; the 64-bit server installs with SteamCMD's x86-64 branch (-beta x86-64). The command lua_run print(jit.arch) shows x86 for a 32-bit server and x64 for a 64-bit server.
How do I know if my GMod server is short of memory?
Watch the process memory at peak hours and Lua memory with lua_run print(collectgarbage("count")). Crashes with a memory error, or usage that rises every day without coming down, point to a shortage or to a leak caused by an addon.
Will adding RAM stop lag on GMod?
Rarely. Lag most often comes from the processor: the server computes physics and Lua code on a single core. First find the costly addon, limit props and check the tickrate before changing plans.