Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
9223372036854775807
Description
The current "-o discard" mount option for ldiskfs enables on-the-fly TRIM of underlying flash devices (or thinly-provisioned LUNs). However, the current implementation hurts performance because it is done synchronously in the context of the JBD2 commit thread as a commit callback, which blocks later transaction commits.
There are patches by Shilong that make the TRIM state for a block group persistent, so that running TRIM with mke2fs does not also lead to fstrim resubmitting TRIM requests for all of the groups again immediately after mount/remount.
Most recent e2fsprogs patches at:
https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-1-git-send-email-wangshilong1991@gmail.com/
https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-2-git-send-email-wangshilong1991@gmail.com/
ext4 kernel patch:
https://patchwork.ozlabs.org/project/linux-ext4/patch/1592831677-13945-1-git-send-email-wangshilong1991@gmail.com/
https://patchwork.ozlabs.org/project/linux-ext4/patch/1592835419-7841-1-git-send-email-wangshilong1991@gmail.com/
I think the combination of these two patches would improve ongoing ldiskfs performance on flash devices significantly.
Attachments
Issue Links
Activity
Fix Version/s | New: Lustre 2.17.0 [ 16192 ] |
Link | New: This issue is related to NVDCSE-214 [ NVDCSE-214 ] |
Link | New: This issue is related to EX-12311 [ EX-12311 ] |
Remote Link | New: This issue links to "Page (Whamcloud Community Wiki)" [ 43261 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Reopened [ 4 ] | New: Resolved [ 5 ] |
Resolution | Original: Fixed [ 1 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |
Description |
Original:
The current "{{-o discard}}" mount option for ldiskfs enables on-the-fly TRIM of underlying flash devices (or thinly-provisioned LUNs). However, the current implementation hurts performance because it is done synchronously in the context of the JBD2 commit thread as a commit callback, which blocks later transaction commits.
There are patches by Shilong that make the TRIM state for a block group persistent, so that running TRIM with {{mke2fs}} does not also lead to {{fstrim}} resubmitting TRIM requests for all of the groups again immediately after mount/remount. Most recent patches at: https://marc.info/?l=linux-ext4&m=159283169109297&w=4 I think the combination of these two patches would improve ongoing ldiskfs performance on flash devices significantly. |
New:
The current "{{-o discard}}" mount option for ldiskfs enables on-the-fly TRIM of underlying flash devices (or thinly-provisioned LUNs). However, the current implementation hurts performance because it is done synchronously in the context of the JBD2 commit thread as a commit callback, which blocks later transaction commits.
There are patches by Shilong that make the TRIM state for a block group persistent, so that running TRIM with {{mke2fs}} does not also lead to {{fstrim}} resubmitting TRIM requests for all of the groups again immediately after mount/remount. Most recent e2fsprogs patches at: https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-1-git-send-email-wangshilong1991@gmail.com/ https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-2-git-send-email-wangshilong1991@gmail.com/ ext4 kernel patch: https://patchwork.ozlabs.org/project/linux-ext4/patch/1592831677-13945-1-git-send-email-wangshilong1991@gmail.com/ https://patchwork.ozlabs.org/project/linux-ext4/patch/1592835419-7841-1-git-send-email-wangshilong1991@gmail.com/ I think the combination of these two patches would improve ongoing ldiskfs performance on flash devices significantly. |
Description |
Original:
The current "{{-o discard}}" mount option for ldiskfs enables on-the-fly TRIM of underlying flash devices (or thinly-provisioned LUNs). However, the current implementation hurts performance because it is done synchronously in the context of the JBD2 commit thread as a commit callback, which blocks later transaction commits.
There is work being done in the upstream kernel to improve "{{-o discard}}" to use an async worker thread to issue the TRIM commands, and do this on a per-blockgroup basis, rather than issuing the trim on a per-extent basis. Current patch series is at: https://marc.info/?l=linux-ext4&m=162201857620045&w=4 There are also patches by Shilong that make the TRIM state for a block group persistent, so that running TRIM with {{mke2fs}} does not also lead to {{fstrim}} resubmitting TRIM requests for all of the groups again immediately after mount/remount. Most recent patches at: https://marc.info/?l=linux-ext4&m=159283169109297&w=4 I think the combination of these two patches would improve ongoing ldiskfs performance on flash devices significantly. |
New:
The current "{{-o discard}}" mount option for ldiskfs enables on-the-fly TRIM of underlying flash devices (or thinly-provisioned LUNs). However, the current implementation hurts performance because it is done synchronously in the context of the JBD2 commit thread as a commit callback, which blocks later transaction commits.
There are patches by Shilong that make the TRIM state for a block group persistent, so that running TRIM with {{mke2fs}} does not also lead to {{fstrim}} resubmitting TRIM requests for all of the groups again immediately after mount/remount. Most recent patches at: https://marc.info/?l=linux-ext4&m=159283169109297&w=4 I think the combination of these two patches would improve ongoing ldiskfs performance on flash devices significantly. |
Summary | Original: improve ldiskfs "-o discard" performance | New: make TRIM state persistent across reboots |