Factorio (Server) ARM Build

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

selbie
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jul 05, 2015 8:13 pm
Contact:

Factorio (Server) ARM Build

Post by selbie »

Dear developers,

I enjoy playing factorio, and I actually own a CubieTruck also known as (cubieboard 3). (DualCore 1GHz, 2GB ram)
This board is running linux debian based on ARM. I use this board for a small homeserver and I would like to run a small factorio server on it.
But since there is no executable for ARM I would need to do some visualization which isn't the best option.

I know more people have asked about it, but they came with the idea to run it on the Pi which isn't that strong to multitask also the limitation of 512MB of ram (on the model B/B+) isn't enough.
I am not asking for a working GUI, just the server part is fine.

If you could honor this request you would make me and probably more players happy to use their ARM hardware for factorio.

Thank you in advance

quinor
Filter Inserter
Filter Inserter
Posts: 403
Joined: Thu Mar 07, 2013 3:07 pm
Contact:

Re: Factorio (Server) ARM Build

Post by quinor »

I seriously doubt whether ARM is powerful enough to run Factorio. Still, preparing (and testing) build for a different platform is non-trivial task...

AsherMaximum
Burner Inserter
Burner Inserter
Posts: 17
Joined: Tue Mar 08, 2016 12:44 am
Contact:

ARM Architecture Server build

Post by AsherMaximum »

WHAT: With the addition of a headless server in 0.12, I think an ARM processor build for the server would make sense.

WHY: Cheap server option for playing with friends without requiring one person to keep the game running all the time.

Since a server doesn't have to run the graphics, and depending on how the backend is built might not even have to run the game, (just serve the map file and check synchronization of clients), the resources on small ARM based computers like the Raspberry Pi or Pine A64 should be plenty to run the game, at least for maps that are not gigantic, and it would make it cheap and easy for people to start a server and play with friends.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7329
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: ARM Architecture Server build

Post by bobingabout »

It does run the game, it's the one that redistributes the map etc... It needs to be in sync with what's going on in the game.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: ARM Architecture Server build

Post by SyncViews »

Is an RPi really powerful enough? I was monitoring the CPU load of my MP game recently, and it is pretty demanding, using 50+% of a core on my 3.5GHz PhenomII server. Was trying to see if an AWS T2.micro will be enough (works out something like $40/year for 24/7, and a lot less if you just run as needed), but honestly I am thinking not, that load would just eat through the CPU credits...


Just distributing and syncing the map with a peer-2-peer mode might work, so it does not really run the game, but just doing an ARM build will not achieve that, it is a much bigger change for the devs (also if the dev's ever did do it, they could then "host" servers on your behalf, which would make the whole MP thing a lot simpler, although thats somewhat a different suggestion/idea).

immibis
Filter Inserter
Filter Inserter
Posts: 301
Joined: Sun Mar 24, 2013 2:25 am
Contact:

Re: ARM Architecture Server build

Post by immibis »

If you really did want a minimal server, here's what it would need to do: (Note: without the server running the game, you have little security against hackers)
  • Coordinate new player connections (so when a player connects to the server, they really connect to one of the other players)
  • Periodically download the game state from players (also while the last player disconnects), and store the last game state.
  • When a player connects to an empty server, send the last known game state to them.

AceScottie
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 23, 2017 1:25 pm
Contact:

Factorio Server For ARM (Pretty Please

Post by AceScottie »

So i know there are probably hundreds of posts about this already.
I have been searching for days for any signs of an ARM capable server with no luck, not even unofficial server builds.

Firstly i know Factorio can be resource intensive at times, and i know its single core only (currently)
Im not asking for a full stable server build for ARM, just a server build, if it breaks fine, if it lags that's ok.

Im not looking to build a mega base with billions of belts and hundreds of trains.

Currently i have 3 options for hosting a server.
Option A. run it on my main PC (because a 8 core CPU with 16GB RAM is not over kill to run 24/7 on a small 4 player max server)
Option B. Run it on a dedicated server i have to pay for ... im not rolling in money over here ...
Option C. Spin up my 24 core, 64GB Server and run it on that (this is like killing a fly with a star overkill)

Currently i have about 10 SBC, including Raspberry Pi (B+, 2, 3, zero) Odrioid C2, Banana Pi, Orange Pi etc...

I have all these devices and can only use the stupidly big ones to run such a little task.
So please, pretty please, release a barely working ARM server or put the sources for the binary up so we can compile them ourselves. I dont even want support with it, more of a "if it dont work for you then tuff" statement will do.

HurkWurk
Filter Inserter
Filter Inserter
Posts: 258
Joined: Mon Nov 14, 2016 4:55 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by HurkWurk »

option D, purchase an old refurb business class pc to use as a server. should not cost more than $100.

netmand
Filter Inserter
Filter Inserter
Posts: 284
Joined: Wed Feb 22, 2017 1:20 am
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by netmand »

while you're at it, please compile a version for watchOS! I'd love to be able to host a Factorio game on my apple watch!
(sorry couldn't resist)

Daid
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Jul 03, 2016 7:42 am
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by Daid »

They dropped 32bit support for a reason, this same reason rules out the ARM version.

User avatar
OdinYggd
Fast Inserter
Fast Inserter
Posts: 200
Joined: Wed May 25, 2016 12:55 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by OdinYggd »

Daid wrote:They dropped 32bit support for a reason, this same reason rules out the ARM version.
ARM is used in more than just phones and tablets though. It is a powerful enough architecture to be used in small energy-efficient servers for tasks like web hosting and NAS devices.

I could see an ARM based server being strong enough to run a headless Factorio.

Problem is, building Factorio for armhf instead of amd64 would require some degree of library shuffling and may introduce code bloat into both versions of the game in order to deal with architecture specific optimizations and library requirements.

While it would be nice, that's a lot of effort for a usergroup that is rather small at the present time.

You can get a secondhand Intel Atom or Intel Xeon server for no more per month than it would cost to get dinner for 2 at a burger joint. Such an arrangement would have far better latency and reliability than anything you could host in your house.
In my mind, Steam is the eternal king of the railway.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by TruePikachu »

The main reason that only x86-64 is supported at this moment is because it is a single architecture, compared to there being multiple different architectures to consider. Here is a list of reasons given in FFF158 for moving away from x86:
kovarex wrote:
  • Extra issues related to determinism between 32 bit and 64 bit systems that would have to be solved.
  • Release times (compile, upload, updates, server storage space)
  • Occasional bugs that we don't notice as no one uses 32 bit system here.
  • Confusion of some people that download 32 bit by accident and run out of memory soon.
All but the last point are valid reasons for not having an ARM build; the determinism issues in particular are important to note -- something you don't want with a dedicated server.

Additionally, keeping to a single architecture (x86-64) and compiler (gcc) allows tighter control over optimization; for the three platforms, the only differences are the operating system interfaces. If something not dependant on those interfaces is written in some way, it will almost certainly compile to the same instructions for all three platforms; in contrast, x86-64 and ARM have very different instruction sets, so the actual compiled code will be different and behave differently from a performance standpoint (and potentially a behavioural standpoint as well, given the first item on the quoted list).

torne
Filter Inserter
Filter Inserter
Posts: 322
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by torne »

Supporting 32-bit ARM would presumably be a nonstarter for the same reason that 32-bit x86 is not supported: problems with multiplayer consistency between the 32-bit and 64-bit client. So realistically you'd be talking about 64-bit ARM, which excludes some (but not all) of the devices mentioned in this thread. There are some possible sources of multiplayer inconsistency between x86 and ARM as well though: floating point works somewhat differently for a start (the exact semantics of SSE vs NEON aren't quite the same). I have no idea how much this would affect Factorio specifically, but it's definitely a problem that exists in general. If you're after a server-only version, then it's even *more* important that multiplayer doesn't desync often, especially since pretty much all the clients will be x86 machines.

You also need all your libraries to work (and, yaknow, for a commercial product ideally be fully supported and actually tested by their developers) on ARM, though probably some of them aren't needed for a headless server.

And then after all that.. the performance isn't going to be good, probably. ARM single-core performance is not the best, and many ARM devices in the wild don't have sufficient cooling to actually run a maxed out single-core workload for more than a couple of seconds without going into thermal throttling and significantly reducing the CPU speed (most mobile devices go into thermal throttling in <200ms at full load, and many NAS/microserver style devices are not much better).

AceScottie
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 23, 2017 1:25 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by AceScottie »

HurkWurk wrote:option D, purchase an old refurb business class pc to use as a server. should not cost more than $100.
$100 might not be much but then add the noise (it is in my bedroom where i have to sleep) and the power usage which is like what 400w.

To give a quick and dirty calculation, a 400w pc running at about 350w (optimal) meaning 0.35kwh running 24 hours a day so 8.4kwh per day.
I pay 13.21p per kwh (in UK pence) so thats 13.21*8.4= 110.964p per day, so basically £1.11 per day ... That amounts to £31 a month if i left it running 24/7...

however lets calculate a SBC as a server.
so they use 5v @ 1.2amp (my own) but to make it a more applicable to everyone, i will calculate to a 2 amp plug. so using Ohms law 5v*2a=10w, so thats 0.010kwh which is simply 0.24kwh per day. again using 13.21p/kwh so 0.24*13.21 3.1704 pence per day. a monthly cost of 89 pence per month

So quite simply the difference between running a full PC as a server vs SBC is about 35.6 times the running cost.

orzelek
Smart Inserter
Smart Inserter
Posts: 3853
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by orzelek »

You are not counting one thing.
Even if you would have ARM build it wouldn't be able to handle big factory.
Due to how game works server runs it's own simulation - that kind of small server wouldn't have that much of computing power I guess.

So after a lot of work to port server to ARM you'd get one that would be able to run small/med factory and UPS would tank after that most likely.

AceScottie
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 23, 2017 1:25 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by AceScottie »

orzelek wrote:You are not counting one thing.
Even if you would have ARM build it wouldn't be able to handle big factory.
Due to how game works server runs it's own simulation - that kind of small server wouldn't have that much of computing power I guess.

So after a lot of work to port server to ARM you'd get one that would be able to run small/med factory and UPS would tank after that most likely.
But do we need more than that ? im not a fan of huge mega factories as quite frankly i dont have the time, but thats one of my main gripes with this game... Time... how many hours upon hours have i wasted waiting for that next research to upgrade to the next step or waiting for some speed moduals to fully service a product line...
If i could just stick it on one of these SBCs for a night running at 10 or 20 ups i would be more than happy, could add a mod to queue up research and let it have at it, or leave it on while i stockpile materials for my next build.

How long does it take to make 100 turbines and a and a reactor ? too long to do by hand but not long enough to automate the process and integrate it into your factory, something like that could be pseudo automated and left to run at night while you sleep, then when you wake up and start playing its done and you can continue to expand.

I know there will be a point where the ARM CPU will not be able to handle a factory, but thats late game 30-40 hours down the line, to me thats where the fun starts but before that you have to get through the time sync.

milo christiansen
Fast Inserter
Fast Inserter
Posts: 106
Joined: Thu Jul 30, 2015 7:11 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by milo christiansen »

Look, you can't run Factorio on ARM. ARM chips simply aren't powerful enough. Nothing you can do will change this.

AceScottie
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 23, 2017 1:25 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by AceScottie »

milo christiansen wrote:Look, you can't run Factorio on ARM. ARM chips simply aren't powerful enough. Nothing you can do will change this.
it can run a full instance of Minecraft... pretty sure it can handle a small factorio server.

Considering their required specs (taken from a quick google search) 1.5GHz Dual core and from post (viewtopic.php?f=133&t=6585&start=50) 1GB RAM

Isnt this a little weird, they require 1.5 dual core CPU but only use 1 core. or are they taking the full core and the other is for system ?

milo christiansen
Fast Inserter
Fast Inserter
Posts: 106
Joined: Thu Jul 30, 2015 7:11 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by milo christiansen »

It can run a full instance of Minecraft, very poorly with view distance turned way down. And ARM GHz is not directly comparable to amd64 GHz for a bunch of reasons.

AceScottie
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 23, 2017 1:25 pm
Contact:

Re: Factorio Server For ARM (Pretty Please

Post by AceScottie »

milo christiansen wrote:It can run a full instance of Minecraft, very poorly with view distance turned way down. And ARM GHz is not directly comparable to amd64 GHz for a bunch of reasons.
my point with no dedicated GPU it can still run it, even as poor as it may be there is still enough humph behind it to run. And im not expecting a factorio sever to run a graphical version either, just the headless version.
with the profomance of ARM im guesstimating i can at least hit 30 UPS and maybe a little lower without active cooling. but adding a fan and sticking it in the attic or somewhere out of the way wouldnt be a problem due to its size.

and im fairly familiar with the differences, i own at least 10 ARM SBC and work as a developer on multiple others.

Anyone who is expecting a perfect product on ARM is foolhardy and thats why i said even if it barely works it will be fine, even if there is no support. Just call it a community edition. If it fails to take off or is too horrendous to run then fine, scrap it. but at least give it a try. and hey if it works you might get fun posts about idiots like me trying to run it on a $5 raspberry pi zero :) (Maybe a pool of arduinos XD )

Post Reply

Return to “Ideas and Suggestions”