{"id":49240,"date":"2023-03-09T11:00:00","date_gmt":"2023-03-09T19:00:00","guid":{"rendered":""},"modified":"2024-02-08T12:19:42","modified_gmt":"2024-02-08T20:19:42","slug":"sql-server-2022-intel-quickassist-technology-overview","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/03\/09\/sql-server-2022-intel-quickassist-technology-overview\/","title":{"rendered":"SQL Server 2022: Intel\u00ae QuickAssist Technology overview"},"content":{"rendered":"\n
Part of the <\/em>SQL Server 2022 blog series<\/em><\/a>. <\/p>\n\n\n\n In SQL Server 2008 Enterprise Edition, backup compression<\/a> was introduced adding While customers use the current compression standard, the challenge many customers have with the current compression implementation is that the compression ratios are frequently too low to justify the additional compute overhead required to compress the backup files. Intel\u00ae QuickAssist (Intel QAT) technology<\/a> in SQL Server 2022, solves these challenges by providing hardware acceleration and CPU offload capabilities for enhanced compression and decompression functions. This feature is designed to give tangible improvements both in terms of reduced CPU usage and backup completion times, as well as a reduction in storage consumption.<\/p>\n\n\n\n The interface for Intel\u00ae<\/sup> QAT<\/a> devices uses a software library called QATzip<\/a> where the QATzip API maintains a built-in software fallback mechanism. This fallback mechanism allows administrators to hot-add\/remove devices, better resist hardware failure scenarios, and provide software-based compression where needed.<\/p>\n\n\n\n The SQL Server 2022 feature provides integrated compression\/decompression capabilities by using the QATzip library<\/a> and the associated Intel\u00ae<\/sup> Intelligent Storage Acceleration Library<\/a> (ISA-L). Intel\u00ae<\/sup> ISA-L is installed alongside QATzip where the presence and enablement of both the QATzip and Intel\u00ae<\/sup> ISA-L assemblies is a prerequisite for enabling instance-level server configuration for Intel\u00ae<\/sup> QAT hardware acceleration.<\/p>\n\n\n\n QATzip currently supports offloading backups to hardware devices, either through a peripheral component interconnect express (PCIe) adapter or as part of the host server chipset, and also supplying a software-based compression capability that can be used if there isn\u2019t hardware available.<\/p>\n\n\n\n The SQL Server 2022 server-scope T-SQL syntax extends the current BACKUP DATABASE command to make it easy for database administrators to choose the desired algorithm to compress backups.<\/p>\n\n\n\n Additionally, the sp_configure configuration option is available to adjust backup compression defaults while introducing a new dynamic management view in order to query the configuration state.<\/p>\n\n\n\n The implementation of this feature surfaces appropriate error log and informational messaging to troubleshoot the Intel\u00ae<\/sup> QAT configuration as well as being able to track the benefits of the Intel\u00ae<\/sup> QAT compression feature over time by surfacing the compression algorithm history in the msdb database.<\/p>\n\n\n Learn about the new features on security, platform, management, and more.<\/p>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t\t\t\t The organizations that will find the most benefit from the Intel\u00ae<\/sup> QAT are those that have high needs around maintaining customer workloads, such as mission critical OLTP and online analytical processing (OLAP) environments, while also ensuring their organization\u2019s data recovery strategy maintains the organizations service level agreements (SLAs). These organizations must maintain application workloads to meet customer expectations while ensuring the organization\u2019s data recovery strategy is never put at risk.<\/p>\n\n\n\n Often these organizations are highly virtualized and are running SQL Server instances at, or very close to, 100 percent processing time to maximize hardware and software licensing investments.<\/p>\n\n\n\n Reference:<\/strong> Customers should download the Intel drivers themselves directly from the Intel QuickAssist supportability page. The supportability page will give an overview of the Intel\u00ae<\/sup> QAT, list driver versions per operating system, and maintain the release notes for the Intel\u00ae<\/sup> QAT drivers.<\/p>\n\n\n\n Note:<\/strong> The official Intel\u00ae<\/sup> QAT Driver for Windows, which for the writing of this documentation is version 1.8.0-0010, is required to be installed separately from the SQL Server 2022 installation.<\/p>\n\n\n\n For the initial release of QAT-enabled backups for SQL Server 2022, the feature will be available for SQL Server 2022 on Windows Server only. As a host operating system, Windows Server 2016, Windows Server 2019, and Windows Server 2022 are supported.<\/p>\n\n\n\n When the drivers are installed and server-scope configuration option is enabled for SQL Server, it is expected that the QATzip library will be available in the C:\\Windows\\ system32\\ path for QATzip and the Intel\u00ae<\/sup> ISA-L will be available in C:\\Program Files\\Intel\\ISAL\\* path.<\/p>\n\n\n\n This path is true for both hardware and software-only deployment scenarios.<\/p>\n\n\n\n Customers can install the drivers before the SQL Server 2022 installation in preparation for a disaster recovery site, for system standardization, or after the SQL Server 2022 installation, even without QAT hardware. In either case, it is required for customers to maintain the driver version. <\/p>\n\n\n\n It\u2019s possible to install the QATzip library on a server with no QAT hardware acceleration devices available (virtual or physical). In such cases, SQL Server will still load the In this scenario, users can specify the Below are links to the currently supported Windows Server driver version, the Intel\u00ae<\/sup> QAT release notes, and the Intel\u00ae<\/sup> QAT landing page, which will be used as the primary location for Intel\u00ae<\/sup> QAT support.<\/p>\n\n\n\n Intel\u00ae<\/sup> QuickAssist Technology landing page<\/a> SQL Server 2022 implements different levels of Intel\u00ae<\/sup> QAT support based on the SQL Server edition. The SQL Server 2022 Enterprise edition will use hardware offloading if an Intel QAT device is available, otherwise, it will fall back to software-based compression if the Intel QAT device is not available for any reason.<\/p>\n\n\n\n SQL Server 2022 Standard Edition will only allow Intel\u00ae<\/sup> QAT backups with software-only compression, even if an Intel QAT device is available.<\/p>\n\n\n\n SQL Server 2022 Express Edition will allow Intel\u00ae<\/sup> QAT backups to be restored but will only allow backups to be performed with the default MS_XPRESS algorithm.<\/p>\n\n\n\n Note<\/strong>: The Intel\u00ae<\/sup> QAT drivers are required to be installed in order to perform backups and restores using the Intel\u00ae<\/sup> QAT feature.<\/p>\n\n\n\n In order to back up databases with the Intel\u00ae<\/sup> QAT compression algorithm, it is required to have the drivers installed, and the SQL Server must then be permitted to load the drivers into the SQL Server 2022 process space.<\/p>\n\n\n\n To complete this task, a new option has been added to ALTER SERVER CONFIGURATION<\/a> in SQL Server 2022 with the HARDWARE_OFFLOAD syntax to enable or disable the use of hardware acceleration for a SQL Server instance. With this configuration being applied, after a restart of the SQL Server service, the Intel\u00ae<\/sup> QAT<\/a> hardware acceleration technology can be used to provide a new optional backup compression algorithm. After the feature is enabled, every time the SQL Server service starts, the SQL Server process will look for the required user space software library that interfaces with the hardware acceleration device driver API and will load the software assemblies if they are available. The Intel\u00ae<\/sup> QAT<\/a> user space library is In the case of the Windows operating system, there is a complimentary software library to QATzip, the Intel\u00ae <\/sup>Intelligent Storage Acceleration Library (ISA-L)<\/a>. This serves as a software fallback mechanism for QATzip in the case of hardware failure as well as a software-based option when the hardware is not available.<\/p>\n\n\n\n Note<\/strong>: The unavailability of a QAT hardware device will not prevent SQL instances from performing backup or restore operations using the new The ALTER SERVER CONFIGURATION statement will be used to enable or disable access to QAT devices. Using the HARDWARE_OFFLOAD statement, as shown below, will persist a bit on the SQL Server boot page to load QAT binaries at startup.<\/p>\n\n\n\n After executing the statement, users would then restart the SQL Server service to have the QAT binaries loaded into the SQL Server process space.<\/p>\n\n\n\n Note<\/strong>: The default configuration will be to use the Microsoft default MS_XPRESS compression capabilities.<\/p>\n\n\n\n The ALTER SERVER CONFIGURATION statement below will disable the Intel\u00ae<\/sup> QAT feature for SQL Server 2022.<\/p>\n\n\n\n The HARDWARE_OFFLOAD server-scope configuration option will be compatible with Availability Groups. If the setting is enabled on a primary replica, the configuration option will be a persistent server-scope property such that upon failover from a primary to a secondary replica, an attempt will be made to load the correct assemblies on the new primary replica. The recommendation will be to enable the server-scope setting on all replicas after installing the latest Intel\u00ae<\/sup> QAT drivers on each replica.<\/p>\n\n\n\n In order to verify the Intel\u00ae<\/sup> QAT accelerator configuration, a number of methods can be used including a new dynamic management view (DMV), sp_configure and the sys.configurations catalog view, and the SQL Server 2022 error log.<\/p>\n\n\n\n The SQL Server sys.dm_server_hardware_offload_config dynamic management view can be used to verify the Intel\u00ae<\/sup> QAT configuration state.<\/p>\n\n\n\n The addition of this dynamic management view will make it much easier to verify the SQL Server accelerators that are configured for use, and those that have been confirmed to be loaded. This dynamic management view (DMV) should be the primary method to verify the configuration state of the available accelerators. GO<\/p>\n\n\n The SQL Server backup compression default behavior can be adjusted. You can change the server default configuration<\/a> as well as other options. You can enable or disable hardware acceleration, you can enable backup compression as a default, and you can also change the default compression algorithm as by using sp_configure.<\/p>\n\n\n\n The status of these options is reflected in the As mentioned previously, you can discover the hardware offload configuration by querying the sys.dm_server_hardware_offload_config dynamic management view.<\/p>\n\n\n\n To discover the backup compression default state, you can use the query below: <\/p>\n\n\n\n Changing this configuration is permitted through the sys.sp_configure stored procedure.<\/p>\n\n\n\n For example:<\/p>\n\n\n\n No restart of SQL Server is required for this change to take effect. When this default option is changed to 1 (i.e., WITH COMPRESSION), MS_XPRESS will continue to be the default compression option, provided the backup compression algorithm has not been changed.<\/p>\n\n\n\n To discover the backup compression algorithm being used, you can use the query below:<\/p>\n\n\n\n The \u201cconfigure backup compression algorithm\u201d configuration allows customers to change the default compression algorithm so they can determine if they want Intel\u00ae<\/sup> QAT to be the default compression algorithm for SQL Server.<\/p>\n\n\n\n There will be a global sp_configure option to enable\/disable hardware offloading.<\/p>\n\n\n\n Note<\/strong>: <\/strong>The value will be either 0 or 1 and will require a reboot to take effect.<\/p>\n\n\n\n sp_configure ‘hardware offload enabled’, 0<\/p>\n\n\n\n GO<\/p>\n\n\n\n The T-SQL Note: <\/strong>The standard compression algorithm will be referred to as The example below will perform backup compression using Intel\u00ae<\/sup> QAT hardware acceleration.<\/p>\n\n\n\n Either of these statements will use the default MS_XPRESS compression engine.<\/p>\n\n\n\n The extension to the T-SQL syntax for backup compression provides the addition of the The table below gives a summary of the BACKUP DATABASE with COMPRESSION options in SQL Server 2022.<\/p>\n\n\n\n WITH COMPRESSION<\/a><\/code> as an option in the T-SQL backup command. SQL Server backup compression provides the compressed backup option for all streaming SQL Server backup types\u2014full, differential, and transaction log. Using the metadata in the backup file header, the RESTORE<\/a> command decompresses compressed backup files. Compressing backup data benefits customers in two ways: first, the backup files will consume less storage, and second, since there are fewer bytes being transferred, the backups run faster than uncompressed backups.
The default configuration in SQL Server is to not compress backups, but many users change this default globally using sp_configure<\/code><\/a>.<\/p>\n\n\n\n
Additionally, customers cannot offload the compute overhead of the compression task. Many customers in high-volume online transaction processing (OLTP) environments put their business continuity and disaster recovery (BCDR) strategy at risk by delaying their regular backup schedules in order to remain operational for customer workloads.<\/p>\n\n\n\n
\t\t\t\t<\/div>\n\t\t\t\n\t\t\tSQL Server 2022<\/h2>\n\n\t\t\t\t\t
Business cases for backup compression with Intel\u00ae<\/sup> QAT<\/h2>\n\n\n\n
Online transaction processing (OLTP) – Microsoft Docs
<\/a>Online analytical processing (OLAP) – Microsoft Docs<\/a><\/p>\n\n\n\nIntel\u00ae<\/sup> QAT driver overview<\/h2>\n\n\n\n
Preparing a disaster recovery server site<\/h3>\n\n\n\n
QATZip.dll<\/code> assembly provided the ALTER SERVER CONFIGURATION<\/code> option for HARDWARE_OFFLOAD<\/code> option is enabled for QAT<\/code>.<\/p>\n\n\n\nALGORITHM <\/code>for COMPRESSION <\/code>as QAT_DEFLATE<\/code> and rely on the software fallback provided by the Intel\u00ae<\/sup> ISA-L to perform the compression operation using the same format and encoding as provided by QAT devices.<\/p>\n\n\n\n
Intel\u00ae<\/sup> QuickAssist Technology Driver for Windows* (1.8.0-0010)<\/a>
Intel\u00ae<\/sup> QuickAssist Technology Driver for Windows release notes<\/a> <\/strong><\/p>\n\n\n\nSQL Server 2022 Edition support for Intel\u00ae<\/sup> QAT<\/h2>\n\n\n\n
SQL Server 2022 configuration for Intel\u00ae<\/sup> QAT for backup compression<\/h2>\n\n\n\n
Note<\/strong>: The HARDWARE_OFFLOAD<\/code> option requires a restart of the SQL Server instance to take effect.<\/p>\n\n\n\nQATzip<\/code><\/a>, which provides a number of features<\/a>. The QATzip software library is a user space software API that can interface with the QAT kernel driver API. It is used primarily by applications that are looking to accelerate the compression and decompression of files using one or more QAT devices.<\/p>\n\n\n\nQAT_DEFLATE<\/code><\/strong> algorithm.
Software compression or decompression using Intel\u00ae<\/sup> ISA-L still requires that the QATzip software library is installed and that HARDWARE_OFFLOAD server configuration has been enabled for QAT. This is because SQL Server loads the QATzip.dll<\/code> assembly provided by QATzip and it handles the fallback to Intel\u00ae<\/sup> ISA-L.
Additionally, software-based compression will be available for SQL Server 2022 Standard Edition allowing Standard Edition customers the ability to take advantage of software-based accelerators where SQL Server Enterprise Edition 2022 customers will have the extended capability of offloading backups to an external device.<\/p>\n\n\n\nEnabling Intel\u00ae<\/sup> QAT backup compression<\/h3>\n\n\n\n
ALTER SERVER CONFIGURATION
SET HARDWARE_OFFLOAD = ON (ACCELERATOR = QAT)<\/code><\/p>\n\n\n\nALTER SERVER CONFIGURATION
SET HARDWARE_OFFLOAD = OFF (ACCELERATOR = QAT)<\/code><\/p>\n\n\n\nHardware acceleration configuration and availability group replicas<\/h3>\n\n\n\n
Verifying Intel\u00ae<\/sup> QAT accelerator configuration<\/h3>\n\n\n\n
sys.dm_server_hardware_offload_config<\/h3>\n\n\n\n
Example:
SELECT * FROM sys.dm_server_hardware_offload_config<\/p>\n\n\n\n
<\/figure>\n\n\n\nsp_configure and the sys.configurations catalog view<\/h3>\n\n\n\n
sys.configurations<\/code> table.<\/p>\n\n\n\nBackup compression default<\/h2>\n\n\n\n
SELECT * FROM sys.configurations<\/code><\/p>\n\n\n\nWHERE name = 'backup compression default';<\/code><\/p>\n\n\n
<\/figure>\n\n\n\nEXEC sp_configure 'backup compression default', 1; <\/code><\/p>\n\n\n\nRECONFIGURE;<\/code><\/p>\n\n\n\nBackup compression algorithm<\/h2>\n\n\n\n
SELECT * FROM sys.configurations<\/code> <\/p>\n\n\n\nWHERE name = 'backup compression algorithm';<\/code><\/p>\n\n\n
<\/figure>\n\n\n\nBackup compression enabled<\/h3>\n\n\n\n
Creating a backup using QAT compression<\/h3>\n\n\n\n
BACKUP<\/code> command WITH COMPRESSION<\/code> has been extended to allow for a specified backup compression algorithm. When using Intel\u00ae<\/sup> QAT for backup compression acceleration, the algorithm QAT_DEFLATE<\/code> will initiate an Intel\u00ae<\/sup> QAT compressed backup if the drivers are available and the SQL Server configuration has been completed.<\/p>\n\n\n\nMS_EXPRESS<\/code> and will remain the default compression option.
The ALGORITHM <\/code>command will be used to specify either of these two algorithms (QAT_DEFLATE<\/code>, MS_EXPRESS<\/code>) for backup compression.<\/p>\n\n\n\nBACKUP DATABASE testdb TO DISK='D:\\Backups\\testdb.bak'
WITH COMPRESSION (ALGORITHM = QAT_DEFLATE);<\/code><\/p>\n\n\n\nBACKUP DATABASE testdb TO DISK='D:\\Backups\\testdb.bak'
WITH COMPRESSION (ALGORITHM = MS_XPRESS);<\/code><\/p>\n\n\n\nBACKUP DATABASE testdb TO DISK='D:\\Backups\\testdb.bak'
WITH COMPRESSION;<\/code><\/p>\n\n\n\nALGORITHM <\/code>option, allowing the options MS_XPRESS <\/code>(default) or QAT_DEFLATE <\/code>(Intel\u00ae<\/sup> QAT-based compression) in SQL Server 2022.<\/p>\n\n\n\n