Continuing in our Dedicated WordPress Server Hardware Tips series, we still get the question of whether one should use a hard drive or an SSD for WordPress hosting. This question is antiquated in 2017. The easy answer is to get an SSD. The more important question is how to decide which SSD to get. All SSDs are not created equal.
SSD v. HDD: Get SSDs in this Priority
When it comes to the question of SSD v. HDD for WordPress hosting, always get SSDs. Always. Hard drives make good backup target devices, but the latency is very bad.
SSDs are not only faster, but they are more reliable. Hard drives fail 10-20 times more frequently. Each failure requires a replacement so we suggest just getting SSDs and lowering headaches and potential remote hands costs. Reliability is key.
In terms of SSD pecking order as of this writing from the top choice to the lowest:
- Intel Optane SSD
- NAND NVMe SSD
- SAS SSD
- SATA SSD
- —–Great Chasm—–
- Hard Drive
The Intel datacenter Optane SSDs are so expensive right now, that they are hard to recommend for WordPress hosting. You can see our results of Optane v. NVMe v. SATA SSDs with WordPress NGINX CDN serving and real-world WordPress hosting gains using NVMe.
Those three drives are the high-endurance Intel SSDs from SATA (S3700), NAND NVMe (P3700) and Optane series. Given the price differential, it is hard to recommend Optane over the NAND NVMe SSD series for WordPress. Then again, with proper caching, SATA SSDs will perform just fine for the majority of sites.
Consumer v. Data Center SSDs: Get Data Center SSDs
We do not recommend using consumer drives for WordPress hosting. Data center SSDs are generally tuned for reliability (both firmware and hardware) at the expense of performance. WordPress itself does not create high write workloads so much of the extra endurance will go to waste.
Virtually every SSD we have lost in production was from trying a consumer drive. There is a potential for data loss using them so simply avoid. You can buy drives new, or if on a budget, grab a used data center SSD. We have guides like our Buyer’s Guide to getting a used datacenter SSD inexpensively which will help you get enterprise SSDs around the same price as consumer drives.
If you are concerned about reliability, we have been logging hours on our production drives. Here was the result after over 4.5 million hours of usage time on used SSDs: Used enterprise SSDs: Dissecting our production SSD population and our actual failure rate:
We have logged a few million hours since then, and have only seen one additional failure. Specs are around 2M hour MTBF so these numbers seem to align with what we would expect for the population.
Capacities: Overbuy GB
The cost of upgrading SSDs is usually higher than getting a slightly larger capacity, to begin with. Our suggestion is to get at minimum 400GB SSDs, and 800GB or larger if your budget allows.
Perhaps the most common way to host WordPress, even on dedicated hardware is using virtual machines for the database, proxies, and web servers. It allows flexibility and ease of backup/ upgrading that many hosts prefer. One of the great features with virtual machines is that you can easily snapshot storage. If you have an issue, you can quickly roll back and be up and be running in a matter of seconds. These snapshots do create additional capacity requirements.
Beyond snapshotting, more capacity makes the server more versatile for side projects or adding development VMs. Having to do a field upgrade is something you will generally want to avoid so we suggest getting more capacity than you think you will need.
Quantities: Measure in Pairs
One of the easiest ways to ensure data is safe is to use mirrored storage drives (e.g. RAID 1) as primary storage. Using mirrors as primary storage has at most, a negligible impact on performance. At the same time, it is one of the most reliable redundancy mechanisms. It also is easy to reconstruct mirror arrays because there are no parity calculations as with RAID 5, RAID 6 and others.
With the ability to withstand a single drive failure, negligible performance impacts, and ease of use, we highly suggest mirroring drives. As a result, we advocate buying SSDs in pairs.
Write Endurance: Read Optimized
When looking at data center SSDs a commonly cited spec is drive writes per day. WordPress is squarely a read-intensive application so we suggest no more than 1 DWPD is needed, and in most cases, less than 0.3 DWPD. Here is what we saw when we analyzed 400 SSDs purchased second-hand:
The key here is that despite SSD vendors and server manufacturers pushing high DWPD drive, the actual writes we have seen on SSDs are well below what we would expect just reading stat sheets. The flip side to this is that many cloud providers and virtualization cluster IT organizations would rather deploy one type of SSD to cover every workload rather than having to move workloads to higher DWPD SSDs.
If you have a larger drive, you also get more actual write capacity at a given DWPD rating.
The bottom line here is that with WordPress, you do not need heavy write endurance. Instead, optimize on read capacity and read IOPS.
NVMe SSD, M.2, U.2, or Add-in Card?
NVMe SSDs (including Optane) come in a number of different form factors. Primarily they come in m.2, U.2 and PCIe Add-in Card (AIC) form factors. Each has unique advantages and drawbacks.
M.2 NVMe SSDs are popular with the hyper-scale market as well as with consumers. We are seeing more platforms support the m.2 form factor on motherboards and through adapter PCIe cards. These SSDs are small so they work in dense applications. They also tend to use less power than other drives. One design consideration is that m.2 drives with power loss protection usually fit in m.2 22110 (110mm) form factors. Many motherboards and adapters only support 2280 (80mm) consumer size drives.
PCIe AIC SSDs are flexible as they fit in many existing systems in a familiar form factor. We are seeing fewer new NVMe SSDs come in this form factor in favor of U.2. The major advantage of these drives is that you can put them in many generations of servers due to the fact that they utilize standard PCIe interfaces.
U.2 SSDs have the advantage of being used in higher density form factors than AIC NVMe SSDs. They also have the clear advantage in that one can hot swap most U.2 drives.
If you are buying a new system that has U.2, use that. The major issue with m.2 and AIC form factors is that in the unlikely event of a failure, the system will need to be powered down, opened up, and a drive replaced.
PCIe or NVMe?
There are many legacy PCIe SSDs on the market. PCIe SSDs such as Fusion-io devices, Virident FlashMax II, and others offer a number of compelling features. Consistent low latency access, high endurance, and superior used pricing make these early generation PCIe devices very attractive.
We still generally recommend NVMe SSDs over PCIe variants. This is because legacy PCIe devices often require additional proprietary drivers. Most OSes have native NVMe drivers that work out of the box. As time goes on, the proprietary PCIe SSD drivers become harder to obtain for new OSes. Some, e.g. Fusion-io, also have limited Linux OS compatibility.
If you want easy installation and maintenance, get NVMe SSDs.
WordPress will run on just about anything these days due to extensive caching. In terms of reliability, if you are getting your own dedicated hardware for WordPress hosting, it is hard to beat data center SSDs. These days, NVMe SSDs are very fast and we are starting to see the inflection point where NVMe is approaching SATA pricing. If possible, use U.2 NVMe SSDs, even lower endurance varieties. Getting a 0.3DWPD 800GB drive versus a 1 DWPD 400GB drive with the same read performance we would generally go for the larger drive. We suggest at minimum mirroring your SSDs to get better uptime.
Overall, WordPress is a very simple application to cache, so optimizing the software stack and RAM is a good investment. Using SSDs, you can host many WordPress VMs, containers or bare metal sites all on the same set of disks.