Wiki Table of Contents

Trim

Introduction

On traditional magnetic drives, deleted files are not completely removed from the disk at the time of deletion. This is why you can recover deleted files. Essentially, the filesystem just references the location of a file on the disk, and when a file is deleted, that reference is erased, allowing you to write new data over old data in these blank spaces. However, with SSDs, new data can only be written on completely new or erased cells of the drive. Because the space must be cleared prior to a write, if enough free space is not already available at the time a file is being written, it must be erased first. This can negatively affect performance. (Watkins 2017)

Automatic procedure

MX Linux uses by default an automatic clearing procedure by running the command “trim” on a weekly schedule. This command tells the SSD which blocks of data are no longer considered in use and can be wiped internally.

Checking

In order to check that the trim procedure is actually being carried out, press F4 (or open a terminal) and enter the following command:

$ tail /var/log/trim.log 

Resources

  • Watkins 2017: https://opensource.com/article/17/1/solid-state-drives-linux-enabling-trim-ssds
  • Wikipedia: https://en.wikipedia.org/wiki/Trim_(computing)

Leave a Comment