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

mariabackup takes ~50% more user CPU time than xtrabackup with --compress

    Details

      Description

      When creating a compressed backup mariabackup takes about 50% more user CPU time than xtrabackup (2.4.10). This is true when using the mariadb.com Ubuntu repository to install binaries, and also for binaries I compile myself (using the respective CMake default settings).

      The bundled "quicklz" library source files are exactly the same, so the difference must most likely be in the compiler optimization settings.

      The most obvious difference was that xtrabackup by default builds with -O3, while mariadb builds with -O2, but changing the optimization level to -O3 did not significantly improve the CPU usage either.

      Whether total backup time is affected by this depends on whether the backup is CPU or IO bound, so on compressibility of the data and IO bandwidth.

      Real (wall clock) and CPU user time for different --compress and --parallel settings:

      +----------+----------+---------+---------+---------+---------+-------------+
      | compress | parallel | xt_real | mb_real | xt_user | mb_user | user diff % |
      +----------+----------+---------+---------+---------+---------+-------------+
      | ---      |        - |     813 |     805 |      77 |      81 |           5 |
      | yes      |        1 |     358 |     456 |     230 |     329 |          43 |
      | yes      |        2 |     188 |     233 |     217 |     317 |          46 |
      | yes      |        3 |     142 |     164 |     200 |     310 |          55 |
      | yes      |        4 |     146 |     165 |     200 |     306 |          53 |
      +----------+----------+---------+---------+---------+---------+-------------+
      

        Attachments

        1. m.txt
          1 kB
        2. x.txt
          3 kB

          Activity

            People

            • Assignee:
              wlad Vladislav Vaintroub
              Reporter:
              hholzgra Hartmut Holzgraefe
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: