The Full Wiki

Advertisements

More info on TRIM (SSD command)

TRIM (SSD command): Wikis

Advertisements

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

Advertisements
(Redirected to TRIM article)

From Wikipedia, the free encyclopedia

In computing, a TRIM command allows an operating system to tell a solid-state drive (or "SSD") which data blocks are no longer in use, such as those left by deleted files. An OS operation such as delete generally only means the data blocks involved are flagged as not in use. TRIM allows the OS to pass this information on down to the SSD controller, which otherwise would not know it could trash those blocks.

The purpose of the instruction is to maintain the speed of the SSD throughout its lifespan, avoiding the slowdown that early models encountered once all of the cells had been written to once.[1]

Although tools were already available to "reset" some drives to a fresh state, they also delete all data on the drive which makes it impractical to use as an optimization.

The root cause of the issue is that SSD drives do not know which blocks are truly in use and which are free. While the file system on the SSD will maintain an in-use list, SSDs don't understand file systems, and cannot access this list. This causes trouble in two places:

  • SSDs can write 4KiB blocks at a time, but, due to hardware limitations, they must delete larger blocks (e.g., 128KiB–512KiB). Since the drive does not know which 4k blocks are still in use if they have been written to previously, each write will require a much larger read-erase-modify-write cycle, assuming that no additional free blocks are available on the SSD (i.e., after all blocks are at least partially filled). The term for this phenomenon is write amplification.[2][3] [4]
  • Wear levelling allows a drive to rearrange its data so the writes are not confined to one corner of the flash chip. Flash cells tolerate only a limited number of writes before they fail, so some SSDs will move data around to exercise all of the blocks in the drive more evenly. Since the drive does not know which blocks are truly in use by its file system, each block of data written to the drive requires an additional write due to the moved block.

The TRIM command specification[5] is being standardized as part of the AT Attachment (ATA) interface standard, led by Technical Committee T13 of the International Committee for Information Technology Standards.[6]

Operating system support

TRIM has been prepared in Linux 2.6.28[7], but not yet fully implemented[8][9]. In Microsoft Windows, TRIM has been implemented in Windows 7[10] and Windows Server 2008 R2,[11] [12] and was released with the final versions of those operating systems in October 2009. Older solid state drives will need firmware updates, otherwise the new command will be ignored.

Some drives (such as the Gskill Falcon) have a specialized tool called wiper.exe that claims to use TRIM on demand. However, it is actually a specialized defragmentation tool for SSDs (regular defragmentation tools do not work on SSDs).[13] It simply clears unused space, while TRIM actually informs the controller about unused space, allowing the controller to continuously manage resources for best performance.

References

External links

From write() down to flash chips – an explanation on how the TRIM command lets SSDs erase data not used by the filesystem

TRIM Command White Paper - a white paper explaining the TRIM command's purpose and actions


Advertisements






Got something to say? Make a comment.
Your name
Your email address
Message