For vanilla, I’d try Paper (a high performance spigot fork) and see if you still have problems. If you’re lagging with 6 people while running Paper, you simply need a better CPU.
Edit: For a little more a month, you can get a Ryzen 3600, 64GB of RAM and much faster NVMe SSD: https://www.hetzner.com/dedicated-rootserver/ax41-nvme
To be clear, I'm taking about racking your own servers, not cloud "dedicated servers"
You do need to go a bit up in price for proper server hw - although there are a few aging xeon boxes with ecc ram on the low end now.
https://www.oracle.com/cloud/free/?source=:ow:o:p:nav:0916BC...
> Infrastructure
> 2 AMD based Compute VMs with 1/8 OCPU* and 1 GB memory each.
> 4 Arm-based Ampere A1 cores and 24 GB of memory usable as one VM or up to 4 VMs.
> 2 Block Volumes Storage, 200 GB total.
> 10 GB Object Storage.
> 10 GB Archive Storage.
Just to compare with Hetzner - you would typically be able to get 16 or 32gb ram, an i7 with 4 cores and 2x1tb disk (no ssd). I'm guessing single core performance might be higher than the arm offering - and a better fit for minecraft.
Ed: although maybe core count would win out with PaperMC?
In the cheapest offers right now, there's a Intel Core i7-4770, 2x 2 TB Ent. HDD (spinning rust, not ssd) with 32 GB ram. And a xeon box with ecc ram (same, low price).
Either way, it's auction page, may not always have the deals you're looking for in this price range
You can spin up a 4 core 24GB instance, the CPU is 4 dedicated cores and quite fast.
It's not perfect but it ended up being a better experience than we were having with minecraft realms.
A month ago I ran a Paper instance from a Digital Ocean instance with about 4 GB of RAM and OpenJ9 JVM and it never dipped below 20 TPS even with a larger render distance. This was on Vanilla 1.17.
I am somewhat irrationally biased against J9 because they made us stick it in everything at IBM, but I'm willing to reconsider for better Minecraft performance.
I run my server on a 32GB Ryzen5 PC with the world on an SSD and it often struggles with just 2 players no matter what options I tweak. Keep dreaming of the day the Java parts get the same performence as the Bedrock parts (but I know it'll likely never happen.)
While developing this did you come up with any best practice recommendations for individual nodes?