Server lag after updating to 0.17.x

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
rbit
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 06, 2020 11:00 pm
Contact:

Server lag after updating to 0.17.x

Post by rbit »

Hello! I have a headless server (running on Ubuntu 18.04). Previously, it was running great when I played some months ago (on 0.16.x), but after updating it to 0.17.79, me and my friends are finding it lagging pretty bad regular (stuttering, and 'server is not responding ...' pop-ups that last for a couple seconds). What's odd is while I monitor htop processes in a terminal, it generally doesn't exceed ~30% CPU or mem usage, but it does spike occasionally to much higher. Any ideas to improve?

EDIT: I attached my log file and screenshot per viewtopic.php?f=7&t=68653, as well as my save file. No mods installed (other than base). the .json file is simply:

Code: Select all

{
  "mods": 
  [
    
    {
      "name": "base",
      "enabled": true
    }
  ]
}
Attachments
screenshot.png
screenshot.png (6.89 MiB) Viewed 2250 times
main.zip
(5.59 MiB) Downloaded 60 times
factorio-current.log
(19.12 KiB) Downloaded 66 times
Last edited by rbit on Mon Jan 06, 2020 11:43 pm, edited 4 times in total.


rbit
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 06, 2020 11:00 pm
Contact:

Re: Server lag after updating to 0.17.x

Post by rbit »

Loewchen wrote:
Mon Jan 06, 2020 11:18 pm
See: 52433 and 68653.
Thanks for this. I'm still reading through what you shared, but one quick question on the FAQ (https://www.factorio.com/faq) page for now: I notice it lists requirements for 'PC', but does not specifically mention requirements for a headless linux server (I assume less demanding). Are those visible somewhere, or should I assume they are the same CPU/RAM as the PC, just no videocard requirement ofc?

rbit
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 06, 2020 11:00 pm
Contact:

Re: Server lag after updating to 0.17.x

Post by rbit »

I just updated the original post with required info as you pointed out. Thanks.

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

Re: Server lag after updating to 0.17.x

Post by Loewchen »

I don't think there are official requirements for linux headless. Generally a headless server will outperform a client with identical hardware and it will take significantly less RAM. The server being the bottleneck is usually a non issue anyway though.

rbit
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 06, 2020 11:00 pm
Contact:

Re: Server lag after updating to 0.17.x

Post by rbit »

Loewchen wrote:
Mon Jan 06, 2020 11:51 pm
I don't think there are official requirements for linux headless. Generally a headless server will outperform a client with identical hardware and it will take significantly less RAM. The server being the bottleneck is usually a non issue anyway though.
OK thanks, I suspected as much. I never had the issue in the past with several more people playing at once, so I assumed my server was more than adequate. This only seemed to begin after updating to 17.x. Hopefully someone can make some sense of this!

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

Re: Server lag after updating to 0.17.x

Post by Loewchen »

rbit wrote:
Tue Jan 07, 2020 12:05 am
I never had the issue in the past with several more people playing at once, so I assumed my server was more than adequate. This only seemed to begin after updating to 17.x. Hopefully someone can make some sense of this!
I had not looked at your updates before, in this case I would blame the server CPU, 1Ghz base clock, 8W TDP is pretty much as bad as it gets for factorio which likes few very high frequency cores and keep in mind the server has to do all the game updates just like the clients, it can just skip the rendering.
No idea why it worked better in 0.16 I would not have expected this cpu to run any base at full speed.

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

Re: Server lag after updating to 0.17.x

Post by Honktown »

At the top of the debug menu (F4), there's capture-perf-stats. Might help to find which thing is specifically causing the lag. Looks to capture stats until you hit 'save', so it doesn't need to be perfectly timed. The spreadsheet is probably dumped in ~/.factorio

Was the system updated at the same time as Factorio?
I have mods! I guess!
Link

rbit
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 06, 2020 11:00 pm
Contact:

Re: Server lag after updating to 0.17.x

Post by rbit »

Honktown wrote:
Tue Jan 07, 2020 12:50 am
At the top of the debug menu (F4), there's capture-perf-stats. Might help to find which thing is specifically causing the lag. Looks to capture stats until you hit 'save', so it doesn't need to be perfectly timed. The spreadsheet is probably dumped in ~/.factorio

Was the system updated at the same time as Factorio?
Thanks, I'll try that debug option tomorrow when I'm back on the game.

As for the system update, I generally apt-update and upgrade so yes, it likely was updated since the previous version.

One interesting observation i had earlier when I was on, was that I ran a diff of my old server-settings.json (that I was still using) and the newest file, and saw I didn't have the following from the new file:

Code: Select all

  "_comment_segment_sizes": "Long network messages are split into segments that are sent over multiple ticks. Their size depends on the number of peers currently connected. Increasing the segment size will increase upload bandwidth requirement for the server and download bandwidth requirement for clients. This setting only affects server outbound messages. Changing these settings can have a negative impact on connection stability for some clients.",
  "minimum_segment_size": 25,
  "minimum_segment_size_peer_count": 20,
  "maximum_segment_size": 100,
  "maximum_segment_size_peer_count": 10
I added that, restarted, and it seemed to run much better. I'm not sure if that's a coincidence, but probably noteworthy. Some friends are still on the server playing and are saying its been running good. I'll follow-up tomorrow.

rbit
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 06, 2020 11:00 pm
Contact:

Re: Server lag after updating to 0.17.x

Post by rbit »

Still getting massive lag :( If anyone can help me troubleshoot it would be greatly appreciated.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Server lag after updating to 0.17.x

Post by Jap2.0 »

Just a note that the screenshot appears to be from the client and therefore if the server is causing the lag, it will be of little help. I'm not sure of the best way to get similar information from command line.
There are 10 types of people: those who get this joke and those who don't.

rbit
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 06, 2020 11:00 pm
Contact:

Re: Server lag after updating to 0.17.x

Post by rbit »

Jap2.0 wrote:
Fri Jan 10, 2020 3:10 am
Just a note that the screenshot appears to be from the client and therefore if the server is causing the lag, it will be of little help. I'm not sure of the best way to get similar information from command line.
I understood it was required just the same (to post the client screen).

Post Reply

Return to “Technical Help”