| Field | Type | Description | Value(s) |
|---|---|---|---|
interval | Duration | The interval at which the filesystems are trimmed. The trim is performed at a stable, hash-derived time within the interval, which is different for each volume and each node, so that trims are spread out over time. | |
chunkSize | ByteSize | The size of the filesystem range trimmed at once. By default (or when set to zero), the whole filesystem is trimmed at once (same as the fstrim command).Trimming a large filesystem at once issues discards for all free space back-to-back, which might cause latency spikes for other workloads using the same disk. Setting the chunk size splits the trim into multiple operations, each covering at most the chunk size of the filesystem. When set, the chunk size must be at least 1MiB. Size is specified in bytes, but can be expressed in human readable format, e.g. 1GiB. | |
chunkDelay | Duration | The delay between trimming consecutive chunks. Only used when the chunk size is set. | |
minLength | ByteSize | The minimum contiguous free range to discard. Free ranges smaller than this value are not discarded, which reduces the number of discard operations at the expense of leaving small free ranges untrimmed. The kernel raises the value to the discard granularity of the device. The value cannot exceed 128MiB, as ext4 rejects values larger than the block group size. Size is specified in bytes, but can be expressed in human readable format, e.g. 1MiB. |
FilesystemTrimConfig
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).