VPS vs web hosting for your website – both are equally fast
In my years at Hostup, a great many people have asked about VPS. Most of them, if not all, assume that a VPS is better than web hosting. By better they usually mean faster: that their website would load faster on a VPS than on web hosting.
Many people talk about “upgrading to a VPS”. That is not so strange when everyone writes that a VPS is better. But would you believe me if I said both are equally fast?
In this post I set up two WordPress websites. One runs on our VPS XS and one on the Start web hosting plan. Then I test the capacity, meaning how many visitors the website can handle. I also test the speed, both with and without a caching plugin.
How does WordPress perform on web hosting?
For the test I installed a clean WordPress site on our Start plan. I then used ApacheBench, a tool that measures the figures we are after. I ran this command in my terminal:
ab -k -n 1000 -c 4 https://webbhotell-test.3li.se/Here are the results:
- Server software: LiteSpeed
- Total time for the tests: 38.402 seconds
- Page visits: 1000
- Failed requests: 0
- Requests per second: 26.04 [#/sec] (mean)
- Time per request: 153.607 [ms] (mean)
- Connection times (ms): min: 128 ms, mean: 153 ms, max: 312 ms
Percentage of requests served within a certain time (ms):
- 50% of requests were served within 149 ms
- 90% of requests were served within 170 ms
- 99% of requests were served within 223 ms
- The longest request took 312 ms to complete.
In short, the web hosting plan handled 26 visits per second. On average the page loaded in 153 ms.
With page caching turned on, the figures improve a lot. We go up to 77.53 requests per second and the page load time drops to 49 ms.
How does WordPress perform on a VPS?
We set up a test site with WordOps. Then we measured it the same way as before.
Without caching, the VPS handled 40.49 visits per second. On average the page loaded in 133 ms, which is within the margin of error. With caching turned on, the websites were just as fast as on web hosting.
Summary
Based on my tests, I can confirm that web hosting and a VPS are equally fast. Saying that a VPS is faster is simply wrong.
In my test, both the web hosting plan and the VPS were limited to 2 CPUs and 4 GB of RAM. I tried adding more RAM. It made no difference.
Many people probably believe that more RAM and “faster” storage make a faster website. That is not true either. Think of them as limits instead. Most websites do not need high limits. A really popular online shop with 100,000 visitors a day is probably very demanding. In that case you can see better performance with higher limits.
Even for very popular websites, a VPS is not better than web hosting. Whether a popular website can stay on web hosting depends on whether you can buy more resources. With us you can move to a larger plan on both web hosting and VPS.
If a VPS is not faster than web hosting, why choose one?
In most cases I recommend web hosting over a VPS. It is much easier to get started.
I ONLY recommend a VPS when you need or want to change settings that cannot be changed on web hosting. You may want to run NGINX as your web server instead of LiteSpeed, or have more control over security.
Another reason may be that you want a specific control panel such as DirectAdmin. Our web hosting uses cPanel. If you would rather have DirectAdmin, perhaps because you are used to it, you need a VPS.