Advent calendar From 1 December, a new deal every day at 8 am. To the calendar
Technology & operations

SSD, NVMe or HDD: which storage suits my server?

In short

NVMe drives are SSDs connected directly via PCI Express. They are the fastest for random access. SATA SSDs cost less and are sufficient for most servers. HDDs are slow but considerably cheaper per terabyte, which makes them suitable for archives and backups. For databases and IO-heavy applications you should choose NVMe.

Key facts

NVMe
SSD with PCIe connection, most IOPS
SATA SSD
Cheaper than NVMe, sufficient for most servers
HDD
Cheap per terabyte, few IOPS
Key metric
IOPS and latency instead of MB/s
Endurance
Stated as the drive's TBW rating
At Realtoxmedia
NVMe, SSD and HDD per product

How HDD, SSD and NVMe work

An HDD stores data magnetically on rotating platters addressed by a moving read-write head. Every access to a different location requires mechanical movement and typically takes five to ten milliseconds. SSDs store data in flash cells and have no moving parts. An access takes a fraction of a millisecond, regardless of where the data sits. Classic SSDs are attached to the SATA interface, which was designed for hard disks and reaches its limit at around 550 MB/s. NVMe is a different protocol for the same flash storage. The drive sits directly on the PCI Express bus, talks to the CPU through many parallel queues and so avoids the SATA limit.

The storage types compared

The following orders of magnitude show how far apart the types are. The exact values depend on the model and the access pattern, but the ratios stay similar. All figures refer to individual drives, not RAID arrays. Price per capacity runs opposite to performance. That is why data is usually split across different storage according to purpose.

  • Random access IOPS: HDD a few hundred, SATA SSD a few tens of thousands, NVMe several hundred thousand.
  • Access time: HDD around 5 to 10 ms, SATA SSD below 0.1 ms, NVMe in the microsecond range.
  • Sequential throughput: HDD 150 to 250 MB/s, SATA SSD up to around 550 MB/s, NVMe several GB/s.
  • Capacity per euro: HDD cheapest, SATA SSD mid-range, NVMe most expensive.
  • Endurance: stated as TBW for SSD and NVMe, limited by mechanics and running hours for HDD.
  • Behaviour under parallel load: HDD drops off sharply, SATA SSD moderately, NVMe stays largely stable.

Why IOPS and latency say more than MB/s

Data sheets usually quote sequential throughput because it gives the biggest numbers. For server workloads it rarely matters most. Web servers, databases and mail systems read and write many small blocks at scattered locations. For this random access, what counts is the number of input and output operations per second and the latency per operation. A database query with twenty small reads easily waits a hundred milliseconds on an HDD and under a millisecond on NVMe. Sequential throughput matters when large files are moved in one piece, for example in backup runs, video files or archive transfers. So first check which access pattern your application produces.

Which storage type for which application?

Split your storage by access pattern. Expensive drives for rarely read data waste money, and archive storage under a database costs performance. The following pairings work well and can be combined; many systems use several storage classes side by side. With virtual servers the provider decides on the storage, so the storage type should be stated in the offer.

  • NVMe: databases, online shops, virtual machines, CI runners and other workloads with many small accesses.
  • SATA SSD: web servers, application servers and general system partitions.
  • HDD: backups, archives, media libraries and log storage with large data volumes and infrequent access.
  • Hybrid: HDD capacity with an NVMe cache, when you need plenty of space and usable response times.
  • Separate drives for system, database and backup, so that a backup run does not slow the application down.

What to look for in offers

Two offers that both say NVMe can differ a great deal. What matters is which drive class is installed and how it is operated. Enterprise drives have higher TBW ratings, protection against data loss during a power failure and consistent write performance. Consumer models slow down considerably once their write cache is full, which causes problems on a host under constant load. So ask for more than a single data sheet figure:

  • Enterprise or consumer drives, and with what TBW rating?
  • Is there a RAID array, and which level with which fault tolerance?
  • Is the storage attached locally to the host or reachable over a network?
  • Is overprovisioning used so that write performance stays stable over the service life?
  • Is there separate backup storage, or do data and backup sit on the same array?

Which storage does Realtoxmedia use?

The storage type depends on the product. Dedicated servers come with NVMe, SSD or HDD depending on the configuration, combined with hardware RAID. The 10 Gbit NVMe models are intended for IO-intensive applications with high throughput and include unlimited traffic. The Virtual Dedicated Server (VDS) stores data on SSDs in our Ceph cluster, which tolerates the failure of individual drives. The Storage VPS is designed for capacity and uses HDDs in the Ceph cluster with an NVMe cache, from €3 per terabyte per month. It is intended for backups, archives and large data sets, not for a production database.

Bottom line

Choose storage by access pattern. NVMe suits databases and many small accesses, SATA SSD general-purpose servers, HDD archives and backups. IOPS and latency tell you more than the MB/s figure on the data sheet.

Questions about our services?

Write to us. Advice on the right configuration is free and without obligation.