Website Hosting Performance: CPU, RAM, Storage, Database and Server Configuration
How to tell a resource limit from an application problem, with the measurements that justify an upgrade — or prove it would change nothing.
In short
"Upgrade your hosting" is the most frequently given and most frequently wasted piece of performance advice. It only helps when a server resource is genuinely the constraint — and most of the time it is not.
A site that is slow because of an uncached page, a redirect chain, or a database query without an index will be exactly as slow on a server twice the size. You will have doubled your bill and changed nothing.
So this guide is about one question, answered with measurements rather than assumptions:
Is my server actually running out of something, or is my application asking it to do unnecessary work?
If it is the second, no hosting plan fixes it. If it is genuinely the first, the measurements will tell you which resource, which also tells you what to buy.
Diagnose before you buy
Work in this order. Each step either finds your problem or rules out a category.
Step 1 — rule out the free fixes
Before touching infrastructure, confirm none of these is your cause:
- No page caching, so every visitor rebuilds the page.
- A redirect chain before the real response.
- Database queries without indexes, usually on listing and search pages.
- An external API call inside the request path.
The TTFB guide walks through isolating these. They account for the large majority of "we need better hosting" conclusions, and all four are free.
Step 2 — measure the four resources under load
A single request tells you almost nothing. You need the numbers while the server is doing what it does on a normal day.
# CPU, memory, and load over a minute
top -b -n 1 | head -20
vmstat 1 10
# Memory, including whether swap is in use
free -h
# Disk I/O: look at %util and await
iostat -x 1 10
# Current connections
ss -s
What you should see on a healthy server: CPU with headroom at peak, no swap in use, disk %util well below saturation, and load average comfortably under your core count.
| Reading | What it means | What to do |
|---|---|---|
| CPU pinned at 100% at peak | Genuinely CPU-bound | More CPU — after checking the work is necessary |
| Swap in use at all | Out of memory | More memory. This is the most damaging limit, because swapping is catastrophically slow |
Disk %util near 100%, high await | Storage-bound | Faster storage (NVMe), or reduce I/O |
| Load average far above core count | Queueing | Find what is queueing — often database or workers, not CPU |
| All four look fine but responses are slow | Not a hosting problem | Go back to step 1 |
That last row is the common one, and it is the whole point of measuring.
Step 3 — check the database separately
The database is a separate resource and frequently the real constraint while the web server looks idle.
-- MySQL: what is running right now
SHOW FULL PROCESSLIST;
-- Are queries queueing or locking?
SHOW GLOBAL STATUS LIKE 'Threads_running';
SHOW GLOBAL STATUS LIKE 'Innodb_row_lock_waits';
Enable the slow query log and read it. A single unindexed query on a large table can make an entire site feel like a hosting problem.
Also check whether the database has enough memory for its buffer pool. A database forced to read from disk because its cache is too small looks like a storage problem and is really a configuration problem.
Step 4 — check your workers and concurrency
Most slowness under load is queueing, not resource exhaustion.
A PHP-FPM pool with 10 workers can serve 10 requests at once. The eleventh waits, however idle the CPU looks. If each request takes 300 ms, you can serve roughly 33 requests per second — and beyond that, response times climb while your monitoring shows plenty of free CPU.
# PHP-FPM: are workers saturated?
systemctl status php8.2-fpm
# Or check the status page if enabled, for "listen queue" and "active processes"
What you should see: active processes below your maximum at peak, and a listen queue of zero. A non-zero listen queue means requests are waiting for a worker.
Raising the worker count only helps if you have memory for it — each worker consumes memory, and over-provisioning workers on a memory-limited server causes swapping, which is far worse than queueing.
Step 5 — test under realistic load
# A modest, honest load test — raise numbers gradually
ab -n 500 -c 20 https://example.com/
Watch your resource graphs while it runs. Raise concurrency until response time degrades, and note which resource moved first. That resource is your constraint, and now you know what to buy.
Choosing hosting, by what you measured
Forget the tier names. Judge by measurable criteria.
| Measured constraint | What actually helps |
|---|---|
| CPU-bound at peak | More or faster cores. Check whether the work is necessary first. |
| Memory-bound, swapping | More memory. The highest-priority upgrade of the four. |
| Disk-bound | NVMe storage, and more memory for database caching. |
| Database-bound | More memory for the buffer pool, better indexes, or a separate database server. |
| Worker-saturated | More workers if memory allows; otherwise faster responses so workers free up sooner. |
| Far from your audience | A CDN first, then consider origin location. |
| Nothing is saturated | Not a hosting problem. Do not upgrade. |
What the hosting types actually differ in
Shared hosting. You share resources with other sites, so your performance varies with their behaviour. The honest problem is unpredictability, not raw capacity.
VPS. Dedicated resources, you manage the stack. Good value if you have someone to manage it.
Managed platform hosting. Someone else handles the stack and caching. You pay more and give up some control; for most teams without an ops person, this is the sensible choice.
Dedicated server. Full resources, full responsibility. Rarely necessary at the scale where people first consider it.
Cloud with autoscaling. Handles traffic spikes well, costs more per unit, and adds complexity. Worth it for genuinely variable traffic; overkill for steady traffic.
Questions worth asking a host
Not "how fast is it", which nobody can answer, but:
- How many CPU cores and how much memory, guaranteed rather than burstable?
- What storage type, and what IOPS limit?
- Is there a request or CPU-time cap, and what happens when it is hit?
- Which data centre regions, relative to my audience?
- Is object caching available, and is a CDN included?
- What are the PHP or runtime worker limits?
Platform differences
Self-hosted. Everything above applies.
Shopify and other hosted commerce platforms. You cannot change the server, its resources or its location. A slow server response is template rendering cost, which is yours — see Shopify theme performance. No plan upgrade changes infrastructure performance.
Hosted site builders. Hosting is the platform. Nothing here is actionable.
Managed WordPress hosting. Most of the caching work is done for you, which is why it often outperforms a self-managed VPS of similar cost despite looking less powerful on paper.
Common mistakes
Upgrading before measuring. The central mistake.
Measuring one request instead of behaviour under concurrency.
Looking only at CPU and missing memory, disk, database and worker limits.
Ignoring swap. Any swap in use is a serious finding.
Adding workers on a memory-limited server, causing swapping — which is worse than the queueing you were fixing.
Judging by tier name rather than by guaranteed resources.
Load-testing production.
Assuming a bigger server fixes slow queries. It makes the same bad query slightly faster.
Buying autoscaling for steady traffic.
Verification
- Re-run the same measurements under the same load and confirm the constraining resource now has headroom.
- Re-run the load test and confirm response times hold at a higher concurrency than before.
- Compare TTFB cold and warm, median of several runs.
- Confirm the resource you upgraded was the one that moved. If you added CPU and the database is still the bottleneck, you bought the wrong thing.
- Check costs against the gain. A 15% improvement for double the bill is a finding, not a success.
- Then watch field data for four weeks.
When it still does not improve
- You upgraded and nothing changed → the server was not the constraint. Go back to caching, redirects and queries. This is the most common outcome.
- Faster for one visitor, still slow under load → queueing. Check worker counts and the listen queue.
- CPU is high and you cannot reduce it → find out what is consuming it. Application profiling usually shows one function, one plugin, or one query.
- Memory keeps filling → a leak, or too many workers. Watch usage over hours rather than minutes.
- Fine on your server, slow for distant visitors → distance. A CDN, not a bigger server.
- Good at the server and poor in the field → your bottleneck has moved to the browser. Server work is done; look at the front end.
Keeping it right
Infrastructure constraints creep up as traffic and content grow, and the first symptom is usually a complaint rather than an alert.
Three habits: monitor the four resources continuously with alerts at a threshold rather than at failure; re-check capacity when traffic or catalogue size changes materially; and keep a record of what your constraint was last time, because the next slowdown is more often a new application problem than the same resource running out again.
Frequently asked questions
Will upgrading my hosting make my website faster?
Only if a server resource is genuinely your constraint, and most of the time it is not. A site slow because of an uncached page, a redirect chain or an unindexed query will be exactly as slow on a server twice the size. Measure before buying.
How do I know if my server is the bottleneck?
Measure CPU, memory, disk I/O and the database under real concurrency, not on a single request. If all four have headroom while responses are slow, it is not a hosting problem. If swap is in use at all, memory is your constraint — and that is the most damaging limit of the four.
Why is my site slow under load when CPU looks fine?
Almost always worker queueing. A pool with 10 workers serves 10 requests at once; the eleventh waits however idle the CPU looks. Check active processes and the listen queue, not just CPU.
Is shared hosting bad for performance?
The honest problem with shared hosting is unpredictability rather than raw capacity — your performance varies with what other sites on the server are doing. A well-cached site on shared hosting can outperform a badly configured VPS.
Should I add more PHP workers?
Only if you have memory for it. Each worker consumes memory, and over-provisioning on a memory-limited server causes swapping, which is far worse than the queueing you were trying to fix.
What should I ask a hosting provider?
Not how fast it is, which nobody can answer. Ask how many cores and how much memory are guaranteed rather than burstable, what storage type and IOPS limit, whether there is a CPU or request cap and what happens when it is hit, which regions are available, and what the worker limits are.
References
- Optimize TTFB — web.dev
- MySQL Performance Schema — MySQL
- PHP-FPM configuration — PHP