We have identified a significant increase in dedicated server average tick time related to vehicle spawning and/or vehicle persistence loading.
Our server normally operates at approximately 15 ms average tick time when vehicle spawning is disabled.
However, enabling vehicle spawning causes a significant performance degradation:
Vehicle spawning disabled: approximately 15 ms.
Partial vehicle spawning: approximately 24 ms.
Full vehicle spawning: approximately 30 ms.
Full spawning with modded vehicles replacing vanilla vehicles (same quantity): approximately 30 ms.
The most interesting finding occurred during a separate test:
With vehicle spawning disabled, we manually spawned approximately 600 vehicles while the server was running. The average tick time remained stable at approximately 15 ms after 15-20 mins observation.
After restarting the server, the same vehicles were loaded from persistence, and the average tick time increased to approximately 31 ms.
This suggests that the performance issue may be related to vehicle initialization or restoration from persistence during server startup, rather than simply the number of vehicles present in the world.
We would like to investigate whether this behaviour is related to vehicle persistence, initialization, physics processing, terrain ? But at this step, we can't do anymore.