Long server frame times on initial replication

We’re noticing a trend where the initial streaming replication eats up a lot of frame time on the server.
This is an old issue, not caused by recent changes.

The result of these long frame times are sudden lag/ping spikes (of course! server drops to maybe 5 fps)
1768522141_fVtORUOUHB

I’m not sure about repro steps here, and I’m not sure what kind of clients are connecting which are causing these spikes (fast/slow connection…, high/low latency…).
I would expect this to be reproduceable in a private server.

I can imagine this issue being the result of a lack of throttling. I would prefer if the client had to wait longer to join, than to affect server performance.

This may be a duplicate of Large Lag Spike on Player Join, but not sure as they don’t use streaming.

Please provide a repro place that demonstrates this issue.

Are you using persistent models with large numbers of instances in them by any chance?

Will try to get one. Working on it! Able to repro in 2 player priv server

Many persistent models, re descendant count unsure.

@catinpsyop Also, please share the link of your experience, thanks!

rainy valley!
Feel free to enable testing/debug flags, is our staging/testing experience

@dear_gee @CorvusCoraxx Private Information

Published that place, joined on my m4 mac over wifi, no software like clumsy used

@catinpsyop Thanks! Did you happen to find a way to repro the issue with this place? When would it happen more likely? When the UI boxes are sill visible after joining the game? Any specific location in the map? Any sequence of actions?

I would simply just join on my mac, and try to time the microprofile just right.
Issue happens immediately on join, guessing before or shortly after the Roblox loading GUI disappears

I could try to make a video of me reproducing if that helps!

It would be helpful if could do this and share the video with us. Thanks!

On it! Check private information

@catinpsyop Thanks for sharing more details on this.

After investigating the issue, I can tell you that the server lag is not caused by a specific bug, but by a current limitation of the system on handling games that use Persistent models, heavily.

In the place file you shared, there are a very very large number of instances (100k+) under Persistent models. All of these instances must be replicated when a client joins the game.
On high-end devices with good network connectivity, the server attempts to send a large portion of this data at once, which can temporarily saturate the server and cause noticeable lag. This is a known limitation, and we are actively working on a more robust solution to handle scenarios like this.

In the meantime, we recommend reducing the use of persistency in your game design, as outlined here: https://create.roblox.com/docs/workspace/streaming#persistent

This should improve server performance and reduce the hiccups observed when new clients join. Let us know if you have any questions about these recommendations.