A $5 VM from Digitalocean has 1vCPU and 1GB of RAM.
The VPS power bill is already paid with its price. For the Raspberry you have to pay the power bill.
Here in Germany we now reach 40 Euro Cents/kWh. 5 Watts 24/7 are 17.52 Euro/Year 10 Watts 24/7 are 35.04 Euro/Year. The Raspberry is somewhere between.
That is the reason why I replaced my Dell t30 Server with two Contabo VPS servers. I also don't have to worry about my ISP screwing up my connection.
Buy a high-endurance card or simply use external media if you have I/O heavy services you run on it.
> The VPS power bill is already paid with its price. For the Raspberry you have to pay the power bill.
True, but that cost is so small. Not sure if those German prices are accurate for most places, but where I live, it's nowhere near 0.40 EUR /kWh, so the cost of electricity per year is marginal at worst, unnoticeable at best.
> That is the reason why I replaced my Dell t30 Server with two Contabo VPS servers. I also don't have to worry about my ISP screwing up my connection.
Taking a look at Contabo (never seen them before), it seems their "Cloud VPS" is all virtual CPUs (not dedicated ones), so not really comparable.
* As someone else said, overclocking helped, and I had a reasonable passive cooling case to help there.
* I used Paper instead of the normal Minecraft server, and I ended up spending a decent amount of time optimising the configuration. Paper by default comes with a bunch of optimisations, I enabled some more, although I also disabled some that were interfering with the more technical areas of Minecraft that I enjoy more.
* Whenever things started lagging, I went on a killing spree for our main farms, and that tended to work well enough. Most of our contraptions were turned off by default, or designed not to be too laggy. I also restarted the server every night, which worked reasonably well as a sort of ultimate GC.
If I were going to do it again more seriously, I'd probably get a cheap mini PC and use that instead, but for what it was - me and a friend rediscovering Minecraft after having not played it probably in about 5-10 years - the pi4 held up pretty damn well.
One problem with these VPS is contention for physical CPU between multiple tenants. Lots of CPU context-switching. Kills performance. You can get dedicated-CPU VPS, but at that point you're basically renting a fraction of a real server and the prices tend to be high.
A $100-$150 old x86 workstation or server off Ebay will do even better (I run several things, including a Minecraft server, on mine, and it performs great for all of it), but your power use will be much higher than with a Pi.
This is also why dedicated instances are usually way better for performance-sensitive hosting compared to beefier VPS instances.
Presumably the pi is just running Minecraft