Why TRIM is Important to Solid State Hard Drives? [Technology Explained]

trim11   Why TRIM is Important to Solid State Hard Drives? [Technology Explained]If you have ever owned or have considered owning an SSD you may have heard reviewers and other commentators talking about TRIM support. You may also have picked up on the fact that TRIM support is a rather big deal. News posts on major tech sites constantly report that brand X has added TRIM support, making a big fuss about it again and again.

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.

trim2   Why TRIM is Important to Solid State Hard Drives? [Technology Explained]

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.

Penalty Box

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.

trim3   Why TRIM is Important to Solid State Hard Drives? [Technology Explained]

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.

trim5   Why TRIM is Important to Solid State Hard Drives? [Technology Explained]

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.

Conclusion

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

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

11 Comments -

Zeus Lalkaka

Hello,

I have just bought the new Gen II SSD Now drive from Kingston but am using it in my Macbook Pro (Unibody – 2009) and was wondering what I should do to deal with the problem of garbage collection on Mac OS X, since it apparently lacks TRIM support. I don’t believe the firmware on the new SSD Now drives, even if TRIM enabled, will actually run proper garbage collection unless its on a TRIM enabled OS.

Thanks,
Z

M.S. Smith

I don’t think there is anything you can do. Without TRIM support, garbage collection isn’t going to work. Just cross your fingers and hope they add TRIM support in the next OS X update.

Zeus Lalkaka

Hello,

I have just bought the new Gen II SSD Now drive from Kingston but am using it in my Macbook Pro (Unibody – 2009) and was wondering what I should do to deal with the problem of garbage collection on Mac OS X, since it apparently lacks TRIM support. I don’t believe the firmware on the new SSD Now drives, even if TRIM enabled, will actually run proper garbage collection unless its on a TRIM enabled OS.

Thanks,
Z

Naykatiolyu

Great i was just about to build my new computer thank for this explanation i hop soon that we see 1TB SSD drive i don’t know why many people think that SSD will not take over mechanical drives

M.S. Smith

There are 1TB SSDs. They just cost about $3000 dollars :-D

Alaeddin

How about the SSDs that ship with MacBook Pro based on customization. Would u happen to know if they offer TRIM support?

keplenk

Hi,

Great article. Amazing explanation :D

Just a quick background. I usually reformat my hard drive every 3 months, sometimes more. If you ask me why I reformat, I don’t know the answer and it probably a psychological disorder .. lol.

Anyway, here is my question:

Let’s say, for example, that my SSD and/or my operating system does not support TRIM.

1) Can reformatting every often be a substitute for TRIM?

2) Can frequent reformatting kill the SSD faster than the normal lifespan?

3) From the looks of it, TRIM seems like an equivalent of Low level formatting not quick reformat. Is low level reformat the way to go?

I’m a total newbie with SSDs. I apologize in advance if my question is stupid, but nobody has answered my question yet :( They just ask why I reformat all the time but does not answer my question.

I really hope you can help as you seem to be an expert with SSDs.

Thank you so much.

PS: It’s weird that my first post did not show up. If this will be a double post, feel free to erase the original one.