Extend Your SSD Life Expectancy with TRIM

hhd-ssd.png

Solid State Drives – SSDs – are becoming more and more popular with computer manufacturers and users alike. 

They provide a safer, more reliable way to store important information than standard Hard Disk Drives – HDD – and, at the same time, have a number of other clear advantages. 

Ensure you enable TRIM for your Solid State Drive

One problem that has come to prominence, however, is the fact that SSDs have shorter lifespans than their HDD brethren do. Whilst it would still take many years to find the point at which an SSD dies, individual users or businesses with heavy data storage and turnaround might understandably have their reservations. 

Below, this article will look at how an SSD functions, what the potential problems are and how TRIM can help keep an SSD drive healthy for longer. 

How an SSD Drive Works

To understand the differences between an SSD and a HDD, we must first look at the nature and limitations of the HDD. 

The HDD

The modern computer user grew up with HDD. The whir and click of a HDD firing up and locating the desired data is a noise that everyone recalls and still hears daily.  

 

These familiar noises coming from a HDD are an outcrop of how they work. Inside a HDD is a spinning disk – known as a ‘platter’. The platter has a magnetic surface, above which move similarly magnetised actuator heads. 

Essentially, HDD work in many ways like a record player. The head reads the necessary data from the surface of the disk, finding it wherever it may be. Unlike something like a record or compact disc, however, the information on a HDD does not write sequentially. Information, after some use, spreads over the entirety of the disk. 

This is why, as HDDs age and see more use, they become slower at retrieving information. This leads to the dreaded defragmentation process that most people avoid like the plague. 

  • HDDs use a spinning disk – a ‘platter’ – that has a magnetic surface, to store data. 
  • Moving heads read data from the surface. The finding the data is the familiar whirring and clicking that most people hear from their HDD.
  • Over time, the data becomes increasingly scattered, taking longer for the HDD to retrieve the data. 

The SSD

Unlike a HDD, with its spinning disks, an SSD has a completely different approach to storing data. 

An SSD uses a collection of flash memory cells, arranged into a network, to store and access data.

Straight away, this eliminates one of the big problems that come with HDDs – the fact that their data storage system relies on moving parts. This means more can go wrong with the physically parts of the disk or, as an even greater fear, a computer takes a knock or fall. If this happens whilst the HDD is reading or writing data, it can have disastrous consequences. 

An SSD eliminates this by essentially being a miniature network of USB flash drives. However, these flash drives are not the freebies that computer shops or universities give away by the handful – the flash memory inside an SSD is extremely fast and powerful. 

It is easy to see the advantages of SSD over a HDD; the SSD is much, much faster; they are virtually silent; they are not vulnerable like a HDD and, because of their flash memory, do not suffer with fragmentation. 

  • SSDs use flash memory instead of a spinning disk. This means no moving parts and the associated problems or risks.
  • An SSD has incredible speed and no fragmentation.
  • SSDs eliminate many of the problems and fears people have with HDD. 

How SSDs Store Data

Because an SSD has an entirely different underlying technology, the structure of how it stores and organises data is also very different. 

When storing data – whether it is a picture, song or essay, an SSD writes it to pages, which are part of a larger whole – known as blocks. 

Essentially, it is like writing the data onto a page (or pages) of a book and then storing that book in a library. 

Problems arise because an SSD can only save new data to an empty page. An SSD cannot overwrite a page or block where data is already present, whereas a HDD would just overwrite old data. To use the book analogy again, an SSD will not try to erase a page in the book and write over it, it needs a fresh new page all of its own. 

If a user wants to overwrite data, then they have to erase the whole book, not just a page. So, the SSD just puts all new data into a new book of their own and erases the old one entirely. 

This is how an SSD accommodates new data and does away with the old. 

  • SSDs store data like pages in a book.
  • SSDs do no write over existing data – they need a fresh page to work with. 
  • To accommodate this, they have to constantly move, delete and rewrite data, making for eventual overall slowdown. 

Where TRIM Comes into Play

As seen above, the way SSDs store and manage data is quite complex and can sometimes lead to complications. 

Because an SSD has no way to tell which data is old and unneeded, it will spend much time in rewriting cycles, trying to accommodate every piece of data that it receives. 

The more reading, writing and rewriting a flesh cell has to do, the more this will reduce their lifespan. As an outcrop of this, several flash cells all doing this at the same time, but having to communicate with one another, will lead to inevitable slow down. 

TRIM helps negate all of this. TRIM is a command that works through the operating system – whether that is Windows, Mac, Ubuntu or other – and tells an SSD which data blocks are okay to use and which are okay to delete. 

This cuts down on the amount of writing, data shifting and rewriting the SSD has to do, stopping slowdown and making for a much more efficient way of managing data. 

This makes it much quicker and easier for the SSD to perform ‘garbage collection’, which is how it picks the best block to delete and write over. A more targeted process with TRIM, by the time the user transfers more data to the SSD, the space is already free. This eliminates the need for multiple deletions and rewrites to free space. 

  • TRIM is a command, working through the operating system, which tells an SSD which blocks are okay to delete and use for new data. 
  • This reduces the amount of writing and rewriting needed. 
  • TRIM makes allocating data more targeted and less demanding for the SSD.