Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]
-
- Burner Inserter
- Posts: 9
- Joined: Tue Mar 10, 2020 10:27 pm
- Contact:
Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]
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.
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.
-
- 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]
Looks like a network issue, I'd try a different switch or try to host directly from the machine you are playing on.
-
- 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]
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.
I bought this server specifically for hosting the game 24/7, keeping my PC running constantly is out of the question.
Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]
By finding out what's wrong, done by eliminating or confirming the switch and the server as cause.
-
- 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]
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.
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.
-
- 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]
Anyone have thoughts on this?
Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]
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.
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
Link
-
- 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]
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?
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?
Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]
Loewchen said "switch", which is an explicit kind of traffic router. Easy misunderstanding.ProfessorTenebrae wrote: ↑Fri Mar 13, 2020 6:00 pmSorry, 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?
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
Link
-
- 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]
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.
I tried a different router but the same thing occurred. I'm not sure what else it could be.
Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]
What are the specs of the dedicated server, such as CPU and RAM?
Re: Multiplayer Lag over LAN/Online using Dedicated Server [0.17.79]
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.
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.
-
- 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]
CPU: 2 x 2.4Ghz Six-Core E5-2440What are the specs of the dedicated server, such as CPU and RAM?
RAM: 32GB
Killer Network Manager to prioritize the Factorio traffic
I use CAT-7 cables for my setup but I'll try those 2 things and come back thanks!I also experimented with the server settings JSON by modifying the 'maximum segment size'
-
- 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]
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.
Couldn't install Killer Network Manager, I need the hardware to go with it. But yeah that worked fine thanks.