Quantcast
Channel: [Don't Starve Together] General Discussion Latest Topics
Viewing all articles
Browse latest Browse all 26884

Lag Megathread ? (candidate)

$
0
0

Yet another post about lag. There should be a Lag Megathread, what do you think about it? I might update the post with the answer's comments if this is useful.

DST suffers a lot from lag, here I post many things I've learned regarding this issue, hoping to get some attention from the devs to address the issue. In my case, I can have 1-2 seconds of input lag, more often than not.

I'll mainly write about a dedicated server, with some non-dedicated comments.

There are two important factors to take into account regarding the server, bandwidth and machine power. Firstly, the server has to be powerful enough to serve a lot of information, specially if you use caves, since that's two servers. Secondly, the internet bandwidth of the server is crucial.

Specific comments to solutions/causes I've read:

* Port forwarding

DST uses UDP ports 10996-11000 by default. Forward those ports from the firewall/router _and_ the OS's firewall. Additionally, you can activate uPNP on the router so this forwarding is done automagically.

* Movement prediction

If movement prediction is on (default) the client guesses what's going on without awaiting confirmation from the server. Under lag conditions, this means you get hit when you where out of reach of the mob. If you switch it off, then you'll experience input lag, which means your character will take a moment to react to your movement and commands.

Deactivating movement prediction helps see how much lag you have. It also "helps" fighting mobs since you understand when you'll get hit and when not, and you can even account for the input lag (if it were constant, which it isnt).

* VPN

Connecting to the server through a VPN helped, although sometimes it doesn't make a difference. I was playing through a 4G router and that solved a dramatic lag issue(1-2 sec input lag). I've re-tried without it recently, and ran ok, while I had big lag again through VPN.

* Tick rate

(credit to @CarlZalph)

If your server can handle it the higher the tick rate both in CPU and network demands, then clients will experience lower latency of actions.

Neglecting a lot of small factors, and 15 is default, for 1-5 frames of delay:

15: {66.6ms, 133.3ms, 200ms, 266.6ms, 333.3ms}
30: {33.3ms, 66.6ms, 100ms, 133.3ms, 166.6ms}
60: {16.6ms, 33.3ms, 50ms, 66.6ms, 83.3ms}

(1000/tickrate)*N, where N is the number of frames of delay encountered. N varies depending on server choke and network delay, both adding together, and from what I can see it will always be at least 1.

Meaning all networked inputs are calculated on the server and sent back the results the following clock tick. Network delay is going to be your latency to the server doubled since DST uses a Client->Server->Client protocol of communication- the client waits for the server to tell the client what happened before proceeding.

* Map and minimap mod

Some people point to the minimap mod as a cause of lag or to the host's explored area. This is true for non-dedicated servers. I've read clients lagged when the host opens the map, thus if you have the minimap mod, clients would lag all the time. Apparently the map is very demanding.

* More lag the more we've explored

Another source of lag is caused by the amount of stuff dropped all across the world, since, I guess, it's more information to process and serve by the server. There's a mod called "no more lag" which cleans the dropped stuff. It could be a good idea to activate it every once and then, but it may remove the things you dropped on the ground.

* Disconnecting and re-connecting helps

* Rebooting helps (sometimes)

* Turn on triple-buffering on the NVidia settings for DST

This a weird advice I read somewhere. It helped once, but may just have been coincidence, I couldn't reproduce.

My server config & specs
====================

BW 150Mbps/15Mbps. 32gb RAM, Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz.

For DST, I've opened the ports 10996:11018, allowed ping on iptables. For steam I've opened ports 4380, 8766 and 27000:27030. Since my server uses a firewall, I also had to set a security policy rule to let the port forwarding thru.

Mods:
--#Global Position --#Health Info --#Display food values --#digable reeds --#extra equip slots --#no more respawn penalty
--#large chest --#craftable gears --#combined status --#custom settings --#pause
Tick rate at 30.

About the clients
=============

We usually play 4 of us, two in germany and two in switzerland. 1 plays on linux, the rest on windows, all laptops. Mine: i7 with 16gb RAM & Nvidia Quadro K3100M. 1 of the german clients hardly ever experiences lag (althought the server is in switzerland). In my case, lag depends a lot on the day.

Final comments
============

I'm here for the devs!

I'll gladly provide any log, specs or whatever to help profile this. I've read there's a profiler in DST, is there a way to turn it on? I sometimes have a lot of lag, while some others don't.

These are all the suggestions I've read so far.

Let me know in the comments for things that are wrong or whatever I could throw in there. Also if you want more detailed explanations on something.


Viewing all articles
Browse latest Browse all 26884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>