Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-14712

make TRIM state persistent across reboots

Details

    • 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

            [LU-14712] make TRIM state persistent across reboots
            pjones Peter Jones made changes -
            Fix Version/s New: Lustre 2.17.0 [ 16192 ]
            pjones Peter Jones made changes -
            Link New: This issue is related to NVDCSE-214 [ NVDCSE-214 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is related to EX-12311 [ EX-12311 ]
            jhuselton Jason Huselton made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 43261 ]
            pjones Peter Jones made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
            pjones Peter Jones made changes -
            Resolution Original: Fixed [ 1 ]
            Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
            adilger Andreas Dilger made changes -
            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.
            adilger Andreas Dilger made changes -
            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.
            adilger Andreas Dilger made changes -
            Summary Original: improve ldiskfs "-o discard" performance New: make TRIM state persistent across reboots
            adilger Andreas Dilger made changes -
            Link New: This issue is cloned by LU-17980 [ LU-17980 ]

            People

              dongyang Dongyang Li
              adilger Andreas Dilger
              Votes:
              2 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: