How to Enable Intel QAT Backup Compression in SQL Server 2022 - Glenn's SQL Server Performance (2024)

Introduction

One very interesting new feature in SQL Server 2022 RC0 is Intel QAT Backup Compression. Despite what some people seem to think, this feature does not require any QAT capable hardware, and it is pretty easy to enable and use. This post will walk through how to enable Intel QAT backup compression in SQL Server 2022.

I have a video that shows how to do this.

What is Intel QAT Backup Compression?

This is the first in a series of methods that can use specialized hardware accelerators to offload specific tasks from the regular compute cores in a CPU to some other device in your system. This takes that workload off of your regular compute cores, which frees them up to do other tasks (like running database queries).

So far, Microsoft has only announced Intel QAT acceleration, but it seems extremely likely that other acceleration methods will be supported in the future. How far away that future may be is anybody’s guess.

There are two modes that you can use for QAT backup compression.

  • QAT Software Mode
    • Only requires the Intel QAT Driver
    • Does not require any specialized hardware
    • Supported in SQL Server 2022 Standard Edition and Enterprise Edition
  • QAT Hardware Mode
    • Still requires the Intel QAT Driver
    • Requires an Intel QAT capable hardware device
    • Requires SQL Server 2022 Enterprise Edition

If you have SQL Server 2022 Enterprise Edition and an Intel QAT capable hardware device, then you will be using QAT Hardware mode by default when you run a QAT backup command. You can override this default and force your system to use software mode with an ALTER SERVER CONFIGURATION command.

How to Enable Intel QAT Backup Compression in SQL Server 2022 - Glenn's SQL Server Performance (1)

Right now, the easiest method to get an Intel QAT capable hardware device is to use an Intel QAT 8970 PCIe card. In early 2023, you (or your cloud provider) will be able to use Intel Sapphire Rapids processors that have a QAT hardware offload accelerator included as a separate part of the CPU.

How to Enable Intel QAT Backup Compression in SQL Server 2022

This requires three steps (after installing SQL Server 2022 RC0 or newer).

Step 1: Install the latest Intel QAT driver

These drivers are required, whether or not you have any Intel QAT capable hardware in your system. You can even install these drivers before you install SQL Server 2022, as part of your base OS build and configuration.

I have a detailed blog post about how to do this.

  • How to Install the Intel QAT Driver

BTW, don’t let this warning dialog scare you off. It is normal if your system does not have any Intel QAT capable hardware. Most people will not have any Intel QAT accelerators in their system right now. That is fine! You can still test this feature out on whatever hardware you have, physical or virtual. It even works in cloud VMs!

After you install the Intel QAT drivers, restart the SQL Server Service.

Step 2: Enable hardware offload config with sp_configure

This step is also required, even if you don’t have any Intel QAT capable hardware. This configuration setting is like a master switch for any hardware offload methods. So far, Microsoft has only announced Intel QAT hardware offload, but it is pretty obvious that they are planning for additional hardware offload methods in the future.

Here is the code for this sp_configure option. You need to restart the SQL Server Service for the change to go into effect.

-- Step 2 - Enable hardware offload config with sp_configure-- This must be enabled in order to use any hardware offload methods-- Disabling it here will disable ALL hardware offload methodsEXEC sp_configure 'show advanced options', 1;GORECONFIGUREGOEXEC sp_configure 'hardware offload enabled', 1;GORECONFIGUREGO-- Restart the SQL Server Service (because it is not a dynamic option)

Step 3: Enable hardware offload for the QAT accelerator

The final step is to run an ALTER SERVER CONFIGURATION command to enable hardware offload for the QAT accelerator. Again, this step is required, even if you don’t have any Intel QAT capable hardware in your system. Here is the code for this step.

-- Step 3 - Enable hardware offload for the QAT accelerator-- This is required even if you don't have any Intel QAT hardwareALTER SERVER CONFIGURATION SET HARDWARE_OFFLOAD = ON (ACCELERATOR = QAT); -- You will see this message:-- Hardware offload configuration has changed. Current configuration (0x0) and mode (0x0). -- New configuration (0x1) and mode (0x0). Restart SQL Server for the new configuration to take effect.-- Restart the SQL Server Service to have it go into effect-- You are done!

You need to restart the SQL Server Service for the change to go into effect.

How Do I Know if it Worked?

You can check sp_configure and a new sys.dm_server_accelerator_status DMV to find out. Here are queries for that:

-- Checking your backup compression status-- Get backup related instance-level configuration valuesSELECT [name], [value], value_in_use, minimum, maximum, [description], is_dynamic, is_advancedFROM sys.configurations WITH (NOLOCK)WHERE [name] IN (N'backup compression default', N'backup compression algorithm', N'hardware offload config', N'hardware offload enabled', N'hardware offload mode')ORDER BY [name];-- backup compression algorithm values-- 0 = None-- 1 = MS_XPRESS (Microsoft native backup compression)-- 2 = QAT_DEFLATE (Intel QAT backup compression)-- Get detailed accelerator information using the new DMVSELECT accelerator, accelerator_desc, config, config_in_use , mode, mode_desc, mode_reason, mode_reason_desc, accelerator_hardware_detected, accelerator_library_version, accelerator_driver_versionFROM sys.dm_server_accelerator_status;

This is what it looks like on one of my systems (that does not have any Intel QAT capable hardware).

How to Enable Intel QAT Backup Compression in SQL Server 2022 - Glenn's SQL Server Performance (3)

I also have a more complete script here.

Final Words

It is pretty easy to enable this new feature, and it does not require any special hardware for software mode. If you do have QAT capable hardware and SQL Server 2022 Enterprise Edition, you can use hardware mode or software mode. Which mode you choose depends on your goals.

You should be aware that if you have a QAT compressed backup (regardless of whether hardware or software mode was used for the backup), then you MUST have the Intel QAT driver installed on any system that you want to restore that backup to. You also need to follow the steps I’ve outlined in this post to enable QAT Backup Compression.

If you don’t, the restore will error out with a message like this:

Msg 17441, Level 16, State 1, Line 175 This operation requires Intel(R) QuickAssist Technology (QAT) libraries to be loaded.

I have been testing this feature (with both hardware mode and software mode) for quite some time, and I have been very impressed with the performance and reliability of this feature. I will have another post that talks about my testing experience in depth.

But don’t take my word for it. I’m just some guy on the internet. You should do your own testing of QAT backups and restores until you feel completely confident about the feature.

If you have any questions about this post, please ask me here in the comments or on Twitter. I am pretty active on Twitter asGlennAlanBerry.Thanks for reading!

Related

How to Enable Intel QAT Backup Compression in SQL Server 2022 - Glenn's SQL Server Performance (2024)

FAQs

How to Enable Intel QAT Backup Compression in SQL Server 2022 - Glenn's SQL Server Performance? ›

Team multiple network cards together. If you're using 1Gb Ethernet and backing up to a network share, try teaming multiple 1Gb cards together on both the SQL Server and on the backup target on the other side. Use multiple backup files. Try striping the backup to multiple files.

How to enable backup compression in SQL Server? ›

Using SQL Server Management Studio
  1. In Object Explorer, right-click a server and select Properties.
  2. Click the Database settings node.
  3. Under Backup and restore, Compress backup shows the current setting of the backup compression default option.
Nov 18, 2022

How to improve backup performance in SQL Server? ›

Team multiple network cards together. If you're using 1Gb Ethernet and backing up to a network share, try teaming multiple 1Gb cards together on both the SQL Server and on the backup target on the other side. Use multiple backup files. Try striping the backup to multiple files.

Which version of SQL Server supports backup compression? ›

Backup compression is supported on SQL Server editions: Enterprise, Standard, and Developer. Every edition of SQL Server 2008 (10.0. x) and later can restore a compressed backup.

How to check if SQL Server backup is compressed? ›

To see if a particular database backup file was backed up using compression or not you can interrorgate the header information of the file: RESTORE HEADERONLY FROM DISK = 'Path to backup file'; One of the columns returned is labelled "Compressed". 1 = compressed, 0 = not compressed.

How do I know if SQL Server is compression enabled? ›

To determine the compression state of partitions in a partitioned table, query the data_compression column of the sys. partitions catalog view. When you compress indexes, leaf-level pages can be compressed with both row and page compression.

How do I enable compression in SQL? ›

Use SQL Server Management Studio
  1. Use the same compression type for all partitions check box. Select to configure the same compression setting for all partitions. ...
  2. Partition Number. Lists each partition in the table or index. ...
  3. Compression Type. ...
  4. Boundary. ...
  5. Row Count. ...
  6. Current Space. ...
  7. Requested Compressed Space. ...
  8. Calculate.
Jun 10, 2024

How do I maximize SQL Server performance? ›

SQL Performance Tuning: 7 Practical Tips for Developers
  1. Use Indexes Wisely: ...
  2. Optimize Your Queries: ...
  3. Be Cautious with Joins and Subqueries: ...
  4. Limit the Result Set: ...
  5. Appropriately Size and Configure the Database: ...
  6. Batch Operations: ...
  7. Avoid Cursors: ...
  8. Regularly Update Statistics:
Mar 3, 2022

Why is SQL Server backup slow? ›

A single database having a size in gigabytes can have millions of rows of data. Extend that size to terabytes, and the database will contain a couple of billion rows of data occupying massive disk space and spread across multiple Filegroups. Naturally, backing up such mammoth volumes of data is going to take time.

What is the best backup strategy in SQL Server? ›

10 Best Practices for SQL Server Backups
  • Full Backup. A full backup captures the entire database, including all the data and schema objects. ...
  • Differential Backup. ...
  • Transaction Log Backup. ...
  • File or File Group Backup. ...
  • Establish a Backup Schedule. ...
  • Automate Backups. ...
  • Implement Data Retention Policies. ...
  • Store Backups Securely.
Oct 20, 2023

Should I compress SQL Server backups? ›

Looking at a traditional DBA role, you might have exposure to view your server, drives, and the size of the backups. Therefore, taking a compressed backup leads you to likely see less storage being used for the backup file compared to other backups of the same database.

What is the compression rate for SQL Server backup? ›

If your DB is full of the same byte repeated then it's going to compress to an extremely small size, maybe a ratio of 99.9% or better. Your data is probable somewhere inbetween, so it'll compress somewhere between 0.1% and 99.9%. The backup industry likes to advertise that "most" data can be 50% compressed.

What is the best compression for SQL files? ›

You can still use opensource compression tools like gzip , 7Zip, bzip2 or QuickLZ after the backup compression to benefit. Also, have a look at MSSQL Compressed Backup on codeplex. File Compression in the Multi-Core Era.

How to set backup compression in SQL Server? ›

To enable SQL Server backup compression in SQL Backup Master: Double-click your backup job in the SQL Backup Master main window. Click the Backup job settings link. Select the Database tab.

How do I check if SQL Server backup is running? ›

Monitoring the Database Backup Progress

In SSMS, right-click on the database you want to back up, then click on Tasks > Back Up... In the lower-left corner of the window, the progress of the process is displayed. For example, the progress in the screenshot indicates that 30% of the database has been backed up.

How do I know if SQL Server has enough memory? ›

To monitor the amount of memory that SQL Server uses, examine the following performance counters:
  1. SQL Server: Memory Manager: Total Server Memory (KB) ...
  2. SQL Server: Memory Manager: Target Server Memory (KB) ...
  3. Process: Working Set. ...
  4. Process: Private Bytes. ...
  5. SQL Server: Buffer Manager: Database Pages.
Dec 4, 2023

How do I enable backup encryption in SQL Server? ›

You can encrypt a backup when creating the backup of a database in any of the following dialog boxes: Back Up Database (Backup Options Page) On the Backup Options page, you can select Encryption, and specify the encryption algorithm and the certificate or asymmetric key to use for the encryption.

Should I compress my SQL backups? ›

Compression lets you keep more sets of backup data on hand or save transmission time when sending the backup data to another server. Also, compression often results in faster backups because of reduced IO.

How do I enable SQL backup? ›

Right-click the database you want to back up, select Tasks, and then select Back Up. In the Back Up Database - <DatabaseName> dialog box, make sure that Backup type is set to Full and Backup component is set to Database. Under Destination, select Disk for the Back up to option and then select Add.

How do I enable backup checksum in SQL Server? ›

Connect to the Database Engine. From the Standard bar, select New Query. To enable backup checksums in a RESTORE Statements (Transact-SQL) statement, specify the WITH CHECKSUM option. This is the default behavior for a compressed backup.

Top Articles
Dress for Success: Tips for Building a Professional Wardrobe without Breaking the Bank - Goodwill Big Bend
Food you probably don’t need to refrigerate (and ones you do) - National | Globalnews.ca
What Is Single Sign-on (SSO)? Meaning and How It Works? | Fortinet
Pollen Count Centreville Va
AllHere, praised for creating LAUSD’s $6M AI chatbot, files for bankruptcy
Mate Me If You May Sapir Englard Pdf
Mackenzie Rosman Leaked
Erika Kullberg Wikipedia
Beds From Rent-A-Center
Bluegabe Girlfriend
Rubfinder
Texas (TX) Powerball - Winning Numbers & Results
Best Private Elementary Schools In Virginia
Audrey Boustani Age
123Moviescloud
How to Store Boiled Sweets
Evil Dead Rise Showtimes Near Regal Columbiana Grande
Pac Man Deviantart
SXSW Film & TV Alumni Releases – July & August 2024
Talbots.dayforce.com
Welcome to GradeBook
Utexas Iot Wifi
Boxer Puppies For Sale In Amish Country Ohio
Znamy dalsze plany Magdaleny Fręch. Nie będzie nawet chwili przerwy
Egusd Lunch Menu
11526 Lake Ave Cleveland Oh 44102
Giantbodybuilder.com
UAE 2023 F&B Data Insights: Restaurant Population and Traffic Data
Why comparing against exchange rates from Google is wrong
The Latest: Trump addresses apparent assassination attempt on X
Delta Rastrear Vuelo
6465319333
How to Use Craigslist (with Pictures) - wikiHow
Strange World Showtimes Near Regal Edwards West Covina
Serenity Of Lathrop - Manteca Photos
Craigslist Gigs Wichita Ks
What Does Code 898 Mean On Irs Transcript
Barstool Sports Gif
Lacy Soto Mechanic
Ucsc Sip 2023 College Confidential
Rush Copley Swim Lessons
Quiktrip Maple And West
Child care centers take steps to avoid COVID-19 shutdowns; some require masks for kids
9:00 A.m. Cdt
My Gsu Portal
Jackerman Mothers Warmth Part 3
Makemkv Key April 2023
Appsanywhere Mst
Service Changes and Self-Service Options
Loss Payee And Lienholder Addresses And Contact Information Updated Daily Free List Bank Of America
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 5816

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.