← Free tools

Resmon and the profiler, explained

Every script on a FiveM server costs time, either on each player's game or on the server, and sometimes both. Resmon tells you which resource costs what. The profiler tells you why. This page covers how to read both.

Resmon on a player's game

Open the F8 console and type resmon 1 (resmon 0 closes it). One row per resource:

What a good number looks like

A frame at 60 FPS is 16.7 ms; at 144 FPS it is 6.9 ms. Everything, the game included, has to fit in that.

Read it at rest: standing still, no menus open, away from busy areas. A resource that only costs time when you use it is doing its job. One that costs time while nothing happens is wasting every player's frames.

The usual causes

The fix is almost always the same: sleep longer when nothing is near (Wait(500) far away, Wait(0) only when close), and stop loops that have nothing to do.

The server: profiler

The server has no player-facing frame rate, but every server frame has to finish quickly or everyone sees it as lag and desync. A resource that takes a few milliseconds of a server frame, now and then, is a resource worth reading.

In the server console (txAdmin's live console works):

profiler record 500 profiler view

profiler record 500 records the next 500 frames. profiler view prints a link; open it in Chrome to see each frame and what ran in it. Look for frames that are much longer than the rest, and which resource's events or threads fill them. The same commands work in a player's F8 console to profile their game.

The usual causes on the server

Sculk's own cost

Sculk publishes what it costs per release, measured on ESX, QBCore and Qbox test cities, with how it was measured: see Performance. Run sculk doctor in your server console to see its health and performance rows on your own server.