Valheim

Valheim

lucifier Mar 12, 2021 @ 8:48pm
Possible fix for Server lag, p2p dysnc
Found this guy on youtube with a reason and a solution to the problem with low latency.

https://www.youtube.com/watch?v=L7Ymyifp0Gk
< >
Showing 1-15 of 16 comments
Server lag is caused by using the Steam Dedicated Server, which all servers as far as i know use. In which, uses the steam netcode. The steam netcode proritizes the weakest connection and tries to make things "equal" by reducing everyone elses interactions based on that specific data.

This is why the person with 5mb down and 0.5mb up causes the server to lag balls for the people with haus computers rocking gigabit connections.
At least thats with dedicated servers. Im wholly unsure if the private world style servers, player host servers? are effected like that. Probably though...
lucifier Mar 13, 2021 @ 2:10am 
This fixed the dysnc were me and other players would not be able to do anything and lose hours of work building and resource gathering.
Dreadengore Mar 13, 2021 @ 2:18am 
Originally posted by lucifier:
Found this guy on youtube with a reason and a solution to the problem with low latency.

https://www.youtube.com/watch?v=L7Ymyifp0Gk
its not peer to peer issues its the steam server listing.. thats the problem all these latency issues and lag and low frame rate is steams issue they need to fix steam.
Shure Iam Mar 13, 2021 @ 2:29am 
Originally posted by Dreadengore:
Originally posted by lucifier:
Found this guy on youtube with a reason and a solution to the problem with low latency.

https://www.youtube.com/watch?v=L7Ymyifp0Gk
its not peer to peer issues its the steam server listing.. thats the problem all these latency issues and lag and low frame rate is steams issue they need to fix steam.

I don't think FPS is a steam issue, I can understand you know. Network Latency. But I don't think it's causing a performance problem.

And when it comes to Steam, Warhammer : Vermintide 2 had a similar issue where Peer 2 Peer was instead getting routed through Steam Servers for IP handling and all that stuff. so what used to be like 100 ping turned into 200 ect ect

In Vermintide's case just install the Steam Beta. go to Settings, In-Game and set the Steam Networking option to "Always"

But in this games case from how a friend put it. the Devs "Forgot" to enable an option for how the compresses Packets, so instead of having 50 different things it its own packet, they're all individual packets. which inherently causes issues.

Not to even mention how they decided to do Networking on it's own. Having Clients be the "Host" for their own areas if the host isn't there, making a Server host the typical information like HP and whatnot, and Clients doing the Physics calculation. (I don't know much about the Server topic but as far as I know it's a situation of the slowest connection making it bad for everyone) so while this games Network Solution might work for Good Connections, it isn't the best for Bad ones.

A simple solution is to let Dedicated Servers actually host the entirety of the game.
Shure Iam Mar 13, 2021 @ 2:39am 
An example of the games Networking in terms of "the slowest connection making it bad for everyone"

I have 3 friends that I played this game with (Two now, one just can't stand the network issues)

The two friends have 0 issues whatsoever with playing the game, When I'm home alone and have all the bandwith to myself. I can play with them almost just fine, every now and then it'll have an issue, like when I'm in an area by myself and they go there, they can't open doors/chests for example, and all I need to do is leave and rejoin to fix the problem.

But when the Third friend would join, who has the worst internet in the Group. it causes massive issues. For example when we're sailing if he tries to join the boat starts lagging all over the place.

As for me, When I'm no longer the only person in the household using the Internet, and the Roku TV with Netflix starts playing movies and two cell phones gets turned on. I suddenly almost can't even play anymore because of near constant disconnects and Enemy Lag.
[CPC] Tiotr Mar 13, 2021 @ 5:13am 
With my friend we tried everyththing that we could find on the internet. The extreme lag come each time, after 2 minutes or 30 minutes max. unplayable and i lost the fun to try. I'l try the "Settings, In-Game and set the Steam Networking option to "Always"" trick. thanks for that!
AlexKidd62[FR] Mar 13, 2021 @ 5:27am 
Originally posted by Kiba The Stupid Space Fox:
At least thats with dedicated servers. Im wholly unsure if the private world style servers, player host servers? are effected like that. Probably though...

hosting the game playing in coop with girlfriend.... and we got desync :D
The option "local lan" seems to lack on the UI when you start a game.
What seems to happen is player pc really used as a server "act as if" and my girlfriend is just connecting doing kind of a loopback to our own router... she got ping... in local ping = 0.

This might be why though (not a loopback though)
Coming from a "dev"
https://www.reddit.com/r/valheim/comments/ltylkj/2_players_same_network_desync_issues/
We are working on a patch for dedicated servers, basically all dedicated server connections will be direct connections and not relayed through steams relay network. This will probably solve a lot of wonky network issues. Thanks for being patient.

So in fact my GF is not connected directly to me.... but to steam which direct the connexion to me. kind of crap.
Last edited by AlexKidd62[FR]; Mar 13, 2021 @ 5:31am
Originally posted by Shaurian:

A simple solution is to let Dedicated Servers actually host the entirety of the game.

You had me thinking i was wrong, till the last comment here. Dedie servers dont stop this issue. We have a G-Portal hosted dedicated and when our slow internet speed friend logs in, anyone in the vacinity of him drops massively in latency.
Originally posted by AlexKidd62FR:
Originally posted by Kiba The Stupid Space Fox:
At least thats with dedicated servers. Im wholly unsure if the private world style servers, player host servers? are effected like that. Probably though...

hosting the game playing in coop with girlfriend.... and we got desync :D
The option "local lan" seems to lack on the UI when you start a game.
What seems to happen is player pc really used as a server "act as if" and my girlfriend is just connecting doing kind of a loopback to our own router... she got ping... in local ping = 0.

This might be why though (not a loopback though)
Coming from a "dev"
https://www.reddit.com/r/valheim/comments/ltylkj/2_players_same_network_desync_issues/
We are working on a patch for dedicated servers, basically all dedicated server connections will be direct connections and not relayed through steams relay network. This will probably solve a lot of wonky network issues. Thanks for being patient.

So in fact my GF is not connected directly to me.... but to steam which direct the connexion to me. kind of crap.

If you are on lan, you shouldnt be connecting externally at all. The reason you would be looping around back to your router would be because you were using your external IP, instead of localhost.

From this post here( https://steamcommunity.com/sharedfiles/filedetails/?id=2382282960 ) has this comment here. "Also, as a side note, in order to connect locally to your own server, you need to add it in your steam favorites as localhost:[port], with port=[the port number you started the server]+1 (ex.: server starts with 2456, in favorites i add localhost:2457."

I would try that. That MAY help with some connectivity issues if people are playing on lan.
I suggest/say that, because honestly... if you are on lan, you should be able to play "offline" with each other, which would totally skip going through steams remote networking stuff all together. I could be wrong, i dont know the ins and outs of everything involved here.
fox Mar 13, 2021 @ 5:55am 
Why don't you just tell us the solution instead of advertising a video? Because it's looks like another random opinion from a random person.
Originally posted by fox:
Why don't you just tell us the solution instead of advertising a video? Because it's looks like another random opinion from a random person.
The video says to increase the data cap for the server. That would increase the data sent to each individual player, which... would do basically nothing. Its just someone with a slight bit of computer knowledge trying to suggest something that looks like it might work, because it has something to do with connections. Thats it. It MAY work for some instances, but im too tired to figure out what niche situations it could help.

Its worth a try on some issues, but not the issues like most people are having right now, which is due to the steam netcode.
fox Mar 13, 2021 @ 6:18am 
Thanks, my distant cousin.
Bedna Mar 13, 2021 @ 10:02am 
Originally posted by Kiba The Stupid Space Fox:
The video says to increase the data cap for the server. That would increase the data sent to each individual player, which... would do basically nothing. Its just someone with a slight bit of computer knowledge trying to suggest something that looks like it might work, because it has something to do with connections. Thats it. It MAY work for some instances, but im too tired to figure out what niche situations it could help.

Its worth a try on some issues, but not the issues like most people are having right now, which is due to the steam netcode.

Well, load into game, run away from your huge base with boxes filled with items, press F2 and keep an eye on how much data you are transfering when you run back to your base and everything is loading in again. On our community server I get about 50kB/s witch means me alone is almost capping the transfer rate of 64kB/s.
Now do the same with one or two more ppl on the server (you run in a group). Everybody SHARES that data limit, so 50x3=150kB/s. I increased this by recompiling the dll file suggested in the video above (640kB/s) and it certainly improved things. Not everything, but the issues of ppl not being able to open doors, boxes etc are WAY better.
I have a 100/100 connection so I don't have to bother and so does most of my friends playing on that server. I have however NOT tested it with a player on a slow connection (like 10/1 or something) so keep that in mind, if you or anybody else on the server, that MIGHT cap the datalimit anyways (depending on how its coded, I actually haven't looked into it) like other ppl have suggested above.
< >
Showing 1-15 of 16 comments
Per page: 1530 50

Date Posted: Mar 12, 2021 @ 8:48pm
Posts: 16