Improbable Icon

Latency between two clients seeing each other's updates seems high?

general

#1

Hello fine SpatialOS folks,

We’re investigating SpatialOS for our upcoming game project that’s in the vein of a next-gen .io game. Think 3d/2d top down with lots of players interacting in real time combat. We were running the hello world demo, and were a bit surprised that when connected to US servers that there was up to 2 seconds of lag between when one client’s change of direction would be received by the second client. I’d say it took about 1-2 seconds. The concern here would be that this amount of latency would make a real time combat game not awesome.

I don’t think that there would be anything inherently about the SpatialOS architecture that would lead to this amount of latency assuming we had good ping to the servers. Is this just an issue with the demo application or bandwidth saturation? How would SpatialOS’s latency compare to say that of a more traditional authoritative server model? The same?

Thanks for any insights!
Curt


#3

Hi Curt,

That definitely sounds strange. As you say, there’s no reason for the latency to be any higher than a traditional server architecture.

Depending on how large a deployment you’re running, it’s possible you’re overloading the unity workers running on the server. You can check this by looking at the metrics page for your deployment - the front page of the metrics shows the engine load, or you can go to the ‘workers’ metrics page in the top right and look at the FPS of the workers there. That page also has a ‘Bridge to engine Roundtrip latency’ metric, which should give you a good idea of the latency to clients/fsims.

But yes, it certainly shouldn’t be that high. You could also try deploying to an eu server by adding --cluster=eu4-prod when you launch.

Hope that helps!
Chris


#4

I’ll look into the metrics. It’s literally the hello world sample code so I
doubt it was written to ensure low latency and cover all sorts of
production related issues, it was just surprising that the latency was so
high. (We’re in the western US, so I doubt that an EU cluster would help :wink:

Thanks,
Curt


#5

In Eu and finding this on eu4-prod, with basic wizards demo, 1-2 second latency on UnityWorkers… seems rather long, sorta putting me off, if this is the norm.