[multiplayer dedicated server] maxing out all cores

Bugs that are actually features.
tigar
Inserter
Inserter
Posts: 20
Joined: Mon Jun 16, 2014 7:18 pm
Contact:

[multiplayer dedicated server] maxing out all cores

Post by tigar »

Running a standard ubuntu 14.04.4 lts dedicated server locally in vm(esxi 6.0) on a asrock C2750D4I Intel Avoton C2750 Octa-Core Processor 64gb of ram 512gb ssd

So i try to run my server that i have until now been running on a windows machine on my dedicated linux machine and cpu maxes out at 100%

Here is a pastebin of everything the server throws at me during startup and while i am connected
http://pastebin.com/pXHW7AA9

The constant stutters are at the exact same time where cpu usage maxes out on the vm

And this is just with 1 person connected or even with 0 when using the no pause command

Now while i run it from my windows server 2016(i turn either vm off during testing) it runs like a well oiled super fast race car with no issues while same specs are given to both

I have tried different settings different disto's and no matter what i try headless linux just takes up all processing power yet running headless on windows runs fine

But windows takes up to much ram next to it for when i move it over to my live server so i was hoping to get this to work on linux
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by sillyfly »

Did you try to run top or some other process viewer to make sure it's the Factorio headless server that uses up all CPU? Perhaps some other process takes up resources, forcing Factorio to slow down?
tigar
Inserter
Inserter
Posts: 20
Joined: Mon Jun 16, 2014 7:18 pm
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by tigar »

Ran top and its def factorio as it jumps between 77-85-94% cpu usage at any and all times
1.JPG
1.JPG (91.08 KiB) Viewed 6743 times
As you can see it reaches 100% quite often and sits there a lot before dropping down

Where as on windows
2.JPG
2.JPG (14.26 KiB) Viewed 6743 times
First number series is pid 2nd is cpu%

Both are done while i am connected to it chopping wood
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by Oxyd »

You have quite the mod collection there. Can you upload your mod folder somewhere so that I can try to reproduce your issue with your mods?
tigar
Inserter
Inserter
Posts: 20
Joined: Mon Jun 16, 2014 7:18 pm
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by tigar »

https://www.dropbox.com/sh/g1dtx4lbcs3o ... mziPa?dl=0

Here you go its the link thats shared for those who play on the server

And ya we started off small but then people where like "Oh this is fancy can we have this?" and a few weeks later tada here's that monstrosity of a pack
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by NoPantsMcDance »

With that amount of mods it doesn't surprise me to see 100% cpu usage (100% being one core and 800% being all 8 cores). I suggest using something like "htop" to get a better view at what's doing what. Also running in a VM can sometimes have weird effects, idk how well VMware handles CPU requests. I'm currently running an ubuntu VM in Openvz and my modded server (50 mods) will sometimes jump one core to 100% but never stays capped out.
Last edited by NoPantsMcDance on Sun Apr 03, 2016 12:43 pm, edited 1 time in total.
Looking for a multiplayer server? Check out my servers Vanilla Server
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by sillyfly »

NoPantsMcDance wrote:With that amount of mods it doesn't surprise me to see 100% cpu usage (100% being one core and 800% being all 8 cores). I suggest using something like "htop" to get a better view at what's doing what.
That's still 4 times as much as the same configuration uses on his Windows VM (Assuming that's 3% of the total cores on the Windows Process Manager), so there's probably something wrong there...
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by NoPantsMcDance »

sillyfly wrote:
NoPantsMcDance wrote:With that amount of mods it doesn't surprise me to see 100% cpu usage (100% being one core and 800% being all 8 cores). I suggest using something like "htop" to get a better view at what's doing what.
That's still 4 times as much as the same configuration uses on his Windows VM (Assuming that's 3% of the total cores on the Windows Process Manager), so there's probably something wrong there...
It's possible that the Windows VM is more evenly spreading out the load across all the cores. Something is definitely wrong but it seems more of a VM issue than a factorio issue.

EDIT: Going to test the modpack on my Ubuntu server so I don't eat my own words.
Last edited by NoPantsMcDance on Sun Apr 03, 2016 12:54 pm, edited 1 time in total.
Looking for a multiplayer server? Check out my servers Vanilla Server
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by sillyfly »

It's not a matter of how the load is spread, it's a matter of overall load - on the Linux VM he sees load equal to one core 100% utilized, and on the windows machine he sees load equal to one core 25% utilized.

No matter how you spread it, the Linux VM seems to be working 4 times as hard on the same task.
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by NoPantsMcDance »

So I found the culprits (for the stuttering atleast).

MODS REMOVED:
simpleteleporters, update time over 1.0
momining, update time 0.6
moweather, update time 0.5
Natural_Evolution_Building, update time 0.8

CPU usage while server starting: http://i.imgur.com/C0XCxUN.png 100% usage expected, 1 thread loading 100+ mods
CPU usage while playing: http://i.imgur.com/8bf9ctg.png

Removing those mods fixed the stuttering issue. Feel free to give it a try. Server still doesn't run a full 60UPS so there is still something eating a bit of it but the lag spike is gone.
PROTIP: Don't put 100+ mods together and expect it to run smooth, why it runs smoother on windows I have no idea, I don't have a windows machine to test it on so if someone else wants to investigate the cpu issue goodluck.
PROTIP2: Hit the F4 key and go to the "always tab". Check these boxes. This shows the FPS/UPS as well as the update time of the mods. The lower the better, if your noticing lag spikes turn that on and watch the numbers for an increase.http://i.imgur.com/7TW3XYX.jpg
Looking for a multiplayer server? Check out my servers Vanilla Server
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by Oxyd »

I loaded up your mods on my desktop machine (i5 3570k, 16 GB of RAM, Fedora 23) and I see Factorio hover at around 25% CPU usage. It drops down to around 10% when no one is connected (using --no-auto-pause).

Are you sure it's not something with your VM? I've never touched VMWare ESXi, so I have no idea what the issue might be. But since it seems to behave well on real hardware, the VM sounds like a logical suspect.
tigar
Inserter
Inserter
Posts: 20
Joined: Mon Jun 16, 2014 7:18 pm
Contact:

Re: [multiplayer dedicated server] maxing out all cores

Post by tigar »

Well the vm is an out of the box fresh install at the time it was on ubuntu but tried it on different disto's as well

But see here is the thing while monitoring its actual usage with vsphere(esxi's control panel for those who dont know what it is) i do actually see it maxing out all cores no matter the configuration be it 2 cores 4 or all 8 so i am guessing its more over something to do with headless on linux being funky while running on a brand new os and a brand new esxi install

Then again oxyd i did have something similar while i ran the server on my machine while it was on its linux install ran around 12-18% with someone connected and down to 8 without anyone and on windows that be 12-15 and down to 4

I guess I will just stick to running it on windows for the time being and try in a few versions unless someone can pin point the problem and solution between now and my next attempt

But thanks for having a look guys and maybe someone else might come along and shed some more light on it in time
Post Reply

Return to “Not a bug”