Guide · Updated 14 Sep 2026

RedM server performance: where the lag comes from and how to get it back

"The server is lagging" describes four different problems, and the fix for one makes another worse. Before changing anything, work out which one you have: a client burning frames on a script, a world filling up with entities, a database doing too much, or a server process that is actually out of headroom. This guide takes them in the order they usually turn out to be the cause, with the settings to change on the scripts that matter.

Step 0: measure

Two tools, both already installed.

  • resmon, typed in the F8 console on a client, lists every resource with its CPU time per frame and memory. Sort by CPU. This is where client lag shows up, and it points at one script by name.
  • txAdmin's dashboard shows server thread usage, player count and tick time. Server-side problems show here as a rising tick time; if it is flat and players still report stutter, the problem is on the client.

Write the numbers down with the player count. A change you cannot measure is a change you cannot keep.

Cause 1: a client script in a tight loop

The most common cause, and the one with few players. A script that checks something every frame, distance to every prompt, every player's position, whether a key is held, costs a slice of every frame on every client. Ten of them and the game stutters at 20 players. In resmon they sit above 0.10 ms while nothing is happening.

What to do: the script's config often has an interval. Raise it. Admin Blips (Free) updates every player's blip every 500 ms by default; that is fine for admins but there is no reason to run it at 100. Scripts with no interval and a high idle cost are worth an author's attention, or a replacement.

Cause 2: entity build-up

Dead horses in the road, wagons abandoned at a station, props a script spawned and never deleted. Each one is simulated by every client near it, and RDR2 does not clean up as fast as a busy server makes mess. This is the cause of "it was fine at restart and awful three hours later".

What to do: schedule cleanup. Poggy Util (Free) has object removal on a timer for the models you list, and a dead entity cleanup that clears dead NPCs, horses, animals and wagons, with an admin command to run it now. The cleanup starts switched off; turn it on and set the interval to fifteen or twenty minutes. Restarts every six to eight hours are the other half of the answer, and txAdmin schedules them.

Cause 3: NPC systems tuned too high

Any script that spawns NPCs with behaviour, witnesses, ambient law, bandits, adds entities that clients simulate and events the server relays. They are usually fine at their defaults and awful when an owner turns every number up. Witnesses (from $6.99/mo) caps the number of active witnesses and the search radius for this reason, has cooldowns per crime, and lets you blacklist towns like Sisika and Van Horn so prison roleplay and warzones stay quiet. Keep the caps, and lower the trigger chances before you raise the radius.

Cause 4: the database

Reads are rarely the problem; writes and bad queries are. A script that saves a character every few seconds, or one that runs a query over a table that has grown for a year on a column with no index. oxmysql logs slow queries; a query that takes more than a few hundred milliseconds during play is worth finding the owner of. Scripts that create their own tables on start, as every Poggy script does through Poggy Core (Free), ship the indexes with them; hand-imported SQL from an older release may not have.

Two habits: keep the database on the same machine as the server, or on the same network with a low ping, and back it up nightly so a bloated log table can be trimmed without fear. See how to back up a RedM server.

Cause 5: the server itself

Last because it is rarest. If tick time on the dashboard climbs with player count and stays high, the machine is short of a fast core (RedM's server thread is single-core bound) or short of memory. The fix is hardware, but check the four causes above first: a server that is doing three hours of dead-entity bookkeeping looks like it needs a better CPU.

Settings worth changing today

WhereSettingSuggestion
txAdminScheduled restartsEvery 6 to 8 hours, announced in advance
Poggy UtilDead entity cleanupOn, every 15 to 20 minutes
Poggy UtilObject removalOn, with the prop models that block your roads
WitnessesMax active witnesses, search radiusLeave at default; lower trigger chances instead of raising radius
Admin BlipsUpdate interval500 ms or slower
Any scriptDebug loggingOff. Console spam costs more than it looks

What does not help

Raising the server's tick rate, adding "optimization" resources that promise to fix everything, or moving to a bigger host without measuring. Each has made a server worse that we have been asked to look at. Measure, find the one script or the pile of entities, and fix that.

Questions this guide answers

Why is my RedM server lagging with few players?

With few players it is almost never the server. It is a client-side script running a tight loop every frame, or a build-up of entities nobody cleaned up. Open resmon on a client and sort by CPU; the top line is your answer.

What is a good resmon value for a RedM script?

Idle scripts should sit at 0.00 to 0.02 ms. Anything above 0.10 ms while nothing is happening is a script polling every frame and worth asking the author about. A script briefly at 0.5 ms while its menu is open is fine.

Does the database cause lag?

On RedM, rarely for reads, often for writes done badly: a script that saves a character every second, or a query on a column with no index over a table that grew for a year. oxmysql reports slow queries; look there before blaming the host.

How many NPCs is too many?

Every NPC system has a cap for a reason. Witness scripts, ambient traffic and spawned clerks all add entities that every nearby client has to simulate. Keep witness and NPC caps at their defaults until you have measured.

Scripts mentioned in this guide

Whole store →
Poggy Util — Free RedM Server Utilities Pack
Free RedM Server Utilities Pack

Poggy Util

Eleven optional server utilities in one resource, from area of play and duty count to unstuck, weapon jams, armor and a help menu, each with its own switch.

PriceFree
Witnesses — RedM Witness System
RedM Witness System

Witnesses

NPC witnesses see crimes, flee the scene and report them to on-duty law, with blips and alerts routed to your police or sheriff jobs.

From$6.99
Admin Blips — Free RedM Admin Blips Script
Free RedM Admin Blips Script

Admin Blips

Shows every player's live position on the map for admins, with server ID and character name, toggled with one command.

PriceFree

Best RedM Scripts for a New Server

Economy, law, activities, roleplay tools and admin utilities. What to run, what it costs, and where the free options are.

Read the guide →

VORP vs RSG Core vs QBCore for RedM

Script availability, structure and inventory for each framework, and what "runs on VORP, RSG and QBCore" actually means.

Read the guide →

How to Install a RedM Script

Download, resources folder, SQL, start order, config and the escrow licence check. Then the five common errors.

Read the guide →

Free RedM Scripts Worth Installing

Seven free scripts, what each one does, what it needs, and what it does not do.

Read the guide →

How to Update RedM Scripts Without Breaking Your Config

The manual routine that keeps your config safe, and the automatic route that removes the routine.

Read the guide →

RedM Server Economy: How to Balance Money, Jobs and Shops

Sources, sinks, player shops, auctions, jobs and a stipend. The model, the starting numbers and the scripts.

Read the guide →

How to Set Up Jobs on a RedM Server

Job names and grades, duty, several jobs per character, badges, and making every script agree.

Read the guide →

How to Back Up a RedM Server

The database, resources, configs, licence files and txData. How to automate it, and how to test the restore.

Read the guide →

Cfx Escrow Explained for RedM Server Owners

Which files are encrypted, what you can still change, the licence file, and the error everyone hits once.

Read the guide →

Using Poggy Core in Your Own RedM Scripts

The free framework layer under your own resources: install, first script, menus, storage, jobs, standalone mode, diagnostics.

Read the guide →
Return to Store