Total Data KB/s spikes when player joins

Hello,

I am currently trying to fix major lag spikes when a player joins the game, and I noticed that when the player joins, the total data kb/s goes from 13 to about 150 after the player joins, is that too much? I also noticed that Data throughput ratio goes from about 7 to 31 when the player joins, both going down back pretty much instantly, but I am wondering if this could be causing the lag.

Any help is appreciated!

Pretty normal. I just observed the same result on an empty baseplate.

1 Like

Any idea what could be causing this lag? I don’t see anything out of the blew on anything, and I am confused why. If there are about 15 players in the server, it’s fine, but once it reaches roughly about 40 (server should be able to hold 100), the lag starts to increase and you can tell

There are a lot of loading/network calls that need to be done whenever a player initially joins. Additionally, the player scripts and your game logic need to be handling each player. Which increases the server load.

You may have a script that uses too much data for a single player, which might cause the issue you’re describing. I would try to monitor script activity and check to see if the server is making a lot of HTTP requests whenever a player joins.

How did you do your testing with 40 players? Was this in a studio server or a live game?

The test was in a live game. The player doesn’t even use HTTP service once on joining (checked with Find All), they’re all when the server first opens up. The only things HTTP is being used for is to get a online database (every 60 seconds), a Discord API, retrieve server info and generate GUIDs. Is there another tab on the Developer Console that could tell me info like this to see what scripts/modules or functions are spiking when a player joins, etc.

‘Scripts’ is the tab you’re looking for, it will show the script activity and what % it’s running at. Also, there’s always going to be an increase in data sent whenever a player joins the game because they need to receive a copy of the datamodel. If the map is really large and you aren’t using StreamingEnabled that might definitely be more noticeable.

My own game has spikes and the server ping even seems to increase to 300-500 but then becomes stable within a second or so.

I believe it’s just replication of the map since I don’t use StreamingEnabled and we have a ton of instances. Might be similar to what you’re observing.

I’ve actually already tried using StreamingEnabled and there is no difference at all in performance, actually seemed more laggy and the graphics didn’t look good at all. But besides that, I am aware the game will lag when a player joins, but the game shouldn’t be lagging at 40 players.

Here is the scripts when a player joins:

What I noticed during testing, is there there are random spikes of players just lagging, their character just lags after walking for a second (at random times)

If the issue is ongoing and isn’t just whenever a player joins the game, you might have a script that is too taxing on the server. I would monitor your script activity and see if the rate increases based on the number of players.

I’m going to host a stress test and I will monitor the scripts being used while the game is going under a lot of lag.

So we conducted multiple tests, in the first video it’s in the main game with the map, in the second clip it’s a testing with 50 players near the end on the testing game which has no map, and the third clip is another game which has 80 players currently in the server and no lag at all but alot of spikes in the console, something to compare too.

Clip 1: https://www.youtube.com/watch?v=1hCYMPuFTZw&ab_channel=iTzEmail
Clip 2: https://www.youtube.com/watch?v=2IMyhTCliY4&ab_channel=iTzEmail
Clip 3: https://www.youtube.com/watch?v=iZRHnYbdRq0&ab_channel=iTzEmail

It’s fairly likely that’s just because all the studio-made GUI instances and the vast number of core guis are being created when the player joins. All of these things are replicated to each client when another player joins. 150kbps is not a lot, so it shouldn’t be a major cause for concern.

1 Like