Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

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
ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

Hello, I'm trying to host a game and no matter what I do both me and my friends get huge lag spikes and rubber banding.
Sometimes the latency will be 7-10ms and sometimes it'll jump to 150-200ms and jump around everywhere. I've tried looking on other posts but I simply don't know what to do.

Regarding internet performance - I have one of the best internet packages available, which consistently gets 500-1000Mbps Download/50Mbps Upload, and tested it while we were lagging. I also use an ethernet connection for my server and my PC so it isn't a wi-fi issue either.

Regarding mods and map - The map isn't a huge base, it's a new map. So I can't see it being too resource-intensive to cause such issues. Something is going wrong. So while yeah, I could slow the game speed down, I feel like that shouldn't be necessary with a new map.
Also, while I plan to use mods, I have none installed currently.

Regarding the server - This isn't an online dedicated server, but one I own myself. The server itself is with me and connected to my modem along with my PC. I feel like I definitely shouldn't be getting any latency issues connecting to it, yet I do.

What exactly am I supposed to do? It isn't a matter of my PC performance either as it plays just fine on massive bases on other servers, and I've hosted servers before. I get 60FPS/UPS. The only difference is I'm now hosting the map on a dedicated Linux server.



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

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by Loewchen »

Looks like a network issue, I'd try a different switch or try to host directly from the machine you are playing on.

ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

How would I go about fixing this? I'm not sure what switch you refer to.
I bought this server specifically for hosting the game 24/7, keeping my PC running constantly is out of the question.

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

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by Loewchen »

ProfessorTenebrae wrote:
Wed Mar 11, 2020 2:20 am
How would I go about fixing this?
By finding out what's wrong, done by eliminating or confirming the switch and the server as cause.

ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

I don't have a switch though, the server and PC are plugged into the internet modem.

I connect to the server via its local IP address.

I'm not sure why the server might be causing an issue, as it has good specifications too.
What else can be tested?

Sorry, Linux is not my strong suit.

ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

Anyone have thoughts on this?

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by Honktown »

First: please be patient : P

There might be QoS (quality of service) options that are interfering with the connection. If a device requested "high-priority" traffic while Factorio is requesting normal traffic, it may explain the lag spikes. Trying a different router has already been suggested, and for good reason: internet devices tend to be finicky and annoying. The Linux internet interface may also be worth investigating, if it is possible to try with a usb wifi adapter or something of the like.
I have mods! I guess!
Link

ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

Sorry, where was a different router suggested?

But it still confuses me why the internet may be involved at all. Maybe for my friend but why would it lag for me when connecting to the server locally?

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by Honktown »

ProfessorTenebrae wrote:
Fri Mar 13, 2020 6:00 pm
Sorry, where was a different router suggested?

But it still confuses me why the internet may be involved at all. Maybe for my friend but why would it lag for me when connecting to the server locally?
Loewchen said "switch", which is an explicit kind of traffic router. Easy misunderstanding.

Simple reason why it might lag: never trust routers. They usually work fine but when they don't it can seem random and often makes no sense why it would start acting up now. Trying a different router is a really quick and easy way to omit at least one cause of why a network connection isn't working right, if you have one spare.
I have mods! I guess!
Link

ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

Ah, sorry. I figured they meant an ethernet switch which I wasn't using.

I tried a different router but the same thing occurred. I'm not sure what else it could be.

Zanthra
Fast Inserter
Fast Inserter
Posts: 207
Joined: Fri Mar 25, 2016 8:18 am
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by Zanthra »

What are the specs of the dedicated server, such as CPU and RAM?

nikku
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Mar 21, 2020 12:35 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by nikku »

I would like to reply here because I had the exact same problems and I managed to fix them.

Situation: Hosting the Factorio server on a separate high-end PC on my LAN, I'm connecting to it over LAN on my gaming PC.

First of all, when my friend would pull big groups of biters, my FPS would drop to 10 or lower and I noticed my network buffer started to fill up, also the 'jumps' (not sure what this means)

Eventually this made it seem like a network related issue, since I have a similar PC setup to my friend, but his FPS was buttery smooth. I noticed my FPS issues got even worse when playing a Youtube video, so I got really desperate and installed Killer Network Manager to prioritize the Factorio traffic. This seriously blew me away and fixed 90% of the problems. So this is something you could try.

I also experimented with the server settings JSON by modifying the 'maximum segment size' because I figured I might be able to send bigger network packets instead of spreading it over several ticks. I cannot confirm whether this helped because I was also experimenting with other settings. I'd like to know from the devs if this could help.

I eventually managed to completely solve the problem by swapping out my old router for a gigabit Ethernet switch (D-Link DGS-108) and connecting everything with brand new cat-6 cable, probably overkill but I was desperate. I can now finally see him pulling monster packs of biters while my FPS stays at 60 and occasionally drops to 50 for a second or so. It has made everything playable again.

ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

What are the specs of the dedicated server, such as CPU and RAM?
CPU: 2 x 2.4Ghz Six-Core E5-2440
RAM: 32GB
Killer Network Manager to prioritize the Factorio traffic
I also experimented with the server settings JSON by modifying the 'maximum segment size'
I use CAT-7 cables for my setup but I'll try those 2 things and come back thanks!

ProfessorTenebrae
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Mar 10, 2020 10:27 pm
Contact:

Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]

Post by ProfessorTenebrae »

The maximum segment size thing worked thanks!
Couldn't install Killer Network Manager, I need the hardware to go with it. But yeah that worked fine thanks. :)

Post Reply

Return to “Technical Help”