Why not use consumer-grade SSD in Virtuozzo Storage?
To better understand this topic, SSD basics should be discussed first.
Though exact details of how SSD controllers work are kept secret by manufacturers, general understanding can be achieved using various sources on the internet, such as spec sheets, reviews, and reports from the tech community and data specialists. Here is some basis for how SSD works:
On SSD, writes come in the form of ‘cell programming’, which is performed per sector. When data in existing cells is changed, the SSD controller will write data to a free cell (free cell write speeds are very fast) and mark the old one as ‘garbage’. Later garbage collectors will go through cells and reset such cells, effectively making them free. Since free cell write speed is very fast, by setting aside wait time for cell reset, SSD maintains its high write speed
There are plenty of different specs, the obvious ones being size, interface, and speed.
When choosing a drive for data storage, these are the most important:
- Number of writes per block
- Reserved blocks count
- Power loss protection
- Power consumption
Let’s go through those one by one.
- The number of writes per block represents the estimated number of times a block can be written before it becomes unusable.
- Reserved blocks count is the number of blocks that the controller uses to replace blocks that are already unusable. This is done by overprovisioning blocks on a drive by a certain percentage. The controller will use these blocks when the SSD begins to fill up in order to not lose performance on rewriting. The bigger this number is — the more stable speeds you will get from SSD.
- If an SSD claims to have power loss protection, it will not lose data that was stored in its buffers in case of a sudden power loss event. This is crucial for VStorage as data stored on Chunk Servers without checksumming enabled will help to preserve data.
- The power consumption of SSD matters when battery power is a concern.
The difference between SSD for enterprise-grade storage and consumer-grade solutions (such as laptops/workstations) is that the latter will have less emphasis on the number of writes per block and reserved block count to provide higher capacity and cheaper options. Power loss protection devices are also high-cost, and often not provided with consumer drives. Power saving features of SSDs make sense for laptops, so garbage collector will often run rarely or even only when the drive is filled.
The approach manufacturers take to provide monitoring means further complicates things. SMART, for example, has the following metrics:
- Media_Wearout_Indicator
- Percent_Lifetime_Used
- Remaining_Lifetime_Perc
- Wear_Leveling_Count
These represent what manufacturers believe to be affecting their SSD's lifetime, but there is no reliable way to monitor the state of reserved block count and the number of ‘garbage’ cells.
So, to summarize, enterprise and storage-grade SSDs will:
- Power up its whole array of cells for quicker read and write access.
- Swiftly reset cells that are marked as garbage.
- Have a high reserved block count to accommodate for bursts of writes and to avoid latency on resetting cells on a filled drive.
On the other hand, consumer-grade SSDs will:
- Prioritize lesser power consumption
- Provide more blocks as ‘usable’ instead of reserved, increasing its apparent capacity
These traits will accumulate over time, and eventually will cause Storage to stutter on write operations without apparent reason.
We strongly suggest not using consumer-grade SSDs as CS or Journal/Cache drives.