• Advertisement
Sign in to follow this  

Slow seeming Replication and how to accurately test networking latency

This topic is 767 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

Iv'e just done a first networking test with my Unreal game-to-be, to see how my replication setups work and see what kind of lag I get.
My test was with my brother in Sweden and the ping time (that's roundtrip right?) is about 180ms.

We both 'video' recorded our sessions and used our computer clocks synced with atomic clock using this software,
http://www.worldtimeserver.com/atomic-clock/

When I then line up our recorded sessions and compare when the replicated movements happen they look really laggy, even after taking the ping times into account.
I get around 500ms of movement/replication latencey. I expected to get much closer to half the ping time, as it should be a one way trip for the movement replication. (me as listen server executing the moves)



So I have a few questions for anyone who has done similar testing,

1. How can I accurately measure actual lag? Is my method good with the atomic synced clocks or is there something more reliable?

2. When playing locally from the Unreal editor with two player instance there is no perceptible lag, should I assume Unreal does not add much lag at all ontop of travel time?

3. Any suggestions for why I might be getting this laggy result over network, but not locally?


Cheers
Fred

Share this post


Link to post
Share on other sites
Advertisement
Unfortunately, I don't think you can assume very many things when it comes to networking :-(

It may be, for example, that there is some "magic" time below which Unreal doesn't add much latency, but the more time you add, the more latency it adds.

It may also be that it adds de-jitter buffer, and if you've seen any one packet with high jitter, it may delay all packets to compensate (at least for a while.)

Using atomic clocks (or just plain GPS clocks) and physical distance is a reasonable way to test. An easier way to test is to use a synthetic network simulator. You can either run one separately from the client/server machines, or you can run it on one of the two machines themselves. This lets you test with client and server in the same room, and still set parameters for network delay, jitter, loss, etc.

Share this post


Link to post
Share on other sites
I would expect the lag to be around 1/2 the rtt time, up to the full RTT time in some condition. Not 1/2 a second.

What are the send rates? You also have to account for that. Usually, around 20 FPS, which will add a ballpark 50 millisecond S of perceived lag (I.E on top of the RTT measured at the socket).

Maybe Unreal is throttling your traffic internally to some ridiculously low level, meaning that the send rates and update rates will decrease to reduce bandwidth usage.

I still use NEWT for cheap internet simulation. It's an old XBox 360 SDK tool. Can be hard to find, but it's stand alone.

Can also use wireshark to analyse your traffic (measure bandwidth, and do all sorts of analysis).

Share this post


Link to post
Share on other sites

Thanks guys for the pointers.  It is probably time for me soon to get that second computer to test with.

I'll check the send rates I should be able to do at least 60fps using my monitor, the final thing needs to be 90fps as it is VR for the Oculus Rift.

 

NEWT do you think that is the same as this software or something else?

http://www.komodolabs.com/network-inventory/

 

I'll take a look at wireshark too.

 

Seems like I have to get serious with this stuff! :)

 

 

Cheers
Fred

Share this post


Link to post
Share on other sites

Thanks guys for the pointers.  It is probably time for me soon to get that second computer to test with.

I'll check the send rates I should be able to do at least 60fps using my monitor, the final thing needs to be 90fps as it is VR for the Oculus Rift.

 

NEWT do you think that is the same as this software or something else?

http://www.komodolabs.com/network-inventory/

 

I'll take a look at wireshark too.

 

Seems like I have to get serious with this stuff! smile.png

 

 

Cheers
Fred

What?  What does network IO rate have to do with rendering frame rate?  You are supposed to decouple those.  A certain number of times a second your network code gives you the state of everything, then you are supposed to interpolate between states for each rendering frame.  The network IO rate can be anything, it's completely separate from frame rate.

Share this post


Link to post
Share on other sites

What does network IO rate have to do with rendering frame rate? You are supposed to decouple those.


He's using Unreal Engine. It hides those things from you. It also does not decouple physics simulation rate from rendering frame rate, so it can turn into rubbery goo when frame rate gyrates :-( Edited by hplus0603

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement