September is the first full month we’ve been running the Minecraft server on Google Cloud, and the first chance to see what it would cost in total. It was a bit of a surprise to see that it cost $134.99 for one month of use. Fortunately we are still running on free credits until November.
I could see the trend going this way for most of the month, although there was a slight flattening of the line towards the end, after I switched from using 2 vCPUs and 8GB RAM custom, to an n1-standard-2 (2 vCPUs, 7.5 GB RAM). This should work out to be about $15/month cheaper than the custom instance, but the monthly cost of the server is still far too much.
Looking at the billing report by SKU, you can see a breakdown of the major costs. The majority of it is the CPU cores running, broken down by the custom and standard instances. As mentioned above, there should be a bit of savings here next month by sticking with the standard configuration.
The second largest expense was the network internet egress, which states we transferred around 170GB of data. Now for an average of 10 players on the server, this seems like an abnormally high amount of data transferred, until you take into account the backups being done. The server is backing up the World and Plugin folders every 4 hours to a Google Cloud Storage Bucket. Initially the backup was done at a folder level with no compression, so it was about 1.9GB per backup. I reduced this to 1.2GB per backup by compressing the folders into a tar.gz file before uploading. Since adding the DynMap plugin, the size of the backup is now climbing above 2.3GB per backup as it renders more of the world into map form. I may need to be more selective with what we back up, or find a way to only back up differential instead of the whole directory; to reduce the data transferred. The actual storage of the data is quite inexpensive, at 88 cents for the month, so it is the network traffic, even though it is being transferred in the same zone (us-central1). I will look into if there is a way to move things around so the network traffic for backups isn’t counted as Network Internet Egress.
The other thing I am working on to help reduce server costs, is a way to shut the server down when there are no players on. This would mainly be used during sleep and work hours. I’m still refactoring Python code, but I will put a separate post up with more information once it is ready.
I know there is an option for a sustained use discount, but I haven’t seen it applied yet. I will have to investigate why – possibly it isn’t applied when using Free credit.
I would appreciate any other suggestions for reducing cost for this server. Feel free to leave a comment, or reach me through any of the methods on the Contact page.