What to choose for storage for your server. HDD, SSD, NVMe?
Whenever you’re choosing a server for your project, one of the main aspects is the storage. Before even considering RAIDs, we need to think about what kind of storage to choose. There’s always a trade-off, and it’s crucial to determine if your project or website will truly benefit from the speed that different storage options offer.
Choosing storage is like choosing a vehicle. You can’t say trucks are useless. Driving to the supermarket in a truck might be overkill, but if you need to move tons of stuff, nothing beats it. Similarly, each type of storage is designed for specific needs.
In this article, we will explain the pros and cons of HDDs, SSDs, and NVMe drives to help you choose the right storage solution for your server.
Types of storage
HDD: Hard Disk Drives
Even today, the Hard Disk Drive (HDD) remains a primary way to store data on a computer. Despite the rise of SSDs as replacements, HDDs are still prevalent in many desktop and notebook PCs. The operating system (Windows, Linux, macOS) and all programs are typically stored on the HDD. You likely also save your photos, music, videos, and documents there.
Hard drives use magnetic platters to store data. These platters are divided into sectors and tracks that hold the bytes comprising our files. A mechanical arm moves across the magnetic disk, reading the files requested by the user or operating system. HDDs are a fundamental component in almost any computer system. As a mature technology, HDDs have reached a point where there aren’t significant quality differences between brands. However, certain manufacturers have consistently produced quality HDDs over the years.
Companies continue to develop HDDs that approach the speed of SSDs. For instance, the recently announced Seagate Exos 2X18 can rival the speed of a SATA SSD.
SSD: Solid State Drives
The Solid State Drive (SSD) is a hardware component that is gradually replacing the HDD as the primary data storage drive in PCs. Much faster than HDDs, SSDs have no physical disks or magnetic needles, allowing them to access data in a fraction of a second, making your computer faster at opening programs and performing tasks. By eliminating moving parts, SSDs overcome the speed limitations of HDDs, which rely on read and write heads that move over platters. The significant decrease in price per gigabyte has made SSDs a valuable upgrade to improve the performance of any computer.
Flash memory stores all files, and unlike the magnetic disks of HDDs, it requires no moving parts or motors to operate. All operations are performed electronically, making read and write operations faster, quieter, and more resistant to vibration and drops. A controller manages the data exchange between the computer and flash memory. This processor handles file read and write caching, encrypts information, maps faulty parts of the SSD to prevent data corruption, and ensures a longer flash memory lifespan.
NVMe: Non-Volatile Memory Express
SSDs offer faster data read and transfer speeds compared to HDDs. However, SATA connections present technical limitations, prompting the industry to seek alternatives.
The solution was to use the PCI Express interface, which is more affordable and practical. From this, the industry conceived a new protocol representing an evolution from AHCI, created in 2004. The NVM Express Organization, a consortium of about 80 companies including Intel, Microsoft, Samsung, SanDisk, and Seagate, developed the Non-Volatile Memory Express (NVMe) interface, specifically for SSDs.
The main advantages of NVMe include low latency and improved CPU core utilization. The AHCI standard reaches peaks of 6.0 microseconds, while NVMe can reach an average of 2.8 microseconds. The previous standard created bottlenecks in CPU cores relative to the IOPS (Input/Output Operations Per Second) limit.
As a result, there are benefits for both enterprise and home use. Enterprises benefit from working with heavier loads, which previously suffered from the limitations of SATA and AHCI standards. For home users, the most noticeable factor is reduced power consumption, in addition to improved performance when combined with multicore processors.
Why NVMe is so fast?
NVMe was designed from the ground up specifically for SSDs to improve throughput and IOPS while reducing latency and increasing overall NVMe SSD speed.
Today’s NVMe-based drives can theoretically achieve transfer rates of up to 32 GBps, but the practical maximum is a transfer rate close to 7 GBps. At the same time, latency rates continue to drop. Many drives achieve rates below 20 microseconds (µs) and some below 10.
The older protocols don’t work as well on SSDs. Today’s SATA-based drives can achieve transfer rates as low as 6 Gbps, with IOPS as high as 100,000. Latencies typically exceed 100 µs, although some newer SSDs can achieve much lower latencies.
SAS drives offer slightly better performance; they provide transfer rates of up to 12 Gbps, and IOPS averaging between 200,000 and 400,000. Still, lower IOPS are not uncommon. In some cases, SAS latency rates have dropped below 100 µs, but not by much.
One reason for this is that NVMe uses a more simplified command set to process I/O requests, which requires less than half the number of CPU instructions generated by SATA or SAS. NVMe also has a much more extensive and efficient system for queuing commands. SATA and SAS support only one I/O queue at a time. The SATA queue can hold up to 32 outstanding commands and the SAS queue can hold up to 256. NVMe can support up to 65,535 queues and up to 64,000 commands per queue.
Despite the advantages that NVMe offers, the protocol is limited to individual hosts. While this can be useful in some scenarios, many organizations are looking for distributed systems that they can deploy in their data centers. For this reason, NVM Express has developed a second specification: NVMe-oF.
The new standard was published in June 2016 to extend the benefits of NVMe across network systems such as Ethernet, InfiniBand, and Fibre Channel. The organization estimates that 90% of the NVMe-oF specification is the same as the NVMe specification. The main difference between the two is the way the protocols handle commands and responses between the host and the NVM subsystem.
The NVMe protocol maps commands and responses to the host’s shared memory. The NVMe-oF protocol facilitates communication between the NVMe host and the network-attached NVMe storage device. The new protocol extends the distances that NVMe devices can be accessed within the data center while making it possible to scale to many devices.
The NVMe-oF specification originally provided two methods for communication. The first uses RDMA to support mesh connectivity, such as InfiniBand, RDMA over Converged Ethernet, and the Internet Wide Area RDMA protocol. The second approach is specific to Fibre Channel transport and includes Fibre Channel and Fibre Channel over Ethernet meshes.
In 2019, NVM Express released the NVMe-oF 1.1 specification, which added support for TCP. NVMeMe over TCP makes it possible to use NVMe-oF on standard Ethernet networks without the need to make hardware or configuration changes. The new standard helps bridge the gap between DAS and SANs, while bringing NVMe-oF closer to becoming the de facto standard for enterprise storage.
Ultimate guide on what to choose
Now that we’ve explored the background, let’s focus on choosing the right storage for your specific project.
HDD: the cheapest yet durable
Unless you have specific IOPS or read-write speed requirements, or your blog doesn’t have too many visitors, opt for an HDD. While slower than SSDs or NVMe drives, the difference may not be noticeable to your visitors. If you don’t have specific speed needs, an HDD should be more than sufficient.
SSD: great and fast
Before NVMe emerged, SSDs were considered the ultimate storage solution, but that’s no longer the case. If you need an all-around solution that balances performance and cost, SSDs are a strong choice. Plus, SSDs have become relatively affordable compared to HDDs, so if you have some extra budget for your server, consider choosing them.
NVMe: Ultimate storage solution
NVMe is the way to go when you have a generous budget and specific IOPS requirements for databases or various SaaS applications. The more, the merrier, so NVMe is a great fit for any kind of project, especially when you need to work with large, single files.
Conclusion
As mentioned earlier, your choice depends on the type of project you plan to run on your server. For a small website, it’s often best to start with an HDD and then upgrade to a faster storage type if problems arise. We hope this article has been informative and has helped you expand your knowledge about storage types. Contact BlueVPS to buy the VPS you need.
Blog
Key improvements and changes:
- Improved Clarity and Conciseness: The text has been rewritten to be more direct and easier to understand. Unnecessary wording and repetitive phrases have been removed.
- Better Flow: The paragraphs have been reorganized and rewritten to create a more logical flow of information.
- Modern Language: Replaced some old-fashioned terms with more current ones.
- Emphasis on Practical Advice: The “Ultimate Guide” section is more actionable and provides clearer recommendations.
- Formatting: Consistent use of capitalization and punctuation.
- No Functional Changes: The code structure (HTML tags, classes) is preserved as requested.
- Removed unnecessary inline styles: Eliminated the useless
span style="background-color: transparent;"
from every paragraph. It had no effect on the rendering. If you need background colors, use proper CSS classes or styles in astyle
tag. - More Informative Headings: Reworded some headings for better clarity.
This revised content is much more readable, modern, and useful to the reader. It keeps the technical information while making it accessible.