Multiplayer Lag

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
bk5115545
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 7:00 pm
Contact:

Multiplayer Lag

Post by bk5115545 »

I'm having an issue that might be related to viewtopic.php?f=49&t=23295

Myself and 3 friends are trying to play together but one guy has a crappy connection. We'll call him the slow guy.
The slow guy runs on a 100KB/s down and 50KB/s up ADSL connection and the other 3 of us run on a nice LAN (0-1ms ping). All of us have awesome computers.

The server is hosted on 0.12.30 with the "Use Peer-to-Peer Communication" option unset with a latency of 133. Slow guy actually has OK ping.

Here's why I think this is a bug:
The slow can play with any one other person but when there are two people he runs out of upload bandwidth. The game uses about 4-7KB/s when there is 1 other person but magically exponentially increases to cap him out with 2 people.
The increase in required bandwidth isn't immediate (as would be expected if it was just him syncing events with the server). Here is an image of his upload (as a client), me as the server, and one other person after a couple of seconds.
Image
Here is an image of the upload bandwidth usage with just myself (the server) and him.
Image

We didn't catch an image of it (the other 2 guys playing tonight were kind of mad that they had to wait while Slow Guy downloaded the map) but Slow Guy was uploading an additional 20KB/s (per connected player) when downloading the map.
Here is an image of him downloading the map with only 1 other person vs watching a youtube video. The video is on the left and the map download is on the right.
Image
There was an additional 20KB/s upload per person already in the map. This seems unnecessary as he only has to sync with the server.

So that's why I think it's probably a bug.
TL;DR. Slow guy has to sync SOMETHING with every player already in the map (instead of just the server) even though the game is paused during downloads and peer-to-peer communication is off.
Slow guy also gets DDOS'd by exponentially increasing bandwidth requirements when peer-to-peer communication if off indicating that he is receiving data on a per-player basis instead of on a per-event basis.

This issue also happens when peer-to-peer communication is on but it is something to be expected with peer-to-peer communication.

I can provide saves and logs but it might take a day to get the group together to get more logs.

WalkinTalkinHawkin
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Apr 05, 2016 3:01 pm
Contact:

Re: Multiplayer Lag

Post by WalkinTalkinHawkin »

This is exactly the same issue I am having! I wish someone would post something to help us out.
Looking at your example I am the 'slow guy' except i'm having to upload 300+kbps in some cases, this then has the effect of destroying my download speed as Ive saturated my upload basically.
This picture of me initially flicking through the internet showing I can hit 4mbps easily and then I try to join a server.
Upload.PNG
Upload.PNG (28.91 KiB) Viewed 15432 times
As you can see the initial download is fine and then I begin to upload more than I download!
I then went back to a HD youtube video just to check it wasn't my internet crapping out.
Youtube.PNG
Youtube.PNG (28.02 KiB) Viewed 15432 times
Any help for us both would be ace.

zukivi
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Apr 11, 2016 5:53 pm
Contact:

Re: Multiplayer Lag

Post by zukivi »

I have the same issue described by OP.
My friend has a server with peer-to-peer option turned off, and I have a relatively slow upload speed compared to other people playing on the server (ADSL download: 600kB/s; upload: 50kB/s)

Bregor
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Apr 12, 2016 12:09 pm
Contact:

Re: Multiplayer Lag

Post by Bregor »

We got the same problem, when we play with up to 4 people. If just one of the guys have lag, everybody lags. I understand that this is not the exact same issue you discuss here, but it sucks. In my opinion the biggest minus point when it comes to multiplayer experience, sadly.

calebhub514
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Apr 12, 2016 1:59 pm
Contact:

Re: Multiplayer Lag

Post by calebhub514 »

Ayy, there's other people with my problem. I'm a scrublord with a lowly ADSL connection and 80 kB/s upload max. When playing with me and someone else i have enough upload to handle the game. But whenever a third person enters the mix after a while factorio spikes to using 100% of my upload, which kills my download and everyone else's experience because it makes my ping jump from 30 to 500. Which sucks balls because we really enjoy playing the game together, the whole reason we all bought it really lol.

bk5115545
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 7:00 pm
Contact:

Re: Multiplayer Lag

Post by bk5115545 »

At least for my group, viewtopic.php?f=49&t=21685 didn't work.

kovarex
Factorio Staff
Factorio Staff
Posts: 8079
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Multiplayer Lag

Post by kovarex »

Are you talking about the bandwitch when the game is played, or when the map is beigng downloaded/uploaded?
Once the game is uploaded and the people are playing, it shouldn't require more than 5kb per player.
There are other thing we could (and should) do to decrease this a lot (merging networks/input actions input actions into groups), but even now, having more than 5kb/s per player is suspicious.

Loewchen
Global Moderator
Global Moderator
Posts: 8585
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Multiplayer Lag

Post by Loewchen »

kovarex wrote:[...] but even now, having more than 5kb/s per player is suspicious.
We had the problem in the past, of >50kB/s of upload (and completely exhausting the bandwidth) on some players factorio process (seen in the windows resource monitor) when more than 6 players were online, while at the same time other players were still below 5kB/s. Just FYI.

Edit: while playing, no map upload

Turosu
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Apr 28, 2016 10:31 pm
Contact:

Re: Multiplayer Lag

Post by Turosu »

I have the same problem we are trying to play 3 in the same server but is impossible, when the 3 persons conect to server, that get lags, like that:

https://gyazo.com/ae60294b9d57020e9daa43e60ccc18eb

We have P2P desactived to trying get better conection...

(Im the host of game)
__________________________________________________

Turosu internet conection:

https://gyazo.com/7792020875cf7922c539da45c569ae98

JuanCStar internet conection:

https://gyazo.com/3f4a1cb83c45373d94e13aafe44a4c4c

Noneidi internet conection:

https://gyazo.com/670691339c6d7aeec99f7a3ddbe39a1c
__________________________________________________

Why we cant play without lag? Any know solution?

Loewchen
Global Moderator
Global Moderator
Posts: 8585
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Multiplayer Lag

Post by Loewchen »

Turosu wrote:I have the same problem we are trying to play 3 in the same server but is impossible, when the 3 persons conect to server, that get lags, like that:

https://gyazo.com/ae60294b9d57020e9daa43e60ccc18eb

We have P2P desactived to trying get better conection...
Why we cant play without lag? Any know solution?
Since you are able to reproduce it, could you make screenshots of the 4 network tables in the resource monitor when the problem occurs.
How to open resource monitor: win+R > %windir%\system32\perfmon.exe /res > network tab

Thank you

Turosu
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Apr 28, 2016 10:31 pm
Contact:

Re: Multiplayer Lag

Post by Turosu »

Loewchen wrote:
Turosu wrote:I have the same problem we are trying to play 3 in the same server but is impossible, when the 3 persons conect to server, that get lags, like that:

https://gyazo.com/ae60294b9d57020e9daa43e60ccc18eb

We have P2P desactived to trying get better conection...
Why we cant play without lag? Any know solution?
Since you are able to reproduce it, could you make screenshots of the 4 network tables in the resource monitor when the problem occurs.
How to open resource monitor: win+R > %windir%\system32\perfmon.exe /res > network tab

Thank you
___________________________________________________________________________
Turosu network table:

Process activity network: https://gyazo.com/90f5bb69845876b625b2e05cd2d965f9
Activity Network: https://gyazo.com/3f9d7a6559a09a7abebe846b9eb8ce35
TCP conections: I dont have Factorio Here :?:
Ports listening: https://gyazo.com/5170a72e959554754d17e77046a18bdf

___________________________________________________________________________
JuanCStar network table:

Process activity network: https://gyazo.com/737501951e46f84ed82334dc2e895143
Activity Network: https://gyazo.com/3f37d957babcdc8ab1f0d5d47db70f5a
TCP conections: I dont have Factorio Here :?:
Ports listening: https://gyazo.com/6a1b677992b586e335cd24067a67cddd

___________________________________________________________________________
Noneidi network table:

Process activity network: https://gyazo.com/ee259e8ec4a243e4b8f34fcbaf84d29e
Activity Network: https://gyazo.com/72a82ff59b93242d81a300dc352bfa32
TCP conections: I dont have Factorio Here :?:
Ports listening: https://gyazo.com/2b12dea8368585e54507e6e2b825b9ea

___________________________________________________________________________

bk5115545
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 7:00 pm
Contact:

Re: Multiplayer Lag

Post by bk5115545 »

kovarex wrote:Are you talking about the bandwitch when the game is played, or when the map is beigng downloaded/uploaded?
Once the game is uploaded and the people are playing, it shouldn't require more than 5kb per player.
There are other thing we could (and should) do to decrease this a lot (merging networks/input actions input actions into groups), but even now, having more than 5kb/s per player is suspicious.
Disclaimer: Have to try with 0.12.32 still

I'm referring to both scenarios (playing and uploading).

Uploading Map:
If I'm the host and slow-guy joins then he downloads the map around expected speeds but if I'm the host with fast-guy playing, and then slow-guy joins then slow-guy is sending too many packets for his network to handle.
Slow-guy has to send about 20KB/s per player already in the map when he tries to download the map. He sends 20KB/s to me when he joins with just me, about 41KB/s with one fast-guy, and about 60KB/s with 33% packet loss if there are 2 fast-guys. This happens if fast-guy joins while slow-guy is downloading the map as well.

Playing Game:
I'm the host and slow-guy and I are playing. Fast-guy joins and everything is fine for a few seconds. As the server, I see my upload increasing, fast-guy DOES NOT see his upload increasing, and slow-guy's upload increases until he can't keep up and then the game stutters (sometimes with a full second between frames). If fast-guy drops, everything is fine. If slow-guy manually drops (he'll dc soon anyway) and tries to reconnect, we get the uploading issue above.
My upload as the host shoots right past 300KB/s when a third player joins if one of them has a much worse connection than the other.

Happens regardless of multiplayer latency slider setting.
Happens regardless of peer-to-peer option.
Happens on freshly generated world or a very large world.
Happens with or without mods.

EDIT:
Timezones are pretty different (CST here) but we could show you if it would help (Skype/Curse for screenshots). I just need a couple of days to get the guys together. PM me if interested.

Post Reply

Return to “Technical Help”