Yes, swap activity is the best baseline measure, as in “if you see consistent swap activity, you definitely don’t have enough memory”. You can get a bit more performance by ensuring you also have enough memory to store the entire working set of disk pages in memory (I’ve talked about this before, specifically the paragraph that starts, “As far as disk cache goes”), but definitely if you’re swapping, your performance is going to be viciously destroyed.
BTW, for anyone comparing the costs and thinking, “OMFG that’s not worth it”, consider that the colocated server is significantly more powerful than the droplet (8x RAM, etc). The closest equivalent droplet is $160/month, so if you were replacing that droplet size with a colo box you’d make your money back in about five months… sure, time is money, etc etc, but stable hardware doesn’t take that much time to keep an eye on.
It is worth mentioning that Digital Ocean’s VPSs are on the slow side, when you compare head to head with alternatives that have a similar price tag. There are reputable hosting providers that offer roughly twice as fast single core performance.
The 4.2 ghz Skylake and 4.5 ghz Kaby Lake are significantly faster than this, as they have a bit more cache and of course a clock rate higher than 3.5 Ghz. The Ali express box is 15w tdp compared to 90w tdp of those.
On the upside, with all the speed improvements which are apparently coming down the pipe in Ruby 3, we’ll automatically get some tidy speed ups. Single-threaded performance almost always has a strong impact on web application performance, whatever the language or framework, because it’s a problem that strongly resists parallelisation. I can’t think of any languages or frameworks that do much, if any, of the page generation in parallel.
sysbench --test=cpu --cpu-max-prime=20000 run sysbench --test=cpu --cpu-max-prime=40000 --num-threads=8 run
Ali Express mini-pc
High CPU droplet
(in case it wasn’t obvious, lower numbers are better = faster here)
That’s… quite a bit worse than I expected. You are getting a small slice of a 16 core CPU (and it’s only Broadwell, not even Skylake!) which by definition means very low clock speeds, pushing it down to the i7-7500u levels of ~ 2.6 GHz base and 3.6 Ghz turbo.
That is not entirely true. I have no experience on Azure, but I have heard lots of good thing about it in terms of Perf. It is the best out of the three, Google, AWS and Azure. However it is still much more expensive then other cloud VPS provider like DO and Linode, mostly on bandwidth. Amazon lightsail is extremely slow so don’t even bother with it.
Linode has always offered much better CPU Perf, SSD Speed, and Better Network bandwidth. DO has manage to catch up in Network and SSD, but as far as I can tell Linode still wins on CPU performance, on most of the price plans.
It still doesn’t compare well do a dedicated box though.