Issue
I have read many discussions about storage, and whether SSDs or classic HDDs are better. I am quite confused. HDDs are still quite preferred, but why?
Which is better for active storage? For example for databases, where the disk is active all the time?
About SSD.
Pros.
- They are quiet.
- Not mechanical.
- Fastest.
Cons.
- More expensive.
Question.
- When the life cycle for one cell of a SSD is used, what happens then? Is the disk reduced by only this cell and works normally?
- What is the best filesystem to write? Is ext4 good because it saves to cells consecutively?
About HDD.
Pros.
- Cheaper.
Cons.
- In case of mechanical fault, I believe there is usually no way to repair it. (Please confirm.)
- Slowest, although I think HDD speed is usually sufficient for servers.
Is it just about price? Why are HDDs preferred? And are SSDs really useful for servers?
Best Answer
One aspect of my job is designing and building large-scale storage systems (often known as "SANs", or "Storage Area Networks"). Typically, we use a tiered approach with SSD's and HDD's combined.
That said, each one has specific benefits.
SSD's almost always have a higher Cost-per-Byte. I can get 10k SAS 4kn HDD's with a cost-per-gigabyte of $0.068/GB USD. That means for roughly $280 I can get a 4TB drive. SSD's on the other hand typically have a cost-per-gigabyte in the 10's and 20's of cents, even as high as dollars-per-gigabyte.
When dealing with RAID, speed becomes less important, and instead size and reliability matter much more. I can build a 12TB N+2 RAID system with HDD's far cheaper than SSD's. This is mostly due to point 1.
When dealt with properly, HDD's are extremely cheap to replace and maintain. Because the cost-per-byte is lower, replacing an HDD with another due to failure is cheaper. And, because HDD failures are typically related to time vs. data-written, replacing it doesn't automatically start using up TBW when it rebuilds the RAID array. (Granted, TBW percentage used for a rebuild is tiny overall, but the point stands.)
The SSD market is relatively complex. There are four (current, at the time of this writing) major types of SSD's, rated from highest number of total writes supported to lowest: SLC, MLC, TLC, QLC. The SLC typically supports the largest numbers of total writes (the major limiting factor of SSD lifetimes), whereas the QLC typically supports the lowest numbers of total writes.
That said, the most successful storage systems I've seen are tiered with both drives in use. Personally, all the storage systems I recommend to clients generally follow the following tiers:
Read/Write performance drops as you increase tiers, data will propagate down to a tier where most of the data shares the same access-/modification-frequency. (That is, the more frequently data is read/written, the higher the tier it resides on.)
Sprinkle some well-designed fibre-channel in there, and you can actually build a SAN that has a higher throughput than on-board drives would.
Now, to some specific items you mention:
Your SSD Questions
Your HDD Questions