VPS on HDD: where a hard disk pays off and where it becomes the bottleneck
A hard disk loses to an SSD in almost everything except the price per gigabyte. So a VPS on HDD is not an outdated option but a tool for specific tasks: where there is a lot of data, accessed rarely and in large chunks. The mistake begins when something that lives on small random operations is put on such a disk.
IOPS versus capacity: why an HDD is not always slow
A mechanical disk has two very different speeds. Sequential reading and writing of a large file are fast, at 150–250 MB/s for a single disk and more for an array. Random access, however, hits the limits of mechanics: the head has to travel to the right track, and a single disk performs only around 100–200 operations per second. A good NVMe drive does hundreds of times more. A detailed comparison of drive types is on the VPS on NVMe page.
On a VPS, neighbours add to this: the disk array is shared, and if one of them starts a heavy operation, the disk queue grows for everyone. Hosts partly rescue the situation with an SSD cache and a RAID controller with its own memory, so the real picture depends on the specific node.
Hence a simple selection criterion. Look at how your application accesses data. If it reads and writes large files as a whole, from hundreds of megabytes upwards, an HDD is barely behind an SSD and costs several times less per gigabyte. If the program constantly accesses thousands of small files or records, IOPS and latency decide everything, and the difference from an SSD will be felt in every request. The size of the hot data matters too: when the frequently used part fits into RAM, the system caches it, and the disk works mostly for writes.
RAID and the reliability of HDD plans
Hard disks fail more often than solid-state drives, especially under constant load. So HDD nodes are almost always built in RAID: the failure of one disk does not stop the server, but speed drops noticeably while the array rebuilds. This is a normal phenomenon that hosts rarely warn about. RAID does not replace a backup: it won't save you from deleted files or mistakes.
Tasks an HDD is suited to
- A backup target. Backups are written as a stream and read rarely, while the volume grows over time. This is the main scenario; see VPS for backups.
- An archive of documents, logs and exports that are accessed once a week or less often.
- Distributing large files to your own users: your software's distributions, company video materials, installation images. Reading is long and sequential.
- A secondary replica or cold standby that does nothing while the main server is alive.
If the task is to store a lot for a long time, take a look at the Storage VPS selection with disks from 500 GB. How such a server compares with cloud storage on the price per terabyte is covered in S3 object storage at hosts.
Where an HDD will slow you down
- Databases. MySQL and PostgreSQL perform thousands of small random operations and call fsync on every transaction. On an HDD this means delays of tens of milliseconds per query.
- CMS-based websites without full caching: every page means dozens of file reads and database queries.
- Docker and builds: unpacking images and installing dependencies means thousands of small files.
- The system itself. Package updates, log searches and reboots run several times slower on an HDD. Sometimes it is wiser to take a small SSD server for the system and applications and use an HDD server or an additional disk only for data.
The sign that you are hitting the disk limit is a high wa in top with an almost idle CPU and large await values in iostat -x 1.
How to check the disk after buying
The dd test shows only sequential writes and often hits the cache, so for an HDD it is especially misleading. Use fio and test both scenarios with the --direct=1 flag to bypass the system cache:
- sequential write:
fio --name=seq --rw=write --bs=1M --size=4G --direct=1; the benchmark for an HDD array is 100 MB/s or more; - random read:
fio --name=rand --rw=randread --bs=4k --size=2G --iodepth=16 --direct=1 --runtime=60 --time_based; a normal result for an HDD is hundreds of IOPS, while thousands point to an SSD cache.
Make the test size larger than the server's RAM, and run it several times at different times of day: in the evening, when neighbours run their backups, the result can drop noticeably. If the figures match the task, the HDD will earn its money; if not, it is better to move in the first days than to transfer terabytes later.