Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14077

Incremental backup extremly slow

    XMLWordPrintable

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. foo.patch
          5 kB
        2. xtrabackup.cc.patch
          0.9 kB
        3. xtrabackup.cc.patch
          0.7 kB
        4. xtrabackup.cc.patch
          0.6 kB

        Activity

          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.