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

improve ldiskfs "-o discard" performance

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 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 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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: