Accelerating MariaBackup with Intel QuickAssist

With Intel QuickAssist Technology, you can see a 5x performance in your MariaBackup compression, and lower CPU usage as well. Today I’m going to show you how.

What is Intel QuickAssist?

Nearly a decade ago, Intel released a technology called QuickAssist, which started out as a PCI-e card and then became integrated in many Xeon processes starting with the Skylake generation. QuickAssist Technology (often called QAT) is a special unit that the CPU can offload compression and encryption tasks onto.

I was lucky enough to have early access to this technology back when it was new. Back then, I was assisting Intel port the technology to work with NGINX. The technology had some very impressive capabilities at the time, so I am delighted to see it used in a MariaDB context today.

MariaBackup and compression

A typical use case for MariaBackup is to stream the output and pipe it through a compression utility. This is especially true in later MariaDB versions because the --compress option is deprecated. So, for example, you could do:

mariabackup --backup --stream=xbstream --nolock | gzip > dbbackup.gz

Due to this use case, you can use MariaBackup with QAT without having to recompile or make any changes. There is a utility called “qzip” which compresses in the same way as gzip, but offloaded onto the QuickAssist accelerator. This utility is also available in some Linux distributions, particularly Red Hat based, usually with the package name “qatzip”.

Intel have released a presentation which shows that when using qzip instead of parallel gzip (pigz) at compression level 6, you can see a more than 5x performance improvement. Also, because the work is being offloaded from the CPU, it significantly reduced the CPU utilisation. This has the added bonus of very minimal performance impact to transactions currently running on the database.

For more details, Intel have provided a set of slides showing their testing procedure and results, which you can read below.

Published by Andrew Hutchings

Chief Contributions Officer for the MariaDB Foundation