SlideShare a Scribd company logo
Date Tiered Compaction
Clara Xiong
▪Not a time-series system(row key is independent of time) but similar
read/write pattern.
▪Exponential data growth pushes disk IO to the limit.
▪Date tiered compaction partitions the storage by time.
▪Resulted in drastically lower latency and massive reduction of disk IO
consumption.
Why Date Tiered Compaction for Flurry?
▪ Inspired by Cassandra’s Date Tiered Compaction.
▪When new window appears, older windows get merged into
exponentially larger windows.
What is Date Tiered Compaction?
Base window = 1 hour, windows per tier = 4
From https://labs.spotify.com/2014/12/18/date-tiered-compaction/
▪Exponential sizing balances the tradeoffs between optimal scan
performance of recent data and total file count.
▪Out of range time windows will no longer be merged for efficient data
retention management
What is Date Tiered Compaction?
(cont’d)
▪Use maxTimestamp
for file selection to
favor late-arriving data.
▪Normalize timestamp
by the order of
sequence id.
▪Plugged-in per-
window compaction
policy to reduce
wasteful compaction.
File
Selection
A Date Tiered Layout in Production
0
50
100
150
200
250
300
350
400
450
File Size (20MB)
Window (Days)
▪HDFS Read Bytes ▪Mapper Run Time Minutes
Days After DTC Was On
0.00E+00
2.00E+14
4.00E+14
6.00E+14
8.00E+14
1.00E+15
1.20E+15
1.40E+15
1.60E+15
1.80E+15
2.00E+15
0 2 4 6 8 10 12
7-day job 1-day job
0
10
20
30
40
50
60
70
0 2 4 6 8 10 12
7-day job(avg) 7-day job(max)
1-day job(avg) 1-day job(max)
Reduction on HDFS IO (%) Notes
1-day look back job 79%
7-day look back job 97%
Minor Compaction 85% Still provisional
IO Reduction Summary
▪ Date Tiered Compactor (Duo Zhang @xiaomi)
● Outputs store files for given time boundaries.
● Allows us to split the data by window boundaries
▪ Date tiered major compaction
● Maintains tiered layout while processing deletes, updates and locality.
● Restores layout skewed by out-of-order writes, bulk load and etc.
▪ Window factory and Minor compaction for archiving (Duo Zhang)
Enhancements
▪What will benefit most?
●Most writes have cell timestamp near the write time and most reads are for limited recent data
out of the full data set
▪What will not?
●Random GET without a time range
●Frequent out of order data writes creating long tails, especially writes with future timestamps
●Frequent bulk load of heavily overlapping time-ranges
Is Date Tiered Compaction for You?
▪ Don’t turn it on cluster wide: Meta should not be on Date Tiered
Compaction. Limit all the related configuration changes by table
/column family
▪ Increase blocking file count and max compaction file count settings
generously
▪ Put in pressure aware compaction throughput throttler to limit the
impact of synchronized large minor compaction
Best Practice Recommendations
▪ Design specification
https://docs.google.com/document/d/1_AmlNb2N8Us1xICsTeGDLK
IqL6T-oHoRLZ323MG_uy8
▪ Email
claraxiong@yahoo-inc.com
Questions?

More Related Content

PPTX
Moving Beyond Lambda Architectures with Apache Kudu
PDF
Kubernetes超入門
PDF
Goの時刻に関するテスト
PDF
Building Data Lakes with Apache Airflow
PPTX
Apache Atlas: Why Big Data Management Requires Hierarchical Taxonomies
PDF
噛み砕いてKafka Streams #kafkajp
PPTX
Heroku connect 苦肉の四苦八苦
PPTX
Welcome to the Flink Community!
Moving Beyond Lambda Architectures with Apache Kudu
Kubernetes超入門
Goの時刻に関するテスト
Building Data Lakes with Apache Airflow
Apache Atlas: Why Big Data Management Requires Hierarchical Taxonomies
噛み砕いてKafka Streams #kafkajp
Heroku connect 苦肉の四苦八苦
Welcome to the Flink Community!

What's hot (20)

PDF
Apache kafka performance(latency)_benchmark_v0.3
PDF
How Apache Drives Music Recommendations At Spotify
PDF
Apache Storm
PPTX
Introduction to Kafka Streams Presentation
PDF
せっかくのOSSなんだし、ソースコード読むよね? 〜Apache Kafkaを例にしたOSSソースコードリーディングの基本〜 (Open Source C...
PDF
あなたの知らないPostgreSQL監視の世界
PDF
Ethernetの受信処理
PDF
第15回Solr勉強会 - Solr at Yahoo! JAPAN #SolrJP
PDF
Introduction To Flink
PDF
20220722 デジタル庁勉強会.pdf
PDF
Kubernetes on Azure ~Azureで便利にKubernetesを利用する~
PDF
ストリーム処理プラットフォームにおけるKafka導入事例 #kafkajp
PDF
Securing Kafka
PDF
Apache Kuduを使った分析システムの裏側
PDF
Apache Kafka Introduction
PPTX
Compression Options in Hadoop - A Tale of Tradeoffs
PPTX
Apache Kafka - Overview
PDF
At least onceってぶっちゃけ問題の先送りだったよね #kafkajp
PPTX
A visual introduction to Apache Kafka
ODP
Introduction to Kafka connect
Apache kafka performance(latency)_benchmark_v0.3
How Apache Drives Music Recommendations At Spotify
Apache Storm
Introduction to Kafka Streams Presentation
せっかくのOSSなんだし、ソースコード読むよね? 〜Apache Kafkaを例にしたOSSソースコードリーディングの基本〜 (Open Source C...
あなたの知らないPostgreSQL監視の世界
Ethernetの受信処理
第15回Solr勉強会 - Solr at Yahoo! JAPAN #SolrJP
Introduction To Flink
20220722 デジタル庁勉強会.pdf
Kubernetes on Azure ~Azureで便利にKubernetesを利用する~
ストリーム処理プラットフォームにおけるKafka導入事例 #kafkajp
Securing Kafka
Apache Kuduを使った分析システムの裏側
Apache Kafka Introduction
Compression Options in Hadoop - A Tale of Tradeoffs
Apache Kafka - Overview
At least onceってぶっちゃけ問題の先送りだったよね #kafkajp
A visual introduction to Apache Kafka
Introduction to Kafka connect
Ad

Similar to Date-tiered Compaction Policy for Time-series Data (10)

PPTX
Using Time Window Compaction Strategy For Time Series Workloads
PPTX
Balancing Compaction Principles and Practices
PDF
[Cassandra summit Tokyo, 2015] Cassandra 2015 最新情報 by ジョナサン・エリス(Jonathan Ellis)
PPTX
Manage your compactions before they manage you!
PPTX
How Incremental Compaction Reduces Your Storage Footprint
PDF
Datastax day 2016 : Cassandra data modeling basics
PPTX
Cassandra Summit 2015: Real World DTCS For Operators
PPTX
Apache HBase, Accelerated: In-Memory Flush and Compaction
PPTX
HBase Accelerated: In-Memory Flush and Compaction
PPTX
RocksDB compaction
Using Time Window Compaction Strategy For Time Series Workloads
Balancing Compaction Principles and Practices
[Cassandra summit Tokyo, 2015] Cassandra 2015 最新情報 by ジョナサン・エリス(Jonathan Ellis)
Manage your compactions before they manage you!
How Incremental Compaction Reduces Your Storage Footprint
Datastax day 2016 : Cassandra data modeling basics
Cassandra Summit 2015: Real World DTCS For Operators
Apache HBase, Accelerated: In-Memory Flush and Compaction
HBase Accelerated: In-Memory Flush and Compaction
RocksDB compaction
Ad

More from HBaseCon (20)

PDF
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
PDF
hbaseconasia2017: HBase on Beam
PDF
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
PDF
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
PDF
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
PDF
hbaseconasia2017: Apache HBase at Netease
PDF
hbaseconasia2017: HBase在Hulu的使用和实践
PDF
hbaseconasia2017: 基于HBase的企业级大数据平台
PDF
hbaseconasia2017: HBase at JD.com
PDF
hbaseconasia2017: Large scale data near-line loading method and architecture
PDF
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
PDF
hbaseconasia2017: HBase Practice At XiaoMi
PDF
hbaseconasia2017: hbase-2.0.0
PDF
HBaseCon2017 Democratizing HBase
PDF
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
PDF
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
PDF
HBaseCon2017 Transactions in HBase
PDF
HBaseCon2017 Highly-Available HBase
PDF
HBaseCon2017 Apache HBase at Didi
PDF
HBaseCon2017 gohbase: Pure Go HBase Client
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
hbaseconasia2017: HBase on Beam
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
hbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: HBase在Hulu的使用和实践
hbaseconasia2017: 基于HBase的企业级大数据平台
hbaseconasia2017: HBase at JD.com
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
hbaseconasia2017: HBase Practice At XiaoMi
hbaseconasia2017: hbase-2.0.0
HBaseCon2017 Democratizing HBase
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon2017 Transactions in HBase
HBaseCon2017 Highly-Available HBase
HBaseCon2017 Apache HBase at Didi
HBaseCon2017 gohbase: Pure Go HBase Client

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
System and Network Administration Chapter 2
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
AI in Product Development-omnex systems
PDF
medical staffing services at VALiNTRY
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPT
Introduction Database Management System for Course Database
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Introduction to Artificial Intelligence
PPTX
Odoo POS Development Services by CandidRoot Solutions
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Nekopoi APK 2025 free lastest update
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
System and Network Administration Chapter 2
Adobe Illustrator 28.6 Crack My Vision of Vector Design
CHAPTER 2 - PM Management and IT Context
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Understanding Forklifts - TECH EHS Solution
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
VVF-Customer-Presentation2025-Ver1.9.pptx
Operating system designcfffgfgggggggvggggggggg
AI in Product Development-omnex systems
medical staffing services at VALiNTRY
2025 Textile ERP Trends: SAP, Odoo & Oracle
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Introduction Database Management System for Course Database
ManageIQ - Sprint 268 Review - Slide Deck
Odoo Companies in India – Driving Business Transformation.pdf
Introduction to Artificial Intelligence
Odoo POS Development Services by CandidRoot Solutions

Date-tiered Compaction Policy for Time-series Data

  • 2. ▪Not a time-series system(row key is independent of time) but similar read/write pattern. ▪Exponential data growth pushes disk IO to the limit. ▪Date tiered compaction partitions the storage by time. ▪Resulted in drastically lower latency and massive reduction of disk IO consumption. Why Date Tiered Compaction for Flurry?
  • 3. ▪ Inspired by Cassandra’s Date Tiered Compaction. ▪When new window appears, older windows get merged into exponentially larger windows. What is Date Tiered Compaction? Base window = 1 hour, windows per tier = 4 From https://labs.spotify.com/2014/12/18/date-tiered-compaction/
  • 4. ▪Exponential sizing balances the tradeoffs between optimal scan performance of recent data and total file count. ▪Out of range time windows will no longer be merged for efficient data retention management What is Date Tiered Compaction? (cont’d)
  • 5. ▪Use maxTimestamp for file selection to favor late-arriving data. ▪Normalize timestamp by the order of sequence id. ▪Plugged-in per- window compaction policy to reduce wasteful compaction. File Selection
  • 6. A Date Tiered Layout in Production 0 50 100 150 200 250 300 350 400 450 File Size (20MB) Window (Days)
  • 7. ▪HDFS Read Bytes ▪Mapper Run Time Minutes Days After DTC Was On 0.00E+00 2.00E+14 4.00E+14 6.00E+14 8.00E+14 1.00E+15 1.20E+15 1.40E+15 1.60E+15 1.80E+15 2.00E+15 0 2 4 6 8 10 12 7-day job 1-day job 0 10 20 30 40 50 60 70 0 2 4 6 8 10 12 7-day job(avg) 7-day job(max) 1-day job(avg) 1-day job(max)
  • 8. Reduction on HDFS IO (%) Notes 1-day look back job 79% 7-day look back job 97% Minor Compaction 85% Still provisional IO Reduction Summary
  • 9. ▪ Date Tiered Compactor (Duo Zhang @xiaomi) ● Outputs store files for given time boundaries. ● Allows us to split the data by window boundaries ▪ Date tiered major compaction ● Maintains tiered layout while processing deletes, updates and locality. ● Restores layout skewed by out-of-order writes, bulk load and etc. ▪ Window factory and Minor compaction for archiving (Duo Zhang) Enhancements
  • 10. ▪What will benefit most? ●Most writes have cell timestamp near the write time and most reads are for limited recent data out of the full data set ▪What will not? ●Random GET without a time range ●Frequent out of order data writes creating long tails, especially writes with future timestamps ●Frequent bulk load of heavily overlapping time-ranges Is Date Tiered Compaction for You?
  • 11. ▪ Don’t turn it on cluster wide: Meta should not be on Date Tiered Compaction. Limit all the related configuration changes by table /column family ▪ Increase blocking file count and max compaction file count settings generously ▪ Put in pressure aware compaction throughput throttler to limit the impact of synchronized large minor compaction Best Practice Recommendations