Use resmon in the FiveM client
resmon opens the client resource monitor, which reports CPU and memory usage per resource. Run it in the connected FiveM client’s F8 console, not in server.cfg or the txAdmin server console. It does not measure every player’s machine or replace server profiling.
Open and close the monitor
In F8, enter:
resmon trueClose it with:
resmon falseThe official console reference specifies this boolean syntax. If you see Access denied for command resmon, check the same reference’s Developer commands section. Its documented stable-channel development launch argument is +set moo 31337; apply it to your own development client’s launch shortcut and restart that client. The separate developer true command is not a substitute for those launch requirements. Beta/Latest channels can be unstable and are not necessary just to follow this guide.
Compare one reproducible action
- Join a private test server and wait for initial resource/asset loading to finish.
- Record the client build, FXServer artifact, resource revision, location and approximate player count.
- Observe the resource while idle, then repeat the same action, such as opening a menu several times.
- Note which resource’s CPU or memory changes, whether the change persists after closing the feature, and whether the issue occurs only on the first use.
- Record a client profiler capture to locate the work within that resource before changing code.
- Change one thing, then repeat the same idle/action sequence under equivalent conditions. Check that controls, UI and gameplay still work.
A resource with low sampled CPU can still have a short expensive spike. A growing memory reading is a reason to investigate allocation/lifetime, not proof of a leak from one screenshot. Save a sequence of observations rather than claiming an improvement from a single frame.
Client stutter or server hitch warning?
| Symptom | Next measurement | What it does not prove |
|---|---|---|
| One player’s game stutters during a menu action | Client resmon, then client profiler | That the server CPU is overloaded |
| FXServer logs a recurring thread hitch | Server profiler record 500 during a reproduction | That every hitch is a database problem |
| Quiet script timings but slow rendering/loading | Client diagnostics and asset investigation | That increasing script timer waits will fix it |
| Many players stall during the same server action | Server timeline plus host and SQL observations | That a client resource percentage explains the server pause |
For server hitches, capture the first warning’s timestamp, reproduce the action and inspect the server process timeline. Correlate slow queries and host load without treating coincidence as causation. Do not stop arbitrary framework resources on a populated production server to guess which is responsible.
Set a workload-specific budget
There is no universal “under 16 ms”, “under 2 GB” or CPU-percentage threshold that makes every FiveM resource healthy. Frame time for a whole rendered frame, sampled per-resource CPU time and server tick work are different measurements. Define a budget for the actual feature and hardware, record the measurement method, repeat it, and keep the before/after captures.
Continue with performance diagnosis, the profiler workflow, Lua scheduling and repeatable performance tests.