The good old hard drive did serve us well for decades. It is still in use today with many improvements in terms of durability, speed, and size. Unfortunately, it still cannot keep up with the increasing demand for the faster speed of this fast-paced generation. In addition, despite the improvements, it is still prone to failure because of its mechanical spinning disk. Because of this, many alternatives to the spinning drive have been developed; one of them is the Solid-State Drive, or simply SSD.
What is SSD?
SSD is a memory-based storage device that uses integrated circuit assemblies, instead of a moving read/write head, for data access and retention. Most SSDs use flash memories, some varieties use DRAM, and some use a combination of both. SSDs have no mechanical parts and are therefore more resistant to shock, produce much less noise, and more durable than traditional HDDs. You can imagine SSDs as the larger and faster version of the USB drives.
SSDs have been around since the 1950s, but their exorbitant price, short lifespan, and limited capacity made them an impractical choice for computer systems. Their faster access time and lower latency than HDDs were, however, not overlooked by manufacturers. After numerous innovations and significant price drops, SSDs gained massive recognition in the late 2000s and gradually overtook HDDs as the computer’s secondary storage device. Although we mostly hear about SSDs used in computers and laptops, SSDs are also used in other electronic devices for data storage, such as mobile phones, SD cards, flash drives, and tablets.
How Do SSDs Work?
SSDs are semiconductor devices containing an array of NAND flash memories that are composed of transistors. The most basic unit in an SSD is the cell. The cells are organized in a grid, and the grid is made up of individual rows and columns of cells called a page. The whole grid layout containing the pages is called a block. Quite the opposite of the convention, when there is data in a cell, it is read as 0 and is read as 1 when empty. Data is written to and read from the cells making data access in SSDs almost instantaneously, as opposed to the spinning mechanism of HDD.
There is one component in SSDs that is most critical aside from the flash memories. The SSD controller is an embedded processor responsible for managing data operations within SSDs and organizes the data in the cell blocks, taking care of processes such as wear levelling, garbage collection, and Trim within the SSDs. It also serves as the bridge between the SSD’s input/output interfaces and the flash memories. Much of an SSD’s performance depends on the efficiency of the controller, the reason why manufacturers keep the controller techniques and architecture they use under wraps to maintain their advantage over other competitors.
As mentioned before, SSDs arrange data in cells, pages, and blocks. While writing data into empty cells is quite simple, overwriting data in the cells require more work. While data is read and written in pages, it can only be erased in blocks. New data can only be noted when the existing data is first erased when the cell is occupied. When specific cells in a block need to be updated, the whole block must be first copied to an empty block before deleting. The data and the updated data can then be written back into the cells after the entire block has been erased.
The writing process in SSD is referred to as program/erase cycles (PE cycles). The P/E cycle of flash cells is limited, and when the limit is reached, the SSD becomes unreliable and unstable. In some cases, the SSD will produce errors, but it will become unusable in worse cases. Frequent overwriting of cells will eventually shorten the SSD’s lifespan. To mitigate this problem, some techniques are utilized to ensure that flash cells are evenly used throughout the writing/erasing process.
Garbage collection basically removes files that are marked by the operating system as deleted or modified. The controller sorts pages that are still useful and moves them to a new block, leaving behind those that can already be deleted, and then deletes the whole block of unnecessary data so data can be written on it again.
Another SSD technique applied to distribute data to the flash cells evenly is wear levelling. Let’s say we have blocks A and B. Block A contains files that are constantly edited or updated, resulting in frequent P/E cycles in Block A. Block B, on the other hand, contains data that does not need editing or updating frequently, like movies or pictures. This leaves Block B with more P/E cycles left than Block A and will eventually cause Block A to wear out faster than Block B. Wear levelling is to check the erase counts of the blocks to see which blocks are less used and will free up these blocks for future use. In Blocks A and B in our example, wear levelling will move data from Block B to Block A, provided there is enough space since Block B is rarely overwritten. By doing so, Block B will be utilized during the next save operation. Wear levelling lengthens the lifespan of the SSD by making use of all the blocks equally.
By now, you can already tell that the SSD is going through a tedious and inefficient process of temporarily copying a block of data to another block to erase pages of cells and then rewrite the usable data back into the block. This constant write/erase cycle causes the slow performance of SSDs in the long run. An operating system command helps reduce the number of P/E cycles and lengthen the SSD’s life.
The TRIM command tells the SSD which data are marked as stale and can be deleted. TRIM works with garbage collection to sort good data from stale data. One great advantage of TRIM is it can work on a page level instead of a block level, which means data can be deleted in pages instead of deleting the whole block.
TRIM is applicable for SSDs that use the ATA interface, although other interfaces also have similar commands, albeit with a different name. TRIM helps improve an SSD’s efficiency and longevity, but despite its benefits, not all SSDs support TRIM since not all operating systems are built with the TRIM command. Without TRIM, the SSD will not know that a specific area contains data that is no longer necessary until data needs to be written to that area again. The SSD has to erase the unusable data first and go through the erase cycle, which slows down the whole process.
SSDs currently have different form factors depending on the interface they use. Because they’re usually smaller than HDDs, they give manufacturers flexibility in designing the computers. SSDs are also faster, more stable, durable, and more power-efficient than the traditional HDDs making them the preferred choice for secondary storage media of manufacturers and consumers alike.