created | modified |
---|---|
2024-12-27 15:52:21 -0600 |
2025-04-21 07:23:34 -0500 |
created: 2023-01-15T00:00:00-05:00 modified: 2023-01-15T00:00:00-05:00 tags: [ssd, optimizations, over provisioning, performance]
SSD over-provisioning is the process of setting aside a section of an SSD’s storage capacity so it’s not accessible to the user. This reserved space is used by the SSD controller to manage data more efficiently, perform maintenance tasks, and enhance the overall performance of an SSD.
The amount of space allocated for over-provisioning in an SSD range from 7% to 28% of the drive’s total capacity. Most SSDs reserve some amount of space for these extra write operations, along with controller firmware, failed block replacements, and other unique features that vary by SSD controller manufacturer.
The minimum reserve is simply the difference between binary and decimal naming conventions. Many people are blissfully unaware that one gigabyte (GB) is precisely 1,000,000,000 bytes, and one gibibyte (GiB) is precisely 2^30 = 1,073,741,824 bytes, or about 7.37% more than a GB. Many people are also happy not to know storage is properly measured in gigabytes, whereas memory is properly measured in gibibytes.
Even though SSDs are built from NAND flash memory chips, they’re marketed as storage devices, and SSD manufacturers reserve an extra 7.37% of memory space as a provision for background activities, such as garbage collection. For example, a 128GB SSD has 128 × 73,741,824 = 94.4 million bytes of built-in over-provisioning.
|Marketed OP*|0%|7%|16%|28%| |----------------------|-------- True Physical OP*|7%|15%|25%|37|
SSD Physical Cap|Resulting SSD User Capacity| 64 64 60 55 50 128 128 120 110 100 256 256 240 220 200
So even if an SSD appears to be full, it will still have 7.37% of available space with which to keep functioning and performing writes. Most likely, though, write performance will suffer at this level.
In practice, an SSD’s performance begins to decline after it reaches about 50% full. This is why some manufacturers reduce the amount of capacity available to the user and set it aside as additional over-provisioning.
For example, a manufacturer might reserve 28GB out of 128GB, and market the resulting configuration as a 100GB SSD with 28% over-provisioning. This 28% is in addition to the built-in 7.37%, so it’s good to be aware of how vendors note the amount of drive vs. over-provisioning space.
Please refer to the original reference document hyperlink for a detailed analysis of this concept. My notes for this topic assume that the reader is already familiar with the underlying technology and its background.
1a. decide whether to backup existing data on disk (including or excluding partition table) or to continue to step 2. 2. sanitize the disk by performing a Secure Wipe. 3. re-init the disk by clearing the partition table and then 4a. filesystem format on each respective partition. 4b. restore partition table 5. 6.
If you are using a flash disk that so happens to be using the nvme
interface, you should use the nvme
cli for factory restoring your disk.
nvme format -s1 /dev/nvme0n1
nvme format -s2 /dev/nvme0n2
NOTE(JEFF): Newer SSDs support the sanitize
command, which not only erases LBA blocks but also all metadata, log pages, cache and status -- essentially performing a factory reset.
# The `-a2` switch corresponds to **Block Erase**
# (for reference, -a4 is Secure Erase).
nvme sanitize -a2 /dev/nvme0n1
...
nvme id-ns /dev/nvme0n1
nvme error-log /dev/nvme0n1
# destructive action!
nvme delete-ns /dev/nvme0n1
# destructive action!
nvme create-ns /dev/nvme0n1
nvme smart-log /dev/nvme0n1
...