The trouble with discard | Linux Today

The trouble with discard

Written By
JC
Jonathan Corbet
Aug 29, 2009

“The “discard” concept was added to the kernel one year ago to
communicate this information to storage devices. One year later, it
seems that the original discard idea will not survive contact with
real hardware – especially solid-state storage devices.

“There are a number of use cases for the discard functionality.
Large, “enterprise-class” storage arrays can implement virtual
devices with a much larger storage capacity than is actually
installed in the cabinet; these arrays can use information about
unneeded blocks to reuse the physical storage for other data. The
compcache compressed in-memory swapping mechanism needs to know
when specific swap slots are no longer needed to be able to free
the memory used for those slots. Arguably, the strongest pressure
driving the discard concept comes from solid-state storage devices
(SSDs). These devices must move data around on the underlying flash
storage to implement their wear-leveling algorithms. In the absence
of discard-like functionality, an SSD will end up shuffling around
data that the host system has long since stopped caring about;
telling the device about unneeded blocks should result in better
performance.”

Complete Story

JC

Jonathan Corbet

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.