A price tier between shared and performance?

Hi everyone!

I’ve been questioning in the forum about the possibility to have some cpu tier between the shared and performance. My app, a game server, is very cpu heavy and I plan to have loads of these created on fly. I’m pretty close to starting beta testing it.

The problem is that the game server runs with Bun and is mostly utilizing a single core. Back in the day a shared 1x instance was enough to power it because stealing being ok :laughing: Nowadays, I can only run one game server reliably with 1x performance machine. It utilized around 50-60% of the core.

Running performance machines seem a bit scary, since the price gap between these machines is huge compared to shared ones. So the big question is… Is Fly going to introduce some tier that would allow you to more freely choose how much cpu you want to be utilizing per core?

3 Likes

there have been thoughts about reworking the shared CPU plans to be more flexible like this, but no plans at the moment.

this might or might not help: a performance-1x is an entire host CPU core. a shared-cpu-1x is 1/16 of a host CPU core. by the power of math, a shared-cpu-8x is… 1/2 of a host CPU core :slight_smile:
it is exposed in the VM as 8 logical CPUs, but you can ignore 7 of them and run an effectively single-threaded process with access to 50% of a performance-1x, plus whatever you get from burst allowance.

Thank you for the reply, appreciate it!

I tried before the 8x shared and it started throttling after some period, so I might still need the 16x. I’m a bit suspicious on that as well, since the app is so cpu heavy I think there might be something weird happening with trying to balance it with all the cores.

I basically have no problem running the performance machine other than the costs are pretty high :smiley: The whole project is designed to scale into 0 costs (except database), but I fear the sudden rush of people playing the game which could up the costs pretty rapidly if people keep playing for long periods of time. Basically the users are able to create the machines on the fly when they start gaming. Pretty much like Path of Exile does things.

Previously before the cpu throttle update, I could manage with the shared cpu 1 with 512mb of ram. In the case that there are constant 100 unique “host” players as in 100 machines, would cost me $333.79 monthly. Not that bad. Now, the next minimum set I can get the game working might be the 16x shared, which only allows 2048mb of ram, and that again with constant 100 machines would be $2,195.23 monthly. That is HUUUUGE difference for me and kind of makes me think of the affordability. And the same set with performance 1x machines (100) would be $3,221.23 monthly. That is 38 652 dollars yearly, which is a bit more than what that (100) 1x shared would be which is 4 008 dollars… Yikes :smiley:

Of course this would be a “positive” problem to have as many users/players, but also it makes me think if I should look other options for server hosting or even scrap the whole idea and make the game peer to peer. Also to note is that this calculation is really hypothetical, since the servers will be running only on gameplay sessions, and not for example when players are idling in the hub area. Also, you can host the game (as in the machine) for your friends as well, so the player amount does not directly correlate to machine amounts.

I do also plan to add some sort of ticketing system to the game, which introduces some sort of pay wall for heavy users. And hats. Of course there needs to be hats to cover the rest of the expenses :stuck_out_tongue:

Would be really interesting to chat about this casually with someone from Fly in Discord or some platform, if you are interested throw me a DM. :slight_smile:

shared-cpu-16x doesn’t exist, that would be the same as a performance-1x.

try this:

/ # echo 0 > /sys/devices/system/cpu/cpu1/online
/ # echo 0 > /sys/devices/system/cpu/cpu2/online
/ # echo 0 > /sys/devices/system/cpu/cpu3/online
/ # echo 0 > /sys/devices/system/cpu/cpu4/online
/ # echo 0 > /sys/devices/system/cpu/cpu5/online
/ # echo 0 > /sys/devices/system/cpu/cpu6/online
/ # echo 0 > /sys/devices/system/cpu/cpu7/online

the CPUs will still exist in your VM, but the kernel will only schedule tasks on a single core.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.