> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siderolabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

> FilesystemTrimConfig is a filesystem trim (fstrim) configuration document.
Filesystem trim (the equivalent of the `fstrim` command) periodically discards unused blocks
of mounted filesystems which support trimming.

When this document is present, Talos builds a stable per-node, per-volume schedule and trims
eligible volumes at the configured interval. If the document is absent, no automatic trimming
is performed (unless enabled explicitly on a per-volume basis).


# FilesystemTrimConfig

```yaml theme={null}
apiVersion: v1alpha1
kind: FilesystemTrimConfig
interval: 168h0m0s # The interval at which the filesystems are trimmed.

# # The size of the filesystem range trimmed at once.
# chunkSize: 1GiB

# # The delay between trimming consecutive chunks.
# chunkDelay: 250ms

# # The minimum contiguous free range to discard.
# minLength: 1MiB
```

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
      <th>Value(s)</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`interval`</td>
      <td>Duration</td>
      <td>The interval at which the filesystems are trimmed.<br /><br />The trim is performed at a stable, hash-derived time within the interval, which is different<br />for each volume and each node, so that trims are spread out over time.</td>

      <td />
    </tr>

    <tr>
      <td>`chunkSize`</td>
      <td>ByteSize</td>
      <td>The size of the filesystem range trimmed at once.<br /><br />By default (or when set to zero), the whole filesystem is trimmed at once (same as the `fstrim` command).<br />Trimming a large filesystem at once issues discards for all free space back-to-back,<br />which might cause latency spikes for other workloads using the same disk.<br />Setting the chunk size splits the trim into multiple operations, each covering at most<br />the chunk size of the filesystem. When set, the chunk size must be at least 1MiB.<br /><br />Size is specified in bytes, but can be expressed in human readable format, e.g. 1GiB.</td>

      <td />
    </tr>

    <tr>
      <td>`chunkDelay`</td>
      <td>Duration</td>
      <td>The delay between trimming consecutive chunks.<br /><br />Only used when the chunk size is set.</td>

      <td />
    </tr>

    <tr>
      <td>`minLength`</td>
      <td>ByteSize</td>
      <td>The minimum contiguous free range to discard.<br /><br />Free ranges smaller than this value are not discarded, which reduces the number of discard<br />operations at the expense of leaving small free ranges untrimmed.<br />The kernel raises the value to the discard granularity of the device.<br />The value cannot exceed 128MiB, as ext4 rejects values larger than the block group size.<br /><br />Size is specified in bytes, but can be expressed in human readable format, e.g. 1MiB.</td>

      <td />
    </tr>
  </tbody>
</table>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.