Understanding the technical limits of FiveM is crucial for server stability and performance.
The limits depend heavily on whether OneSync is enabled (which is mandatory for modern servers).
| Feature | No OneSync | OneSync Legacy | OneSync Infinity |
|---|---|---|---|
| Max Players | 32 | 128 | 2048 |
| Entity Awareness | Global | Global | Distance Culling (Scope) |
| Server Logic | Limited | Full | Full |
GTA V has hard limits on how many entities of certain types can exist. OneSync Infinity helps bypass this by only telling clients about entities near them.
Note: With OneSync Infinity, the server can track up to 65,535 entities, but a single client can only “see” (have loaded) the amounts listed above.
.ytd (texture) files under 16MB (ideally <10MB)..yDR (model) files.SetResourceKvp limits are typically around a few MBs per resource. Use a database (SQL) for real data.Entity.state) are efficient but shouldn’t be used for high-frequency data (like RPM gauges updating 60 times a second).F8) and type resmon 1.
profiler command in the server console to debug slow server frames.-1 (all players).SetModelAsNoLongerNeeded) after spawning to free memory.QBCore.Players. Heavy usage can increase server RAM.MySQL.Sync calls block the main thread. Use MySQL.Async or await MySQL.query.