[MDEV-16457] mariabackup 10.2+ should default to innodb_checksum_algorithm=crc32 Created: 2018-06-11 Updated: 2020-08-25 Resolved: 2018-06-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Affects Version/s: | 10.2.15, 10.3.7 |
| Fix Version/s: | 10.2.16, 10.3.8 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Hartmut Holzgraefe | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | None | ||
| Environment: |
Ubuntu 18.04 "Bionic" 64bit, using packages from mariadb.com apt repository |
||
| Attachments: |
|
| Description |
|
Bcakups taken with mariabackup take a significant higher amount of user CPU time than with XtraBackup on the same data set. The extra time needed is roughly proportional to the amount of data to back up. All tests were done on an otherwise idle server, an AMD machine with 8 cores and 48GB RAM. Different backup formats (simply to a backup directory, stream in xbstream format) where tried, along with different settings for --parallel and --compress. Backup size in the first test series was ~50GB:
In the 2nd series the backup size was close to 90GB:
So regardless of backup options used mariabackup always needed an extra ~70 seconds of user CPU time for the 50GB test, and an extra ~120s for the 90GB test. The database was idle while taking the backup, and for the stream output tests the output stream was directed to /dev/null to cut out write costs as much as possible. System CPU time was similar across all tests as it mostly just measured the kernel time needed to read and write the backup data. |
| Comments |
| Comment by Hartmut Holzgraefe [ 2018-06-11 ] | ||||||||||||||||||||||||
|
Difference seems to be related to checksum calculations?
| ||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2018-06-14 ] | ||||||||||||||||||||||||
|
There are multiple algorithms for the InnoDB page checksum. CRC-32C (innodb_checksum_algorithm=crc32) should be the default since 10.2. The routine buf_calc_page_new_checksum() should be used for innodb_checksum_algorithm=innodb only. The problem appears to be that in Mariabackup 10.2, the default is innodb_checksum_algorithm=innodb instead of crc32:
Workaround: Invoke mariabackup --innodb-checksum-algorithm=crc32. |