Page 1 of 1

Need some advice running server on virtual machine.

Posted: Sun Mar 15, 2020 6:01 pm
by Demitor
Hey guys I was wanting to play factorio with 2 of my family members and was wondering if setting up a virtual machine (debian linux) using hyper-v would work or not. We plan on using about 100 mods or so. At most 3 of us will be connected at a time, with 2 of us on the same local network.

My system specs are:
Windows 10 Pro
AMD Ryzen 9 3900X 12-Core
G.Skill Trident Z Neo 32GB 3600MHz DDR4 Ram
Asus Geforce RTX 2080 Super
1TB Sabrent Rocket NVMe 4.0 SSD
2TB Seagate Disk Drive 7200 RPM 256mb Cache
1 Ggps download / 35 Mbps upload internet speed

I'm assuming I have enough hardware resources to the run the VM server and play factorio at the same time, but was wanting to make sure and ask how much resources I should dedicate to the VM.

My initial thought was to just dedicate half my cores, 10gb of ram and 100GB of the ssd to it.
Thanks for any help!

Re: Need some advice running server on virtual machine.

Posted: Sun Mar 15, 2020 6:02 pm
by Koub
[Koub] Moving this to Technical Help subforum.

Re: Need some advice running server on virtual machine.

Posted: Sun Mar 15, 2020 8:07 pm
by eradicator
Any particular reason why you can't just run the headless server on the same machine without adding an extra VM layer?

Re: Need some advice running server on virtual machine.

Posted: Sun Mar 15, 2020 10:51 pm
by Demitor
eradicator wrote:
Sun Mar 15, 2020 8:07 pm
Any particular reason why you can't just run the headless server on the same machine without adding an extra VM layer?
I thought I read somewhere that running the headless server and the client factorio doesn't work as two instances of factorio can't run at the same time in windows.

Re: Need some advice running server on virtual machine.

Posted: Mon Mar 16, 2020 6:36 am
by Zavian
Demitor wrote:
Sun Mar 15, 2020 10:51 pm
eradicator wrote:
Sun Mar 15, 2020 8:07 pm
Any particular reason why you can't just run the headless server on the same machine without adding an extra VM layer?
I thought I read somewhere that running the headless server and the client factorio doesn't work as two instances of factorio can't run at the same time in windows.
Two parallel installs will work fine on the same machine if at least one is the portable .zip version. The Steam version and the .exe Factorio installer both try to write to the same locations in %appdata%. The simplest way to work around that is to use the portable .zip version.

Re: Need some advice running server on virtual machine.

Posted: Mon Mar 16, 2020 5:18 pm
by Demitor
Zavian wrote:
Mon Mar 16, 2020 6:36 am
Demitor wrote:
Sun Mar 15, 2020 10:51 pm
eradicator wrote:
Sun Mar 15, 2020 8:07 pm
Any particular reason why you can't just run the headless server on the same machine without adding an extra VM layer?
I thought I read somewhere that running the headless server and the client factorio doesn't work as two instances of factorio can't run at the same time in windows.
Two parallel installs will work fine on the same machine if at least one is the portable .zip version. The Steam version and the .exe Factorio installer both try to write to the same locations in %appdata%. The simplest way to work around that is to use the portable .zip version.
Ah I see, do you think the VM layer would be lower performance than running the zip or practically the same performance between the two.

Re: Need some advice running server on virtual machine.

Posted: Mon Mar 16, 2020 7:59 pm
by eradicator
Computing x+a is never faster than computing just x. So yes, VM will be slower. As to "how much slower"...that depends on too many things to give an easy answer. But either way it won't matter until the factory becomes larger. And when it becomes large you will want every UPS you can, and running it twice on the same machine might be a bottleneck. Though factorio being largely single-threaded the CPU won't matter, but factorio is also RAM latency bound. If you intend to build large i recommend downloading a megafactory save from reddit and testing how well one vs two instances run on the same machine. Which again doesn't matter if any of the people you play with have a less powerful machine because factorio is also weakest-link.

Re: Need some advice running server on virtual machine.

Posted: Mon Mar 16, 2020 9:47 pm
by Demitor
eradicator wrote:
Mon Mar 16, 2020 7:59 pm
Computing x+a is never faster than computing just x. So yes, VM will be slower. As to "how much slower"...that depends on too many things to give an easy answer. But either way it won't matter until the factory becomes larger. And when it becomes large you will want every UPS you can, and running it twice on the same machine might be a bottleneck. Though factorio being largely single-threaded the CPU won't matter, but factorio is also RAM latency bound. If you intend to build large i recommend downloading a megafactory save from reddit and testing how well one vs two instances run on the same machine. Which again doesn't matter if any of the people you play with have a less powerful machine because factorio is also weakest-link.
I see thanks for the info! Ill have to do some testing, one thing running the game from the zip folder would probably allow me to set affinity to my fastest cores as well so imma definitely go with that and see if i can tighten up my ram timings. Kinda sucks, my buddies computers aren't quite as good as mine as far as single-threaded (amd phenom's) so they are the most likely to start causing UPS problems.
Thanks again!

Re: Need some advice running server on virtual machine.

Posted: Tue Mar 17, 2020 11:27 pm
by eradicator
Demitor wrote:
Mon Mar 16, 2020 9:47 pm
so they are the most likely to start causing UPS problems.
I might have phrased that with a bit too few details. They will suffer UPS problems and start shouting at you while you will see nothing wrong. Factorio doesn't auto-adjust the game speed, you have to do it manually (which is trivial though).