Introduction
Lossless data compression is a critical component in high-performance computing (HPC) environments, serving as a primary defense against storage and I/O bottlenecks. Among compression algorithms, the Lempel-Ziv-Storer-Szymanski (LZSS) scheme—the foundation for standards like Deflate and Zip—is highly effective but notoriously difficult to parallelize. Its sequential nature, where the start of a match depends on the processing of previous data, often leads to significant performance degradation on parallel architectures like GPUs.
gpuLZ is a high-performance framework designed to bring LZSS to modern GPUs, specifically optimized for multi-byte data such as 16-bit integers or 32-bit floats. By migrating the entire encoding pipeline to the GPU and introducing multi-byte-aware pattern matching, gpuLZ achieves up to a 272x speedup over previous state-of-the-art GPU compressors while simultaneously improving compression ratios.
The Challenges of GPU Compression
Existing GPU implementations, such as CULZSS, face two primary hurdles:
- The Multi-byte Mismatch: Most compressors treat data as a stream of single bytes. For scientific data consisting of 4-byte floats, byte-oriented searches often find "garbage" matches across data boundaries or miss significant patterns entirely.
- The CPU Bottleneck: Many tools perform pattern matching on the GPU but offload the final encoding step to the CPU. The resulting data transfer (Host-to-Device and Device-to-Host) often consumes more time than the actual compression process.
Methods: An End-to-End GPU Pipeline
gpuLZ addresses these challenges through a redesigned architectural workflow that eliminates CPU-GPU data movement. The framework performs matching, prefix sums, and encoding entirely on the GPU across three specialized kernels.
Key Algorithmic Innovations
- Two-Pass Prefix Sum with Kernel Fusion: Because compressed chunks have variable sizes, gpuLZ uses a two-pass prefix sum. The matching and local prefix sum steps are fused into a single kernel to keep data in fast shared memory, avoiding high-latency global memory access.
- Multi-byte Pattern Matching: gpuLZ adaptively selects a symbol length ($S$) and sliding window size ($W$) based on the data type. This reduces computational complexity and allows the algorithm to identify longer repeated sequences in scientific datasets.
- Memory Tuning: The authors implemented a data partitioning strategy that balances shared memory usage with L1 cache availability. This prevents "starving" the cache, which can otherwise slow down the matching process.
Key Insights
Multi-byte Awareness as a Compression Win
Treating data as multi-byte symbols is more than a performance optimization; it is a fundamental improvement to the compression ratio. For scientific datasets, matching on the actual data type (e.g., 2-byte units for uint16) aligns with the underlying data structure, leading to higher-quality matches.
Eliminating the Encoding Bottleneck
The most significant speedups in gpuLZ stem from removing the CPU from the loop. By parallelizing the encoding step at the thread-block level, the framework avoids the massive overhead of copying intermediate match data back to the host.
Evaluation and Results
The framework was evaluated on six representative multi-byte datasets from the TPC-H (business) and SDRBench (scientific) benchmarks, including 16-bit integers from cosmology simulations and 32-bit floats from seismic imaging.
- Performance: On an NVIDIA A4000, gpuLZ outperformed CULZSS by up to 272.1x. It also demonstrated higher throughput than the closed-source nvCOMP LZ4 on several scientific datasets.
- Compression Ratio: By utilizing multi-byte symbols, gpuLZ improved compression ratios by up to 1.4x compared to byte-oriented solutions.
- Throughput: The system achieved an average decompression throughput of 29.1 GB/s on an NVIDIA A100, making it suitable for real-time I/O pipelines.
- Integration: When integrated into the cuSZ lossy compressor, gpuLZ improved the compression ratio by 1.9x to 8.7x by effectively capturing spatial redundancy in quantization codes.
Conclusion and Future Work
gpuLZ demonstrates that LZSS can be highly efficient on GPUs when the pipeline is fully offloaded and the algorithm is made aware of the data's underlying type. Future work will focus on developing analytical models to automatically select optimal symbol lengths and window sizes, as well as integrating gpuLZ into distributed systems for massive inter-node communication tasks.
Summary updated