Page 1 of 1

Factorio Headless on Google Compute Engine / Docker

Posted: Mon Nov 16, 2020 7:31 pm
by paquerette
Hi,

I've managed to run Factorio Headless server on Google Compute Engine, Docker mode, and load my save game + mods and connect to it.
I'm using this docker image : https://hub.docker.com/r/factoriotools/factorio

here is the documentation I've made about it : (I'll make it readable later, when it works)
https://docs.google.com/document/d/1TqT ... 2SlN4/edit#

With an E2 instance (2vCPU, 4GB of Ram, SSD storage), I can connect to the server, but it lags a lot, like 1 second of delay if I instruct my spidertron to change direction, the graphics is also lagging, it's like we miss a few frames.

I've tried to upgrade the hardware to a N2 server (2vCPU, 4GB of Ram), and despite a more powerful CPU, I can connect, sync mode, load the save, but when it's catching up, the progress bar goes backward until it reach the left extremity and then I get an error message.


Any tips about this setup ?

Paquerette

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Mon Nov 16, 2020 7:48 pm
by Loewchen
What you describe is the experience of a client connected to your server, if it cannot keep up, get faster client hardware or slow down the server. For anything more detailed, follow: 68653.

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Mon Nov 16, 2020 7:55 pm
by paquerette
Thanks Loewchen,

I'm migrating from a private server where it was working correctly, could be better though.
the client were good (i9900, 16BG of RAM, 2080Ti, NVme...)

I'll try with C2 platform, but N2 is already very good.

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Mon Nov 16, 2020 7:57 pm
by paquerette
I've 30FPS (because 30Hz 4k) 60 UPS on the old server.
on the E2, it was 28/58 or something.

So i was wondering if it was network related.

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Mon Nov 16, 2020 8:10 pm
by Loewchen
Network problems should not present like this, especially depleting catch up suggest a performance limit of the client. You can check the server log for network issues between server and client. I would check first if running the client at 1080p changes things.

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Mon Nov 16, 2020 8:47 pm
by paquerette
I'll try to change the resolution, but really, I just change the server, not the client, and I've a high end computer.

Ok, I've restarted the server (not running when we're not playing), and it works well. Didn't change anything...

Thanks for your help, I hope it will stay stable :)

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Mon Nov 16, 2020 8:52 pm
by paquerette
well, now there's a doc to create a factorio server on Google Cloud compute engine ;)
I'll spend some time making it more readable and share it on my blog.

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Tue Nov 17, 2020 6:20 am
by Zavian
Depending on the size of the base (and possibly also mods), 4GB ram might not be enough.

Re: Factorio Headless on Google Compute Engine / Docker

Posted: Tue Nov 17, 2020 8:36 pm
by paquerette
Yes, currently it's using 2.5GB I think.

However, on my previous server, I let the game run for a several weeks, and the game seems to grow in memory footprint as soon we discover new area, ending consuming about 11GB of ram.

After a restart it went down to 2GB.