Extremely high network receive values (1000 KB/s) and high ping (5000+) from pathfinder replication

I do have to agree with you, this has been a suspicion of mine also - because the ridiculous amounts of 80k indicates more towards a packet buildup in the queue rather than network lag

Even with remote events, ping and network recv. is still very high
image

Then you should try and do what Judgy_Oreo suggested and see if the server freezes at some point

1 Like

I’m having the same issue with server kb/s, it just has extreme spikes that makes the whole server freezes for a bit then it goes down.

I haven’t found a solution yet, I have tried consulting the micro-profiler, but with no result.


1 Like

Why not send an array of each position?

--...
:Fire({
  Vector3.new(-1003.85, 0.65, 326.75),
  Vector3.new(-1007.85, 0.65, 326.80),
})

Obviously these are approximations, but why send a whole encoded json when the client could just loop through these?

Oh, my question here would be why a ValueBase? I don’t understand your game’s internals but in this case a remote seems a lot better than a valuebase.

You even read our conversation? We went through this already

Already have, I’m thinking of why this could happen aswell. I also asked why he’s using value bases.

this also happened with mine I used a lot LESS of loops and a lot LESS remote events to solve it I used strings to determine specific tasks for one remote event that helps lower down lag another way is to lower down use of remote events that may or may not solve the problem

this sounds worse than his current problem

how does it sounds worse? mind giving me a reason

using “a lot of remote events and a lot of loops” is not better than this, it’s still very memory costly, the only thing that would make sense would be the server freezing and sending a ton of packets

i said NOT using alot of loops and remote events bruh

wait oop sorry haha i forgot to add LESS sorry lol

oh, misread that then, still, he tried using remote events and it didn’t improve it, let’s just end this here until Alvin comes back with new info

yea and again sorry for the misunderstanding lol

1 Like

My customer manager script (which is what requires the pathfinder module) does sometimes show high usage, activity of 9% at times and also server memory does rise to high levels over time.

1 Like

Well, you’re the only one that has access to the script so there isn’t much we can help with from this point onwards unless you share it with us.

I suggest looking to see if things fire more times than expected, I’m somewhat dumb so I can’t think of anything else lol

Have you thought of rounding the values to some decimal point(let’s say maximum 2 decimal digits)? That way the string which get’s encoded/decoded and the client receives will be much smaller.

Did you manage to fix it? Seen no update for 21 hours so I’m curious about what happened

Hi everyone, thought I’d give an update!

I found the cause of this problem. When I was developing my A* pathfinder I generated parts for each node to visualise paths. That meant hundreds of parts were being created on the server for each path, and being replicated to the client. I had set these parts to be invisible, and although I did delete them once the path had been created, they would still replicate to the client and cause a huge buildup of packets whilst the path was being generated.

So, for 10 NPCs, that would mean a huge amount of parts per pathfinding call. All I had to do was remove the code that generates these parts as they’re no longer needed. The game feels MUCH more responsive and faster now that I removed this code.

So, if anyone else has a similar problem, just keep checking your scripts for any parts or objects which may be replicating to the client every few seconds.

Big thanks to everyone who gave their help and support :slight_smile:

15 Likes