PiTyUs.Hire me

Engineering

resmon: finding the resource that is eating your frames

How to use the FiveM resource monitor (resmon): opening it in F8, what CPU msec, time % and memory mean, what good numbers look like, how to find a bad resource, and what to fix once you have found it.

Updated 11 min readBy PiTyUs · FiveM developer

Overview

When players say the server “lags”, they usually mean their frame rate drops — and on the client that is very often one or two resources doing too much work every frame. The resource monitor, resmon, shows exactly how much time each resource takes. Learning to read it turns vague complaints into a specific file you can fix.

Opening resmon

  1. Join the server and press F8 to open the client console.
  2. Type resmon 1 and press Enter. The monitor appears over the game.
  3. Close the console with F8; the monitor stays until you run resmon 0.

What the columns mean

ColumnMeaning
ResourceThe resource name
CPU msecScript time per frame, averaged — the number that matters most
Time %Share of total frame time
MemoryScript memory used by the resource’s runtime
StreamingMemory used by assets the resource streams

Remember the budget: at 60 fps a frame is 16.7 ms for everything — rendering, physics and every script. A resource using 2 ms is taking an eighth of the entire frame on its own.

What good numbers look like

CPU msec (idle)Verdict
0.00 – 0.02Excellent — the resource sleeps when it has nothing to do
0.03 – 0.10Fine for UI-heavy resources such as a HUD
0.10 – 0.50Worth checking; often a loop that could sleep longer
> 0.50 constantlyA problem — look at its loops now
Rules of thumb for idle numbers on a typical client; spikes during actions are normal.

01Finding the culprit

  1. Stand somewhere neutral and note the baseline: everything should be near zero.
  2. Reproduce the lag — drive through the city, open the phone, stand near the job center.
  3. Watch which resource’s CPU msec rises and stays up.
  4. Stop that resource (stop name in the server console, on a test server) and confirm the frame rate recovers.
  5. Open its client files and look for Wait(0) loops that do work regardless of distance.

The server side

resmon measures the client. Server-side cost shows up as “server thread hitch” warnings and is measured with the server profiler and txAdmin’s performance charts — see the profiler guide.

Frequently asked questions

How do I open resmon in FiveM?

Press F8 and type resmon 1. Type resmon 0 to close it.

What is a good resmon value?

Idle resources should use about 0.00–0.02 ms. Constant values above roughly 0.5 ms point to a problem.

Does resmon show server performance?

No, it shows the client. Use the server profiler and txAdmin for server-side performance.

Why is my HUD using 0.1 ms?

HUDs update often, so a little is normal. If it is much higher, it probably updates every frame when it only needs to update a few times a second.

Need this built, not just explained?

Ten years of FiveM work, from Lua to NUI

Custom resources, React NUI, ESX / QBCore / Qbox integration, OneSync performance audits and security reviews — plus the websites and SEO around your server brand.

Related guides