However, these new reports rarely explain what TRIM support actually is, which may make it hard for you to understand why TRIM is such a big deal and why you really do need it on your SSD or any solid state hard drive you might be thinking of buying.
A Quick Solid State Drive Tutorial
Before you can properly understand why tech websites talk so much about TRIM. you need to beef up your knowledge about how solid state hard drives work.
A solid state drive is simply a circuit board full of flash memory chips and a controller which is in charge of figuring out the best way to move data around the drive and to your computer. Flash memory chips are much, much faster than a disks because there is no mechanical element to them. When you write data to a flash memory some electrical charges are manipulated and presto! Your data is saved.
In order for this process to make sense as data, however, the SSD has to arrange data in a certain way. Usually, a flash memory cell will have larger memory chunks called “blocks” which are made up of smaller memory chunks called “pages”.
When a SSD is first installed in a system, it is empty; so everything works as you’d expect. When you write a file to the drive the data is arranged into blocks and pages by the SSD’s controller. Because the drive is empty, this isn’t too complex. The write proceeds normally and is very quick, much quicker than any mechanical hard drive.
The problem comes when you try to write files to pages which are already occupied by data. This isn’t something which happens only when a SSD is nearly full, because writing data to a solid state hard drive isn’t linear.
Let’s say you have six pages available represented by the letters A to F. Intuitively, you’d expect data to be written linearly, progressing from A to F. In reality, data is not so well structured. The order might be B, then D, then A, and so on. There is no mechanical component in a SSD, so data from all pages can be retrieved equally quickly. In addition, Windows does not automatically scrub all data from a page when the information it contains is deleted. A SSD when appears to be half full, may in fact have all of its pages used.
Whenever you try to write data to a page which is used, you encounter something called the “block-rewrite penalty”. Pages are very specifically arranged in blocks. If you have to replace the data in a page, you have to rewrite all the data on the entire block. A page is usually 4KB, and a block is usually 512KB, so suddenly you’re dealing with far more data. All of the information in the block has to be written into the SSD’s cache, so that it is not lost, then the data is re-written to the entire block and all of its pages.
Seems time consuming, doesn’t it? It is. In the best case scenario, an SSD encountering this penalty will write data five times slower. In the worst case, an SSD may be twenty times slower when writing data.
TRIM Saves the Day
Now you may be saying to yourself – jeez, this seems like a silly way of doing things. Why can’t a single page be deleted so that the entire block doesn’t have to be erased and re-written?
The reason, quite simply, is that solid state drives are new. It is only in the last year that an explosion of consumer-level SSDs has occurred. Computers have been using mechanical hard drives for decades now, and operating systems are optimized for them.
TRIM is a command specification which actually gives an operating system the ability to tell a solid state drive specifically what page holds the data which the user has deleted. The SSD’s controller can take this information and then use it to wipe out specific pages rather than entire blocks. The problem of a block-rewrite penalty really boils down to a communication issue. Today’s SSDs have no way of knowing what pages were deleted, which is why they end up erasing and re-writing the entire block.
Implementation of TRIM support has to occur in the operating system and in the SSD’s firmware. Microsoft has implemented TRIM support in Windows 7 and also in Windows Server 2008 RS, and so far they are the only major operating systems to offer TRIM support. Many of today’s solid state drives also ship with TRIM enabled firmware, but not all of them. SSDs with TRIM support include:
- Corsair Nova, Performance and Reactor
- Crucial M225
- Intel X25-M
- G.Skill Falcon
- Kingston SSDNow Drives
- OCZ Agility, Summit and Vertex
- Patriot Torqx
- SuperTalent Ultradrive
This is not every drive on the market, and there is the possibility that drives which don’t support TRIM will have TRIM enabled with a future hardware revision. If you’re in doubt, visit the website of the SSD manufacturer you intend to buy from. They’ll usually trumpet TRIM support if they have it.
TRIM support is a big deal. If you’re buying an SSD now or in the future, you want it. If you already have an SSD, you should check your manufacturer’s website to see if they have a firmware update which enables it on your drive. With TRIM, your computer’s SSD will always be happily buzzing along at its maximum speed.
Image Credit: Avye