How Do Solid-State Drives Work?
These days, whether you’re buying a new computer or upgrading an old computer, you’ll want to buy a solid-state drive (SSD) instead of a traditional hard disk drive (HDD). Indeed, switching from HDD to SSD is one of the best PC performance upgrades you can make.
But how? And why? What makes the SSD such a breakthrough technology?
In this article, you’ll learn exactly what SSDs are, how SSDs actually work and operate, why SSDs are so useful, and the one major downside to SSDs that you should know about. If you’re looking for buying advice instead, we recommend reading our article on what to consider before buying an SSD .
Understanding Computers and Memory
To understand how SSDs work and why they’re so useful, we have to first understand how computer memory works. A computer’s memory architecture is broken down into three aspects:
- The cache
- The memory
- The data drive
Each of these aspects serves an important function that determines how they operate.
The cache is the innermost memory unit. When running, your computer uses the cache as a sort of playground for data calculations and procedures. The electrical pathways to the cache are the shortest, making data access almost instantaneous. However, the cache is very small so its data is constantly being overwritten.
The memory is the middle ground. You may know it as RAM (Random Access Memory). This is where your computer stores data related to the programs and processes that are actively running. Access to RAM is slower than access to the cache, but only negligibly so.
The data drive is where everything else is stored for permanence. It’s where all of your programs, configuration files, documents, music files, movie files, and everything else is kept. When you want to access a file or run a program, the computer needs to load it from the data drive and into RAM.
The important thing to know is that there’s a vast speed difference between the three. While cache and RAM operate at speeds in nanoseconds, a traditional hard disk drive operates at speeds in milliseconds.
In essence, the data drive is the bottleneck: no matter how fast everything else is, a computer can only load and save data as fast as the data drive can handle it.
This is where SSDs step in. While traditional HDDs are orders of magnitude slower than cache and RAM, SSDs are much faster. This can significantly cut the amount of time it takes to load various programs and processes, and will make your computer feel much faster.
How Do Solid-State Drives Work?
SSDs serve the same purpose as HDDs: they store data and files for long-term use. The difference is that SSDs use a type of memory called “flash memory,” which is similar to RAM—but unlike RAM, which clears its data whenever the computer powers down, the data on an SSD persists even when it loses power.
If you took apart a typical HDD, you’d see a stack of magnetic plates with a reading needle—kind of like a vinyl record player. Before the needle can read or write data, the plates have to spin around to the right location.
On the other hand, SSDs use a grid of electrical cells to quickly send and receive data. These grids are separated into sections called “pages,” and these pages are where data is stored. Pages are clumped together to form “blocks.”
SSDs are called “solid-state” because they have no moving parts.
Why is this necessary to know? Because SSDs can only write to empty pages in a block. In HDDs, data can be written to any location on the plate at any time, and that means that data can be easily overwritten. SSDs can’t directly overwrite data in individual pages. They can only write data to empty pages in a block.
So then how do SSDs handle data deletion? When enough pages in a block are marked as unused, the SSD commits the entire block’s worth of data to memory, erases the entire block, then re-commits the data from memory back to the block while leaving the unused pages blank. Note that erasing a block doesn’t necessarily mean the data is fully gone. (How to securely delete data on an SSD!)
This means that SSDs become slower over time.
When you have a fresh SSD, it’s loaded entirely with blocks full of blank pages. When you write new data to the SSD, it can immediately write to those blank pages with blazing speeds. However, as more and more data gets written, the blank pages run out and you’re left with random unused pages scattered throughout the blocks.
Since an SSD can’t directly overwrite an individual page, every time you want to write new data from that point on, the SSD needs to:
- Find a block with enough pages marked “unused”
- Record which pages in that block are still necessary
- Reset every page in that block to blank
- Rewrite the necessary pages into the freshly reset block
- Fill the remaining pages with the new data
So in essence, once you’ve gone through all of the blank pages from a new SSD purchase, your drive will have to go through this process whenever it wants to write new data. This is how most flash memory works.
That said, it’s still much faster than a traditional HDD, and the speed gains are absolutely worth the purchase of an SSD over an HDD.
The Downside to Solid-State Drives
Now that we know how a solid-state drive works, we can also understand one of its biggest downsides: flash memory can only sustain a finite number of writes before it dies.
There is a lot of science that goes into explaining why this happens, but suffice it to say that as an SSD is used, the electrical charges within each of its data cells must be periodically reset. Unfortunately, the electrical resistance of each cell increases slightly with every reset, which increases the voltage necessary to write into that cell. Eventually, the required voltage becomes so high that the particular cell becomes impossible to write to.
Thus, SSD data cells have a finite number of writes. However, that doesn’t mean an SSD won’t last a long time! Check out our article on the average lifespans of HDDs, SSDs, and flash drives if you want to know more. Hopefully you now have a better understanding of how solid-state drives work.