trim · shipping · also ATA TRIM

TRIM

The ATA DATA SET MANAGEMENT Trim function tells a device that specified logical block ranges are no longer needed.

Related Observatory article: Read on hesela.com

TRIM is ATA terminology; SCSI UNMAP and NVMe Dataset Management Deallocate are related operations, not alternate names for the same command. Linux exposes discard above these protocol-specific interfaces. [8] [12] [10]

On Linux, fstrim asks a mounted filesystem to discard ranges it considers unused. Its byte count is potential discard, not newly reclaimed physical space, and repeated runs can report the same ranges. Stack geometry and unsupported lower devices can reduce the ranges reaching storage. Offset and length choose a filesystem byte range. Preserve the requested minimum separately from any verified effective threshold; Linux v6.12 ext4 leaves returned minlen unchanged despite internal conversion and device-granularity adjustment. [14] Record options and per-filesystem results: --dry-run omits FITRIM and --quiet-unsupported can clear an unsupported-filesystem failure status. [10]

NVMe Dataset Management is advisory: command success alone does not prove deallocation. Readback guarantees for actually deallocated blocks are interface-specific, rather than a universal property of the word TRIM. [12]

Relations

related
Solid-state drive (SSD), Garbage collection (flash), Serial ATA (SATA), NVMe, Data sanitization, NVMe sanitize, Discard, SCSI UNMAP, Deallocated read behavior, Effective spare factor, FITRIM

Advantages

  • Can reduce garbage-collection copying by identifying logical data that no longer needs preservation; the effect depends on workload and controller policy. [1]

Limitations

  • Ordinary discard is not secure discard; util-linux documents secure discard as a separate, device-dependent operation that also erases garbage-collection copies. [6, 11]
  • Discard can add I/O latency; very frequent trimming is not automatically better for device lifetime. [10]

Citations

  1. Frankie, Hughes and Kreutz-Delgado (2012): Analysis of Trim Commands on Overprovisioning and Write Amplification, sections 2.1-2.3.2 (accessed 2026-10-23)
  2. util-linux: blkdiscard documentation (accessed 2026-10-10)
  3. sg3_utils: sg_unmap manual, description (accessed 2026-10-11)
  4. util-linux 2.41.2: fstrim manual, description and verbose output (accessed 2026-10-21)
  5. util-linux 2.41.2: blkdiscard manual, secure discard (accessed 2026-10-18)
  6. NVM Express NVM Command Set 1.1: Dataset Management, sections 3.3.3 and 3.3.3.2.1 (accessed 2026-10-18)
  7. Linux v6.12: ext4_trim_fs minimum conversion and returned length (accessed 2026-11-08)

Further reading

  1. TRIM (accessed 2026-03-26)
  2. TechTarget — What is SSD TRIM? (accessed 2026-10-07)
  3. NVM Express — NVM Command Set Specification (Dataset Management / deallocate) (accessed 2026-10-07)
  4. Linux storage — discard/TRIM stack discussion (LF slides) (accessed 2026-10-07)
  5. Hesela: SSD sanitization: why TRIM and a successful command are not enough (accessed 2026-10-10)
  6. Hesela: Discard is not zeroing (accessed 2026-10-11)
  7. Hesela: TRIM technology guide (accessed 2026-10-18)

JSON: /data/terms/trim.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. TRIM. Hesela. 2026-11-08. https://hesela.dev/terms/trim/