Beefier `fly machine` size for game server? (dedicated CPU? >2gb memory?)

Ahoy! I decided to try something wild and play with using fly machine to run one-off dedicated server sessions for our multiplayer 3d fighting game (think it might be a good fit for e.g. automated testing the server in our CI system, one-off review instances of a specific game server version, and maybe some/all of our production sessions if all runs reliably). The game’s sessions run for ~5-15 minutes on average (but can go up to an hour or two).

Since we already had a Docker image for the game, machine setup was a breeze (I can connect and run around!! & my EWR ping is really good / consistent). I have some more testing to do to see where it falls over, but from what I’ve seen running on cloud/game server providers, it seems to run best with 2 dedicated vCPUs and 2GB of memory per instance. (Chaotic moments tend to be CPU-bound and cause lag if the CPU is not beefy enough, and from Grafana it seems to be riding quite close to the memory limit so I’m a bit concerned it might go over the 2GB on a long session.)

Is there any way to push CPU performance a bit further / increase the shared instance memory past 2GB if needed? Will something like dedicated-cpu-2x be usable with fly machine in the future? (Would love to help test the performance impact if/when that happens!)

2 Likes

That’s really nice to hear!

You should be able to define specific resources you want via --memory and --cpus of the fly machine run CLI. You might have to also do --cpu-kind dedicated, but this is (probably) going away in a future version of the CLI.

Ah yes, --cpu-kind dedicated may already have gone away, returns: Error unsupported cpu-kind flag, only shared allowed

Excited about the possibility for this to replace/complement multi-region game server systems like AWS GameLift / GCP Agones / Azure PlayFab Multiplayer Servers some day down the road!