Disaggregated Query Processing via Prefetching and Checkpoints
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Efficient and fault-tolerant query execution on disaggregated, transient, elastic compute clusters with data lakes faces challenges related to performance, financial cost, and reliability in existing technologies.
Innovation Solution
The implementation of Spark Native Execution (SNE) with Precise Parallel Prefetching (PPP) enables massively parallel processing by asynchronously prefetching data from shared storage, utilizing in-memory hash joins, and employing asynchronous intermittent checkpoints to maximize bandwidth and minimize latency, thereby optimizing query performance and fault tolerance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If data is stored in a data lake with disaggregated storage and compute, then storage capacity and flexibility are improved, but query execution performance and reliability deteriorate due to network latency and transient node failures
Solution Approach 1:
The system performs preliminary actions by prefetching data from the data lake to local memory before query execution begins. The query optimizer identifies required data blocks and initiates prefetching operations in advance, reducing the impact of network latency during actual query processing. This is achieved through the DataLakeSourceScan operator that asynchronously reads data into memory buffers before the compute nodes need to process them.
Solution Approach 2:
The system introduces an intermediary layer between the data lake and compute nodes through a distributed buffer pool and memory management subsystem. This intermediary buffers data in memory on compute nodes, decoupling the slow data lake access from the fast query processing. The buffer pool acts as a mediator that caches frequently accessed data blocks, reducing network I/O operations and improving query performance while maintaining the disaggregated architecture benefits.
2Productivity
If transient compute nodes are used for elastic scaling, then cost efficiency and resource utilization are improved, but fault tolerance and query reliability worsen due to node failures
Solution Approach 1:
The system implements beforehand cushioning through asynchronous intermittent checkpointing that periodically saves query execution state to the data lake before failures can occur. The checkpointing mechanism captures the state of data processing at intermediate points, allowing the query to resume from the last checkpoint rather than restarting from scratch. This cushions against transient node failures by pre-saving progress, maintaining reliability while using transient compute nodes for cost efficiency.
Solution Approach 2:
The system employs feedback mechanisms through the query optimizer that monitors data access patterns and dynamically adjusts data loading strategies. The optimizer receives feedback about data locality, access frequency, and node status to make real-time decisions about data prefetching and buffer allocation. This feedback loop enables the system to adapt to transient node conditions, redistributing workloads and adjusting resource allocation to maintain query reliability while maximizing utilization of transient compute resources.
3Speed
If data is prefetched from the data lake to improve query performance, then processing speed is improved, but network bandwidth consumption and storage costs increase
Solution Approach 1:
The system applies local quality by prefetching and caching only the specific data blocks required for each query operation, rather than indiscriminately caching all data. The DataLakeSourceScan operator and query optimizer work together to identify precisely which data blocks will be needed based on the query plan, prefetching only those blocks to local memory buffers. This selective prefetching approach improves query processing speed for required data while minimizing unnecessary network bandwidth consumption for data that won't be used.
Solution Approach 2:
The system implements partial action by prefetching data in controlled amounts based on query requirements rather than loading all available data. The buffer pool manages partial prefetching by allocating memory buffers proportional to the actual data access needs identified by the query optimizer. This prevents excessive network bandwidth consumption while still providing enough cached data to improve processing speed for the specific query at hand, avoiding the waste of loading more data than necessary.
Data Source
AI summary
Executing a query in a disaggregated cluster. A query is received at the disaggregated cluster. A query graph is created based on the query that identifies a hierarchy of vertices, where each vertex is associated with a set of data responsive to at least a portion of the query. The compute nodes process the query graph by first identifying all tables, files, and objects stored on the storage nodes whose access is required to retrieve data that satisfy the query. Next, the compute nodes selectively assign the identified tables, files, and objects to a leaf vertex of the query graph to optimize retrieving data from the storage nodes. Thereafter, the compute nodes process the retrieved data sets associated with each vertex using separate threads of execution for each vertex of the query graph such that leaf vertices are performed in parallel. The compute nodes then provide a result set.


