Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-62074

Use copy_file_range for compactions to optimise write amp

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • storage-engine
    • 0

    Description

      Linux gives a generic copy_file_range API that allows you to copy a portion of a file from a source file to a destination file. Depending on the filesystem this API can do certain optimisations. For example, xfs/btrfs can optimise the copy by using reflinks i.e. instead of doing the file writes into the target file, it can simply increment the extent reference counting. Such that both the source file as well as the destination file, both can refer to the same extent. 

      As this process does not require a file write, it is much more efficient and reduces write amp.

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rohan.suri Rohan Suri
            rohan.suri Rohan Suri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty