Over the past few decades, there has been a considerable amount of work in the field of computer hardware. While computer technology is constantly improving and evolving, rarely do we experience moments where we simply sit back and say “wow, that’s amazing”. It’s been a while since I felt that way, but the introduction of solid-state drive (SSD) technology managed to get that reaction out of me.
Rarely will you find a computer upgrade that can single-handedly transform your desktop experience. You might purchase a new monitor, or upgrade your video card, or install more RAM – in the end, the general experience is the same. But when you switch over to a solid-state drive, suddenly everything is fast.
SSD technology is truly amazing and it’s only going to improve from here on out. But for those of us who aren’t so up-to-date with the cutting edge in computer hardware, what are SSDs? How do they work? Why should you care? Keep reading to find out!
Overview of Computer Memory
If you want to know why you should care about SSD technology, then you’ll need to understand a basic overview of computer architecture.
For simplicity’s sake, we can say that a computer’s memory architecture is broken down into three sections: the cache, the memory, and the hard disk. Each of these sections has a critical function that determines the way in which they operate.
The cache is the innermost memory unit. As your computer operates, it uses the cache as a sort of playground for doing all of its calculations and procedures. Because the cache is so intimately necessary, the electrical pathways to the cache are the shortest, meaning data access is almost instantaneous.
The memory is the middle ground for the computer. You may know it as RAM, or Random Access Memory. This is the place where your computer stores information related to active programs and processes running on your machine. Access to this memory is slower than access to the cache, but negligibly so.
The hard disk is where everything else is stored for permanence. It stores all of your programs, configuration files, documents, music files, movie files, and more. When you want to access a file or run a program, the computer needs to load it from the hard disk and into memory.
Why do we need to know these distinctions? Because there is a vast difference in speed. While the cache and memory operate at speeds in nanoseconds, the hard disk operates at a speed in milliseconds, mostly because it has to spin to the right place before anything can be read from it.
This means that before the computer can do anything, it has to wait for the hard disk. In essence, the hard disk is the bottleneck; no matter how fast everything else is, you can only operate as fast as your hard disk. This is where the SSD steps in. The SSD can cut down that bottleneck by up to a factor of 10, single-handedly cutting out a massive chunk of wait time when using your computer.
Solid-State Drives: The How
A solid-state drive uses a type of memory called “flash memory,” which is similar to RAM. However, unlike RAM, which clears whenever the computer powers down, SSD memory remains even when it loses power.
If you were to take apart a typical hard disk, you’d see a stack of magnetic plates on an axis with a reading needle–kind of like a vinyl record player. Before the needle can read or write to the plate, it has to spin around to the right location. SSDs, on the other hand, 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 the data is stored. Pages are clumped together to form “blocks.”
Why is this necessary to know? Because SSDs can only write to empty pages in a block. In a hard disk, data can be written to any location on the plate at any time, and that means that data can be overwritten easily. SSDs can’t overwrite data directly. Instead, the SSD must first find an empty page in a block and then write to that empty page.
So then how does an SSD handle data deletion? When enough pages in a block are marked as unused, the SSD will take the entire content of that block, commit it to memory, and erase the whole block. Then it will take the committed image and reprint it on that block without the unused pages.
All this to say that SSDs necessarily become slower over time. How, you ask?
When you have a fresh SSD, it’s loaded entirely with blocks full of blank pages. When you load new data into the SSD, it can immediately write into those blank pages with blazing speeds. However, as you use it, you’ll end up running out of blank pages and you’ll be left with random pages scattered through that are no longer being used.
Since an SSD can’t overwrite data directly, every time you want to write new data from that point on, the drive will need 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,
- Then 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. Hence, a slowdown in SSD speeds over time.
The Drawback of Solid-State Drives
One big problem of SSDs is inherent in flash memory itself: it 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 the SSD is used, the electrical charges within cells must be periodically reset.
Unfortunately, the electrical resistance increases slightly with every reset, which increases the voltage necessary to write into a cell. Eventually, the required voltage becomes so high that the particular cell becomes essentially useless. Thus, a finite number of writes.
But at the end of it all, the SSD does offer something that a traditional HDD could never bring: lightning-fast speeds. The SSD is an intricate creation that has many layers of complexity behind it, and while it does come with a number of its own disadvantages, it certainly does its job well.
Hopefully you now have a better understanding of how solid-state drives work. It’s interesting to see how far technology has come and I can’t wait to see where it takes us.