Activating autotrim results in high load average due to uninterruptible threads
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Native ZFS for Linux |
Fix Released
|
Unknown
|
|||
| zfs-linux (Ubuntu) |
Fix Released
|
Medium
|
Heitor Alves de Siqueira | ||
| Noble |
Fix Released
|
Medium
|
John Cabaj | ||
| Oracular |
Fix Released
|
Medium
|
Unassigned | ||
| Plucky |
Fix Released
|
Medium
|
Heitor Alves de Siqueira | ||
Bug Description
SRU Justification
[Impact]
* High load averages when activating autotrim. Logs included below SRU justification
[Fix]
* Cherry-pick a0aa7a2ee3b5: "Autotrim High Load Average Fix"
[Test Plan]
* Compile tested
* Run through autopkgtest regression tests
[Regression potential]
* Changes isolated, minimal regression risk. Changes already in upstream ZFS
When activating the autotrim feature on any ZFS version starting from 2.2.0 this will lead to a permanent increase of the load average (as diplayed in top) due to an uninterruptible vdev_autotrim thread for each vdev capable of TRIM.
This issue has been reported (https:/
Since this bug was introduced with version 2.2.0 both mantic as well as noble are affected.
How to reproduce:
1. Create a pool with at least one TRIM-capable device
2. run "zpool set autotrim=on <pool>"
3. watch the output of "top" or "runtime" and see how the load average increases permanently even when the system is idle by one per vdev
4. running "ps aux | grep -w D" will show the broken threads:
[root@test ~]# ps aux | grep -w D\<
root 7193 0.0 0.0 0 0 ? D< 13:07 0:00 [vdev_autotrim]
| Changed in zfs: | |
| status: | Unknown → Fix Released |
| Changed in zfs-linux (Ubuntu): | |
| assignee: | nobody → Heitor Alves de Siqueira (halves) |
| status: | Confirmed → In Progress |
| importance: | Undecided → Medium |
| description: | updated |
| tags: | added: patch |
| Changed in zfs-linux (Ubuntu): | |
| status: | In Progress → Fix Released |
| assignee: | Heitor Alves de Siqueira (halves) → nobody |
| Changed in zfs-linux (Ubuntu Noble): | |
| status: | New → In Progress |
| assignee: | nobody → John Cabaj (john-cabaj) |
| importance: | Undecided → Medium |
| tags: | added: verification-done-noble |

Status changed to 'Confirmed' because the bug affects multiple users.