Our community has high traffic spikes based on real world events. Ice hockey games to be exact, that result about 1000 messages to a dedicated topic in about 2,5…3 hours. As discussed in another topic, we have trouble dealing with the spikes.
This has lead me into prospecting other hosting options, on a limted budget. The target is around 50€ per month. The market has evolved since the last time I have studied the offers.
For just 42€ you can get a dedicated box from Hetzner, with Ryzen 5 3600 CPU. That is a pretty powerful CPU with 6 cores. As it happens, I have a similar CPU on this laptop, and it can perform single-thread crunching about 40…50% faster than a typical well performing VPS.
But in the same price range you can buy a VPS that has a huge number of cores, with somewhat lesser performance. Contabo gives you 10 cores for just 27$ and Hetzer comes with up to 16 cores at 62€. And these are just examples, many other providers out there.
These offers left me wondering, what kind of core setup is ideal for Discourse, in terms of maximizing the peak output? Fewer with higher performance, or a lot of them?
I tried searching for this, and mostly found my old posts . I recall this was a topic that came up here and there in the early days, but has not been thoroughly discussed recently. A lot of code has changed over the years, so perhaps the behavior of the software or generic recommendations have as well?
You’re right it’s old posts but the trend seems consistent
How about a scalable instance for the game nights ? With a little down time it’s easy to backup and spin larger or smaller. I had a similar problem with a jitsi instance (great component BTW ) , most of the time it sat on its hands, but few times a week…
Even though I introduced our case in the OP, the intention was to discuss this on the generic level. I may be on the hosting market in the mid-term future, regardless whether I have our root case identified or not.
For Discourse, you should favor fast cores over more cores. If you can get both, that’s even better (for load scenarios). But in the typical case, 2 fast cores will do better overall than 4 slow cores.
We tend to measure this in build time, here are some examples. But any single threaded benchmark will also do.
Ideally you want a build time under 4 minutes (240 seconds).
I’m no expert on the subject, but I’m not sure the virtual cores of a VPS are comparable at all to physical cores of a CPU. I guess that to have a broad approximation, you could look at the amount of RAM offered, and assume they run these VPS on a 256 Mo computer. Contabo with their “10 (virtual) cores” offers 60 Mo of RAM. They probably run 4 of these on something approx. equivalent to the Hetzner dedicated server you mention (a server with 256 Mo). So, I would assume the “10 (virtual) cores” are approx a quarter of the performance of the “6 (physical) cores”. Let’s say half tops if they run 2 of them on a 128 Mo computer (which may have a better or slower CPU than the Hetzner machine, who knows).
(You can really only compare “virtual cores” between the different VPS offers of the same provider. I’m not even sure it makes sense for comparisons of VPSes of different providers).
If you want to know for sure, you have to subscribe for 1 month and run a benchmark. Or convince them to run it for you, or offer you a free trial for a short period of time. If it’s really performance you’re after, that’s the real only way to know for VPSes. Or go with a dedicated server where you have more accurate informations.
EDIT: VPS providers like Contabo usually use KVM to do virtualization, and after a search, it indeed seems you can show more “virtual cores” than you actually have physical cores. Example: