Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.28
    • 10.1.30, 10.2.12
    • Backup
    • OS: ArchLinux
      mariabackup: Patched version with extra debug, based on 10.1 (98cd0ec536915b25a841ffc227285b15f35acef7)
      MariaDB: 10.1.28
    • 10.1.30

    Description

      Hello

      Taking incremental backup like: `mariabackup --backup --incremental-lsn=xx` is way slower than taking a full backup, something like 20x+ as slow.

      I did a bit of debugging, and noticed that it spent way longer in xtrabackup_copy_datafile, when doing inc backup (~ 0.02 vs ~ 0.001 (full backup)).

      After a bit more trail-and-error, I found that it spent most of the time in a `memset` line. This line: https://github.com/MariaDB/server/blob/da05d0276a0569341c8bb41365dc7b05f9c4ddb7/extra/mariabackup/write_filt.cc#L80

      I found that by adding the following print statement to the file: https://github.com/klausenbusk/server/commit/afcdb9128927e714ee0e3bcf5c14fea2f56855e0
      Which gave me:
      inc: 0.000001
      inc: 0.000004
      inc: 0.027387
      inc: 0.027435

      Ideally the code should only write delta file, when something has changed. At the moment it write a lot of "dummy" delta files, which only contain the header.

      Regards Kristian Klausen

      Attachments

        1. xtrabackup.cc.patch
          0.6 kB
        2. xtrabackup.cc.patch
          0.7 kB
        3. foo.patch
          5 kB
        4. xtrabackup.cc.patch
          0.9 kB

        Activity

          > If making a full backup is not a big deal for you, why not use a binary diff tool, e.g rdiff, instead of this incremental backup
          It adds unneeded complexity. I store the backup on object storage services (Backblaze B2 & Amazon S3), so I can't use complex tool without copying a lot of files back and forth.

          With mariabackup I only need to push files, with rdiff I would need to pull the files from the last backup <somehow>. It would be much easier if mariabackup could just be fixed.

          klausenbusk Kristian Klausen added a comment - > If making a full backup is not a big deal for you, why not use a binary diff tool, e.g rdiff, instead of this incremental backup It adds unneeded complexity. I store the backup on object storage services (Backblaze B2 & Amazon S3), so I can't use complex tool without copying a lot of files back and forth. With mariabackup I only need to push files, with rdiff I would need to pull the files from the last backup <somehow>. It would be much easier if mariabackup could just be fixed.
          klausenbusk Kristian Klausen added a comment - Reported upstream: https://bugs.launchpad.net/percona-xtrabackup/+bug/1731249

          klausenbusk, did you have a chance to look at how it performs for you in 10.1.29, since it already contains a patch that I think would speed up your backup considerably.

          wlad Vladislav Vaintroub added a comment - klausenbusk , did you have a chance to look at how it performs for you in 10.1.29, since it already contains a patch that I think would speed up your backup considerably.

          Closing due to no feedback. Please feel free to comment, if it did not solve it for you

          wlad Vladislav Vaintroub added a comment - Closing due to no feedback. Please feel free to comment, if it did not solve it for you

          wlad sorry for the late respond. The fix [1] does indeed fix it, full backup takes around ~ 3 min now and inc backup around ~ 1,5 min.

          Many thanks
          I did stumble on a packing issue, when changing my script though: https://jira.mariadb.org/browse/MDEV-15869

          [1] https://github.com/MariaDB/server/commit/53c7aaf332d31d0441a533fd9a91b380169ab611

          klausenbusk Kristian Klausen added a comment - wlad sorry for the late respond. The fix [1] does indeed fix it, full backup takes around ~ 3 min now and inc backup around ~ 1,5 min. Many thanks I did stumble on a packing issue, when changing my script though: https://jira.mariadb.org/browse/MDEV-15869 [1] https://github.com/MariaDB/server/commit/53c7aaf332d31d0441a533fd9a91b380169ab611

          People

            wlad Vladislav Vaintroub
            klausenbusk Kristian Klausen
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.