QBCore Frameworkqbcore.netCommunity docs
On this page

Updated 2026-10-02 · 3 min read

⚡ Performance Optimization

Start with a reproducible symptom, not a list of configuration tweaks. Record what players were doing, which resources were active, and whether the problem affected one client or the whole server.

Performance Overview

SymptomFirst investigationAvoid assuming
One player's frame rate dropsClient resource costs, rendering, and the location or interface involvedThat the server needs more RAM
Several players experience a server hitchA server-side profile captured during the hitchThat every installed script is equally responsible
A purchase or save takes too longThe request path, database queries, and external calls involvedThat a database setting alone is the cause
Players disconnect or have high latencyConnection logs and the affected network pathThat script CPU time explains every connection problem

Quick Performance Checklist

Save the FXServer build, resource revisions, relevant configuration, and steps that reproduce the issue. Keep the baseline capture. Make one change on a test server, repeat the workload, and compare the same measurements. Record regressions as well as improvements.

Do not remove an apparently idle resource without checking which other resources depend on it.

Performance Monitoring

Built-in FiveM Tools

The Cfx.re profiler guide documents profiling on both the server and client. Run the following in the server console to investigate server work, or the client F8 console to investigate that client:

profiler record 500
profiler status

After the capture has finished, save it:

profiler saveJSON qbcore-before.json

The frame count is a sample capture size, not a performance target. Capture the activity that triggers the problem; an idle capture may miss it. Use the profiler to identify the resource and call path responsible for the expensive work.

For a client-side overview, the Cfx.re console reference documents:

resmon true
resmon false

resmon runs in the client F8 console, not the server console. It is a developer command; access depends on the client mode. See Cfx.re's developer-command instructions if access is denied. Its readings are not a measurement of total server CPU or memory. See also Resmon Basics.

Common Performance Bottlenecks

Use the profile to choose where to inspect code. Look for work repeated more often than needed, large event payloads, repeated queries, or state that grows after reconnects and resource restarts. These are investigation leads, not proof of the cause.

For database work, keep the query, parameters with private values removed, execution plan, and observed duration. Compare behavior with representative data rather than adding indexes to every column.

Hardware Recommendations

There is no single hardware specification or player-count guarantee established by this guide. Size the server from measurements of your actual resource set and workload. A core count, clock speed, or advertised network rate alone does not establish capacity.

Before purchasing an upgrade, identify whether the limiting factor is resource execution, database work, memory pressure, storage, or the network. Save enough information to repeat the test on the proposed setup.

Performance Optimization Sections

Best Practices Summary

Keep a before-and-after capture with the resource revision and test steps. Reject a change that makes the measured number look better by breaking gameplay or skipping required work. Recheck the affected behavior after reconnects, restarts, and a representative period of use.

Found an issue in this guide?

Send the page URL, the affected example, and a source or reproduction to the site maintainer. For a server or resource problem, use the support guide.

On this page

Leonida RP server website built with RPWebsite
RPWebsite

Advertisement · RPWebsite

Want a website for your server?

Launch a site with live player status, rules, and a join button in minutes.

Build your website