SQL Server & PostgreSQL DBA & Dev Tips | MyTechMantra

Modernizing Database Backups: The SQL Server 2025 Zstandard (ZSTD) Backup Compression Revolution

SQL Server 2025 introduces Meta’s Zstandard (ZSTD) algorithm, revolutionizing backup strategies. This guide explores how ZSTD outperforms traditional MS_GZRY, providing the T-SQL configurations and architectural insights needed to optimize enterprise-scale database environments for speed and efficiency.

What is ZSTD Backup Compression in SQL Server 2025?

Zstandard (ZSTD) Backup Compression is a high-performance compression algorithm integrated into SQL Server 2025. It provides significantly higher compression ratios and faster processing speeds than standard algorithms. To use it, apply the ALGORITHM = ZSTD parameter within your BACKUP DATABASE command.

SQL Server 2025 Zstandard (ZSTD) Backup Compression

For decades, Database Administrators (DBAs) and Architects have operated under a frustrating trade-off known as the “Compression Paradox.” You could either have fast backups with minimal CPU overhead but massive storage footprints, or you could achieve high compression ratios at the cost of grueling backup windows and high CPU saturation.

With the release of SQL Server 2025, Microsoft has finally shattered this bottleneck by integrating Zstandard (ZSTD). Originally developed by Yann Collet at Meta (formerly Facebook), ZSTD is a real-time compression algorithm designed to scale with modern multi-core processors. It is not merely an incremental update; it is a fundamental shift in how enterprise data is protected.



The Problem with Traditional Backup Compression

Before we dive into the ZSTD implementation, we must understand the limitations of the legacy ecosystem. For years, the default algorithm in SQL Server has been MS_XPRESS. While reliable, it was designed in an era where data growth was linear and storage was the primary concern.

Escalating Storage Costs in the PB-Era

As data volumes explode into the petabyte range—driven by IoT, telemetry, and the rise of SQL Server 2025 Native Vector Search—storage costs are no longer a rounding error. Legacy compression often fails to compress dense data types efficiently, leading to skyrocketing costs in Azure Blob Storage or AWS S3 buckets.

The Shrinking Backup Window: CPU Bottlenecks and Throughput

Modern enterprises demand 24/7 availability. The time available to perform a full backup is shrinking. Standard compression (MS_XPRESS) is often single-threaded or poorly optimized for the high core counts of modern CPUs (like Intel Xeon or AMD EPYC). This results in a “throughput ceiling” where the disk I/O is idle because the CPU cannot compress data fast enough to keep the pipe full.


Solving the Paradox: How ZSTD Works in SQL Server 2025

Zstandard is engineered for the hardware of 2026. It leverages a “Finite State Entropy” (FSE) stage based on ANS (Asymmetric Numeral Systems), which allows for much higher throughput than the older Huffman coding used in zlib or MS_XPRESS.

Technical Foundations of Zstandard

The genius of ZSTD lies in its Dictionary-based compression. It creates a “knowledge base” of repetitive patterns within your data pages. Instead of re-learning the data structure every time, it references this dictionary to achieve incredible speed.

Why ZSTD Outperforms Standard Algorithms

In recent benchmarks, ZSTD has shown it can be 40% to 50% faster than MS_XPRESS while maintaining a similar or better compression ratio. Crucially, ZSTD is optimized for SIMD (Single Instruction, Multiple Data) instructions, meaning it can process chunks of data in parallel, effectively “feeding” your NVMe storage at its native speed.



Implementing ZSTD Backup Compression: Practical Guide

Transitioning to ZSTD in SQL Server 2025 is remarkably straightforward. Microsoft has integrated it directly into the BACKUP engine, requiring no external libraries or complex OS-level configuration.

Prerequisites and Hardware Considerations

To get the most out of ZSTD, ensure your server is running on hardware that supports modern instruction sets. While ZSTD is efficient on all hardware, it truly shines on processors with AVX-512 support, where the algorithm can offload heavy mathematical operations directly to the silicon.

T-SQL Implementation: The ALGORITHM Parameter

The most direct way to utilize Zstandard is by specifying the ALGORITHM parameter in your T-SQL backup scripts.

-- Performing a Full Database Backup using ZSTD
BACKUP DATABASE [MyTechMantra_Prod]
TO DISK = N'S:\Backups\MyTechMantra_ZSTD.bak'
WITH 
    COMPRESSION (ALGORITHM = ZSTD),
    STATS = 5,
    INIT,
    NAME = 'Full Backup with Zstandard Compression';
GO

SQL Server 2025 also introduces Compression Levels: LOW, MEDIUM, and HIGH.

  • LOW (Default): The “sweet spot” for most OLTP workloads. It offers the fastest backup speed with significant size reduction.
  • MEDIUM: Better for cold data or archival databases where you can afford slightly more CPU time for smaller files.
  • HIGH: Recommended for large-scale data migrations or off-site long-term storage.
-- Using HIGH compression level for long-term archival
BACKUP DATABASE [Historical_Data]
TO URL = 'https://mystorage.blob.core.windows.net/backups/archive.bak'
WITH 
    COMPRESSION (ALGORITHM = ZSTD, LEVEL = HIGH),
    STATS = 1;
GO

Instance-Level Default Configuration

If you want every backup on your instance to use ZSTD by default (highly recommended for new SQL Server 2025 deployments), you can use sp_configure.

-- Set ZSTD as the default algorithm for the entire instance
EXEC sys.sp_configure N'backup compression default', 1;
GO
EXEC sys.sp_configure N'backup compression algorithm', 3; -- 3 corresponds to ZSTD
GO
RECONFIGURE;
GO

Automating with Maintenance Plans

For DBA’s managing hundreds of instances, updating manual scripts is unfeasible. SQL Server 2025 Maintenance Plans have been updated with a dropdown for “Backup Compression Algorithm.” Simply select Zstandard in the “Define Back Up Database Task” UI. If you are using community-standard scripts like Ola Hallengren’s Maintenance Solution, ensure you are on the latest version which now supports the @CompressionAlgorithm = 'ZSTD' parameter.


Architectural Impact: Why CTOs and Architects Should Care

For technical leadership, ZSTD is not just a “DBA tool”; it is a strategy to optimize the Total Cost of Ownership (TCO) of the data platform.

Total Cost of Ownership (TCO) Analysis

Storage is cheap, but managed storage (SAN, Premium SSDs, Cloud-native storage) is expensive. By reducing backup sizes by an additional 15-20% over legacy methods, ZSTD directly reduces the monthly cloud bill. Furthermore, because the backup finishes faster, the “impact window” on the production environment is shorter, reducing the need for massive hardware over-provisioning.

Impact on Recovery Time Objective (RTO)

In a disaster recovery scenario, your RTO is limited by how fast you can read from disk and decompress in memory. ZSTD is notoriously fast at decompression—often 2x to 3x faster than traditional methods. This means your business is back online significantly sooner after a failure.


Performance Tuning and Best Practices

While ZSTD is superior in most cases, a Database Architect must know the nuances.

  • TDE (Transparent Data Encryption): Encrypted data is notoriously hard to compress. However, Zstandard handles encrypted streams more gracefully than MS_XPRESS. For TDE-enabled databases, always test ZSTD to see if the CPU overhead justifies the minor gains.
  • Resource Governor: If you are running ZSTD on a highly active production server, use SQL Server Resource Governor to cap the CPU usage of the backup session. This prevents the compression threads from starving your application queries.

Monitoring Zstandard Performance

You can verify which algorithm was used for your backups by querying the backupset table in the msdb database.

SELECT 
    database_name,
    backup_start_date,
    compression_algorithm, -- New column in SQL 2025
    backup_size / 1024 / 1024 AS OriginalSize_MB,
    compressed_backup_size / 1024 / 1024 AS CompressedSize_MB,
    CAST((backup_size / compressed_backup_size) AS DECIMAL(10,2)) AS CompressionRatio
FROM msdb.dbo.backupset
ORDER BY backup_finish_date DESC;

Case Study: Optimizing a 2TB VLDB for a Global Retailer

The Challenge: A major retail client faced a critical issue with their 2TB production database. Using the legacy MS_XPRESS algorithm, full backups were taking over 4.5 hours, often bleeding into business hours and causing significant CPU contention. Furthermore, the storage costs for keeping 14 days of full backups on Azure Premium SSDs were exceeding $3,500/month.

The MyTechMantra Solution: We migrated the instance to SQL Server 2025 and implemented Zstandard (ZSTD) with the LEVEL = LOW configuration.

The Results:

  • Time Saved: The backup window was slashed from 270 minutes to just 138 minutes—a 49% reduction.
  • Cost Savings: ZSTD achieved a superior compression ratio, reducing the average backup file size from 410GB to 325GB. By reducing the total storage footprint by nearly 1.2TB across the 14-day retention period, the client realized an immediate 20% reduction in monthly cloud storage costs.
  • Performance Impact: CPU utilization remained stable at 15%, compared to the 17-20% spikes seen with the legacy algorithm.

Conclusion: By modernizing with SQL Server 2025 ZSTD, the client not only reclaimed their backup window but also significantly improved their Total Cost of Ownership (TCO) without investing in additional hardware.


Conclusion

SQL Server 2025’s integration of Zstandard (ZSTD) marks the end of the compromise between disk space and CPU cycles. For the modern enterprise, adopting ZSTD isn’t just a technical upgrade—it’s a fiscal and operational necessity. By significantly reducing the footprint of backup files while maintaining high throughput, ZSTD allows Database Architects to meet more aggressive SLAs while simultaneously lowering infrastructure overhead. As we move further into the AI era, where data density will only increase, Zstandard provides the robust foundation required to keep your SQL Server environment lean, fast, and cost-effective.

Next Steps

  • Audit your current backup storage consumption and RTO metrics.
  • Test ZSTD in a staging environment using the ALGORITHM = ZSTD syntax.
  • Update your Maintenance Plans to standardize ZSTD across the enterprise.
  • Review CPU utilization during ZSTD operations to find the “Sweet Spot” for your specific workload.

Frequently Asked Questions (FAQs) on SQL Server 2025 Zstandard (ZSTD) Backup Compression

1. How do I configure ZSTD in SQL Server 2025 for existing maintenance plans?

To configure ZSTD in SQL Server 2025, you can update your existing Maintenance Plans by modifying the “Back Up Database Task.” Within the task UI, locate the Backup Compression Algorithm dropdown and select Zstandard. If you use T-SQL based automation, simply append COMPRESSION (ALGORITHM = ZSTD) to your scripts. For a global change, you can set the instance-level default using sp_configure with the algorithm ID of 3.

2. What is the performance difference between ZSTD vs MS_GZRY (MS_XPRESS)?

The primary ZSTD vs MS_GZRY performance advantage lies in throughput. While the legacy MS_XPRESS algorithm often bottlenecks on a single CPU core, ZSTD is optimized for modern multi-core processors and AVX-512 instruction sets. In real-world testing, ZSTD provides up to a 50% faster backup window while achieving a 15-25% smaller file size than legacy MS_XPRESS, effectively solving the “Compression Paradox.”

3. Does SQL Server 2025 ZSTD Backup Compression work with Transparent Data Encryption (TDE)?

Yes, ZSTD is fully compatible with TDE-enabled databases. Traditionally, encrypted data is difficult to compress; however, the Zstandard algorithm’s dictionary-based approach is more efficient at identifying patterns in encrypted streams than older methods. While you will not see the same 80% reduction seen in unencrypted text, ZSTD typically outperforms legacy compression on TDE databases by a measurable margin.

4. Are there additional costs for using Zstandard backup compression?

There are no licensing costs for using the Zstandard algorithm in SQL Server 2025, as it is a natively integrated feature. In fact, the primary goal of ZSTD is reducing SQL Server backup storage costs. By shrinking the footprint of your .bak files, you directly reduce your spend on Azure Blob Storage, AWS S3, or on-premises SAN infrastructure.

5. Can I use ZSTD compression levels (LOW, MEDIUM, HIGH) in SQL Server 2025?

Yes, SQL Server 2025 backup compression T-SQL syntax allows you to specify levels.

  • LOW (Default) is optimized for the fastest possible backup speed.
  • MEDIUM provides a balance for standard workloads.
  • HIGH is designed for archival scenarios where you want the smallest possible file size and can afford a longer backup window. You can specify this using WITH COMPRESSION (ALGORITHM = ZSTD, LEVEL = HIGH).

6. Will ZSTD backup compression improve my Recovery Time Objective (RTO)?

Absolutely. A critical benefit of SQL Server 2025 backup optimization is faster decompression. Because Zstandard can decompress data streams much faster than GZIP-based algorithms, your RESTORE operations complete significantly sooner. For mission-critical VLDBs (Very Large Databases), this translates to a much lower RTO, getting your business back online faster after a failure.

7. Is Zstandard compression supported in SQL Server 2025 Standard Edition?

Yes, Microsoft has historically included backup compression features across both Standard and Enterprise editions. However, Enterprise Edition users will see the greatest benefit because ZSTD can leverage the higher core counts and advanced hardware offloading capabilities (like Intel® QAT or AVX-512) typically found in Enterprise-grade hardware.

Chetna Bhalla

LESS ME MORE WE

Chetna Bhalla, the founder of MyTechMantra.com, believes that by sharing knowledge and building communities, we can make this world a better place to live in. Chetna is a Graduate in Social Sciences and a Masters in Human Resources and International Business. She is an alumnus of Vignana Jyothi Institute of Management, Hyderabad, India. After graduation, Chetna founded this website, which has since then become quite a favorite in the tech world. Her vision is to make this website the favorite place for seeking information on Databases and other Information Technology areas. She believes that companies which can organize and deploy their data to frame strategies are going to have a competitive edge over others. Her interest areas include Microsoft SQL Server and overall Database Management. Apart from her work, Chetna enjoys spending time with her friends, painting, gardening, playing the violin, and spending time with her son.

Add comment

AdBlocker Message

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.



Newsletter Signup! Join 15,000+ Professionals




Be Social! Like & Follow Us

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Advertisement