TL;DR
Alibaba Cloud introduces AnalyticDB-PG (ADB-PG), a cloud-native data warehouse designed to tackle the growing demands of hybrid transactional and analytical processing (HTAP) workloads. It achieves this through a unified architecture supporting both shared-nothing and shared-storage modes, a novel hybrid storage engine (Beam), and an optimized execution engine (Laser) that leverages vectorized processing and JIT compilation.
What Problem Does This Paper Address?
Modern data warehouses face a significant challenge in efficiently handling the explosion of data and the increasing need for both real-time transactional updates and complex analytical queries (HTAP workloads). Traditional architectures have inherent trade-offs: shared-nothing offers high query performance but suffers from high storage costs and limited elasticity, while shared-storage provides elasticity but often struggles with query efficiency due to I/O overhead and indexing limitations. Existing execution engines also lack optimized support for vectorized processing and real-time analytics, hindering their ability to scale effectively. ADB-PG aims to bridge this gap by offering a unified, high-performance, and cost-effective solution for cloud-native HTAP workloads.
Methods
ADB-PG's core innovations lie in its architecture and its key components:
- Unified Architecture: It supports both Shared-Nothing (SNM) and Shared-Storage (SSM) modes, allowing for flexible deployment and seamless elasticity. This means users can choose the best fit for their needs, whether it's on-premises compliance (SNM) or cloud-native scalability (SSM).
- Beam: Hybrid Storage Engine: This engine dynamically balances row-based storage (for efficient real-time writes) and columnar storage (for fast analytical reads). It uses a "delta" (row-based) and "primary" (columnar) data structure, with delta data periodically flushed to the primary. This approach aims to provide the best of both worlds for HTAP.
- Laser: Execution Engine: This engine is designed for high-performance query processing. It features:
- Vectorized Execution: Processes data in batches using columnar memory layouts, leveraging CPU SIMD instructions for speed.
- JIT Compilation: Compiles parts of queries at runtime for further optimization, especially for complex expressions.
- Adaptive Hybrid Approach: Dynamically chooses between vectorized execution and JIT compilation for different query fragments based on runtime analysis, optimizing for performance and cost.
- Runtime Filter and Dictionary Encoding: These are advanced optimizations to further boost query performance, especially for join operations and low-cardinality string data.
Datasets
The paper evaluates ADB-PG using standard industry benchmarks:
- TPC-H: A widely used benchmark for decision support systems, used to evaluate write performance, range query performance, and overall query execution times.
- TPC-DS: Another industry-standard benchmark for decision support systems, used to evaluate dictionary encoding and runtime filter performance.
- CH-BenCHmark: Used to evaluate ADB-PG's performance on mixed transactional and analytical workloads.
Key Insights and Ideas
- The "Best of Both Worlds" for Storage: The Beam engine's hybrid approach is a crucial innovation. By intelligently separating real-time "delta" data into row format and historical "primary" data into columnar format, it avoids the typical trade-offs of pure row or column stores.
- Adaptive Execution is Key: Laser's ability to dynamically switch between vectorized execution and JIT compilation based on the specific query fragment and data characteristics is a significant advancement. This avoids the "one-size-fits-all" limitations of other engines.
- Unified Architecture for Flexibility: Offering both SNM and SSM in a single system provides immense flexibility for diverse customer needs, from strict on-premises requirements to cloud-native elasticity.
- Cost-Effectiveness through Optimization: The paper strongly emphasizes that performance gains translate directly to cost savings, especially in cloud environments. Features like dictionary encoding and optimized storage reduce resource consumption.
Key Results
- Significant Performance Improvements: ADB-PG demonstrates substantial performance gains over existing solutions on TPC-H and TPC-DS benchmarks, often achieving significant speedups in query execution.
- Cost Reduction: The SSM architecture, in particular, shows an order of magnitude reduction in monetary costs compared to SNM, primarily due to better resource utilization and the use of cost-effective object storage.
- Efficient HTAP Handling: Beam's hybrid storage engine shows strong performance in both batch writes and range queries, outperforming traditional row and columnar stores in various scenarios.
- Resilience: The system demonstrates stable operation and automatic failover capabilities, maintaining throughput even when worker nodes fail.
Limitations and Future Work
- JIT Compilation Overhead: While JIT compilation offers benefits for complex expressions, the paper acknowledges that it can introduce compilation overhead, potentially impacting performance for small datasets or complex computations.
- Adaptive Runtime Filter Size: The paper highlights the importance of adaptive runtime filter sizing to prevent performance degradation due to estimation errors, suggesting ongoing work in this area.
- Further Optimization of Mixed Workloads: While CH-BenCHmark results show balanced performance, the paper implies that further tuning for highly concurrent mixed workloads could be explored.
- AI/ML Integration: The paper briefly mentions the integration with AI model services for enhanced analytics but states this is not the focus of the current work, suggesting future research directions.
Summary updated