Databases & Storage
NVMe vs SSD vs HDD: Choosing the Right Storage for Your VPS
By NileVPS Team · Published · 5 min read
اقرأ المقال بالعربيWhen people compare VPS plans they usually look at CPU cores and RAM first, but storage often decides how fast a server feels in daily use. A database waiting on disk, a slow package install or a backup that takes all night are all storage problems. This guide explains the main drive types, the metrics that matter, and the difference between block and object storage, so you can match storage to your workload instead of just picking the biggest number of gigabytes.
The three drive technologies
HDD (hard disk drive)
Spinning platters with a moving read/write head. Every random read requires the head to move, which takes milliseconds. HDDs are cheap per gigabyte and fine for large sequential files, but they handle random access poorly, which is exactly what databases and busy websites generate. They are mostly used today for archives and bulk backups.
SATA SSD
Flash storage with no moving parts, connected through the SATA interface originally designed for hard disks. Random access is dramatically faster than on an HDD, which makes SSDs a big step up for any server. The SATA interface itself limits throughput to roughly 600 MB/s.
NVMe SSD
Flash storage attached directly over PCIe using the NVMe protocol, which was designed for flash from the start. It supports many parallel command queues and has much lower overhead, so it delivers higher throughput, more operations per second and lower latency than SATA SSDs. For databases, caches and busy applications it is the best general choice.
The metrics that actually matter
| Metric | What it means | Who cares most |
|---|---|---|
| IOPS | input/output operations per second, usually small random reads/writes | databases, mail servers, many small files |
| Throughput | megabytes per second for large sequential transfers | video, backups, large file transfers |
| Latency | time for a single operation to complete | databases, anything interactive |
A typical web application performs many small random reads and writes, so IOPS and latency matter far more than peak throughput. A drive advertised with an impressive MB/s figure may still feel slow if its random-access latency is high.
Keep in mind that on a VPS, the drive is shared or virtualized. The real performance you see depends on the provider's hardware, how storage is attached and any limits applied per server. That is why measuring is better than trusting a label.
Comparing the types at a glance
| HDD | SATA SSD | NVMe SSD | |
|---|---|---|---|
| Random access | slow | fast | fastest |
| Sequential speed | moderate | good | very high |
| Latency | milliseconds | low | lowest |
| Cost per GB | lowest | medium | higher |
| Best for | archives, cold backups | general hosting | databases, busy apps |
Block storage vs object storage
Drive type is only half the decision. How storage is presented to your server matters too.
Block storage
Block storage appears to the operating system as a disk, such as /dev/sdb. You format it with a filesystem and mount it:
lsblk
sudo mkfs.ext4 /dev/sdb
sudo mkdir -p /mnt/data
sudo mount /dev/sdb /mnt/dataAdd it to /etc/fstab (using the UUID from blkid) so it mounts on boot. Block storage is what you want for databases, application files and anything that needs normal file access and low latency. Extra volumes can often be attached and detached, which is useful for growing disk space without resizing the whole server.
Object storage
Object storage keeps files as objects in buckets, accessed over HTTP through an S3-compatible API rather than mounted as a disk. It scales to very large amounts of data and is usually cheaper per gigabyte, but each request has network latency. It is ideal for:
- backups and archives
- user uploads and media served to the web
- static assets behind a CDN
It is a poor fit for running a database directly. Tools such as rclone or restic can push backups from your VPS to an object storage bucket.
How to test the disk on your VPS
fio is the standard tool for measuring disk performance. This test measures random 4K reads, similar to database access:
sudo apt install fio
fio --name=randread --rw=randread --bs=4k --size=1G --numjobs=4 \
--iodepth=32 --ioengine=libaio --direct=1 --runtime=60 --group_reportingLook at the IOPS and the latency percentiles in the result. To watch disk load on a live server, use iostat -x 1 from the sysstat package; a high %util and rising await values indicate the disk is a bottleneck.
Choosing for your workload
- WordPress or small business site: SSD or NVMe; size for files, database and a few local backups.
- E-commerce or database-heavy app: NVMe, with headroom so the disk never fills.
- Backups and archives: object storage or cheap bulk volumes, kept off the main server.
- Media-heavy sites: block storage for the app, object storage plus a CDN for media.
Never let a disk run full. A full disk can stop databases, break logins and corrupt writes. Monitor free space with df -h and rotate logs. For plan sizes, see our pricing page; if you are planning a move from shared hosting, read shared hosting to VPS migration.
FAQ
Is NVMe always worth it over SATA SSD?
For databases and applications with many small reads and writes, the lower latency is noticeable. For a mostly static, well-cached site, the difference is small because content is served from memory. When prices are similar, NVMe is the safer choice.
Should I keep backups on the same disk?
No. A backup on the same disk disappears with it if the server fails or is compromised. Keep at least one copy elsewhere, such as object storage or another server, and use snapshots as an additional quick-restore layer.
What does RAID add to a VPS?
On most VPS platforms, redundancy is handled by the provider's underlying storage, not inside your server. RAID protects against a drive failing, but it is never a substitute for backups, because it faithfully copies deletions and corruption too.