TL;DR
Traditional database benchmarks like TPC-H/DS are increasingly out of sync with modern cloud data warehouse workloads, failing to capture crucial aspects like frequent updates, variable query patterns, and long-tailed distributions. This paper analyzes real-world Amazon Redshift telemetry to reveal these discrepancies, highlighting opportunities for more realistic benchmarks and improved database system design.
What Problem Does This Paper Address?
For decades, benchmarks like TPC-H and TPC-DS have been the gold standard for evaluating analytical database systems. These benchmarks simulate decision support workloads, focusing heavily on query engine performance. However, the landscape of data warehousing has dramatically shifted with the advent of cloud computing. Modern cloud data warehouses are no longer static, closed systems but elastic, multi-tenant platforms serving a diverse range of workloads, from data science and ETL to machine learning. The authors argue that the twenty-year-old TPC benchmarks, with their fixed query sets and read-mostly focus, fail to represent the dynamic, write-heavy, and highly variable nature of these contemporary cloud workloads. This disconnect leads to benchmarks that may not accurately reflect how well a database system will perform in a real-world cloud environment, potentially misguiding research and development priorities.
Methods
The core of this research relies on analyzing telemetry data from a large fleet of Amazon Redshift clusters. This data provides insights into actual customer query patterns, workload characteristics, and data usage. The authors compare these real-world observations against the TPC-H and TPC-DS benchmarks across several dimensions:
- Query Types and Runtimes: Analyzing the frequency and duration of different query operations (e.g., SELECT, INSERT, UPDATE, CTAS) to understand the balance between read and write operations.
- Workload Patterns: Investigating daily and hourly query elasticity (spikiness) to understand how workloads fluctuate over time.
- Query Complexity: Examining SQL statement length and query plan operator usage to gauge complexity.
- Repetitiveness: Quantifying how often queries, filters, and query templates repeat within a cluster.
- Data Characteristics: Analyzing column data types, table sizes, and data distribution (skew, uniqueness) to understand how real-world data differs from benchmark data.
- External Storage: Examining the formats of data stored externally (e.g., S3).
The paper also details experiments conducted on a dedicated TPC-H/DS cluster to provide a direct comparison point.
Datasets
- Amazon Redshift Fleet Telemetry: The primary dataset used for analysis, comprising anonymized telemetry data from a large number of Amazon Redshift clusters over a specific period.
- Redset Dataset: A newly introduced, publicly available dataset containing anonymized query statistics from 200 randomly selected Redshift serverless and provisioned instances over a three-month period. This dataset aims to facilitate further research into realistic cloud data warehouse workloads.
- TPC-H and TPC-DS: Used as traditional benchmarks for comparison. Experiments were conducted on a 3 TB scale factor cluster for both.
Key Insights and Ideas
- Write-Heavy Reality: Contrary to the read-mostly assumption of TPC benchmarks, real-world Redshift workloads are significantly write-heavy, with update operations consuming a substantial portion of query runtime.
- The Long Tail is Real: Distributions across nearly all metrics (query runtime, SQL length, data skew, workload spikiness) exhibit long, heavy tails. This means a small percentage of queries or data characteristics can dominate resource usage or present significant challenges, a phenomenon poorly captured by benchmarks with narrow distributions.
- Query Repetition is Pervasive: A surprisingly high rate of query repetition (up to 80% of queries repeating in 50% of clusters) is observed. This presents a massive opportunity for result caching and materialized views, which are not effectively tested by single-run benchmarks.
- Workload Elasticity is Crucial: Cloud data warehouses experience significant daily and hourly fluctuations in load (spikiness). Benchmarks that assume constant load fail to stress-test the elasticity and auto-scaling capabilities essential for cloud environments.
- Data Diversity Matters: Real-world data exhibits more skew and a wider variety of data types (e.g., timestamps, JSON) compared to the more uniform and limited data types in TPC benchmarks. This impacts query optimization and storage strategies.
- External Data Formats: While optimized formats like Parquet exist, CSV and JSON remain dominant for external data sources due to ease of use, highlighting the need for efficient parsing of these formats.
Key Results
- Query Mix: Approximately 40% of Redshift queries are read/write, with updates accounting for a significant portion of runtime, unlike TPC-H/DS where read-only queries dominate (≈90% of time).
- Query Repetition: In 50% of database clusters, 80% of queries are repetitions of previously seen queries.
- Workload Spikiness: While daily workloads are generally stable with predictable weekend dips, hourly loads can be highly spiky within individual clusters.
- Query Text Length: Customer queries are significantly longer than benchmark queries, with some exceeding 16 MB of SQL code.
- Data Skew: Real-world data exhibits more skew than TPC-H/DS, with a higher fraction of rows occupied by common values and more columns with high null fractions.
- Cache Hit Rate: Redshift's result cache has a hit rate of approximately 20%, with significant opportunities for improvement due to query repetition.
Limitations and Future Work
- Privacy Constraints: Direct access to customer query content is restricted by privacy regulations, limiting the depth of analysis for certain aspects.
- Benchmark Realism: The paper strongly advocates for new benchmarks that better reflect the observed workload characteristics, including write operations, elasticity, and long-tailed distributions. The authors suggest a benchmark generator capable of instantiating scenarios across different points in observed distributions.
- Caching Improvements: Future work should investigate how writes interact with repeating queries and explore more advanced caching strategies beyond simple LRU, especially given the short intervals between some repeating queries.
- Data Type Analysis: Further investigation into the nature of variable-length strings and their potential misuses as data types is suggested.
- Dataset Expansion: The authors plan to refresh and expand the Redset dataset with more features to encourage further research.
Summary updated