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

improve ldiskfs ongoing TRIM performance

XMLWordPrintable

    • 9223372036854775807

      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 tracks each block free request explicitly in memory, and submits trim requests to storage on transaction commit on a block-by-block basis, which is inefficient and may not allow enough aggregation of blocks freed in different transactions.

      It would be better to have an async worker thread to issue the TRIM commands using the standard fstrim mechanism, and do this on a per-blockgroup basis, rather than tracking and issuing the trim on a per-extent basis. This reduces both memory and IO overhead, by aggregating TRIM commands for many blocks in a single group.

      This would be based on the patches in LU-14712 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.

            dongyang Dongyang Li
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: