skip to main content
10.1145/3583780.3614944acmconferencesArticle/Chapter ViewAbstractPublication PagescikmConference Proceedingsconference-collections
research-article

Khronos: A Real-Time Indexing Framework for Time Series Databases on Large-Scale Performance Monitoring Systems

Published: 21 October 2023 Publication History

Abstract

Time series databases play a critical role in large-scale performance monitoring systems. Metrics are required to be observable immediately after being generated to support real-time analysis. However, the commonly used Log-Structured Merge-Tree structure suffers from periodically visible delay spikes when a new segment is created due to the instantaneous index construction pressure.
In this paper, we present Khronos, an asynchronous indexing framework tailored for high-cardinal monitoring data, aiming at reducing the visible delay. Firstly, we analyze the temporal locality nature of time series and propose a complementary index construction algorithm by only indexing series not reported before to relieve indexing workload. Secondly, we design index structures based on Minimum Excluded value function to effectively reuse indexes of previous segments. Thirdly, we take advantage of the non-repetitive feature of complementary indexes and further develop an intermediate query results reusing approach for deduplicating index traversal among segments. Moreover, we propose an index dependency management strategy that cuts off the previous reusing dependency before persistence to avoid extended dependency overhead.
Experimental results show that our framework significantly reduces the visible delay from minutes to milliseconds. Khronos outperforms the state-of-the-art databases InfluxDB and TimeScaleDB with at least 4 times higher write throughput, hundreds of times lower visible delay, and 6 times lower query latency. Khronos has been deployed in production since 2020 and has become the largest performance monitoring database in Alibaba.

Supplementary Material

MP4 File (1268-video.mp4)
Presentation video

References

[1]
2022. FAQ - VictoriaMetrics. https://docs.victoriametrics.com/FAQ.html
[2]
2022. InfluxDB: Open Source Time Series Database. https://www.influxdata.com
[3]
2022. Mex (mathematics). https://en.wikipedia.org/wiki/Mex_(mathematics)
[4]
2022. Prometheus-Monitoring system & time series database. https://prometheus.io
[5]
2022. Time Series Benchmark Suite (TSBS). https://github.com/timescale/tsbs#%23devops--cpu-only/
[6]
2022. Timescale: Time-series data simplified. https://www.timescale.com
[7]
2022. timescaledb-tune. https://github.com/timescale/timescaledb-tune
[8]
Colin Adams, Luis Alonso, Benjamin Atkin, John Banning, Sumeer Bhola, Rick Buskens, Ming Chen, Xi Chen, Yoo Chung, Qin Jia, Nick Sakharov, George Talbot, Nick Taylor, and Adam Tart. 2020. Monarch: Google's Planet-Scale In-Memory Time Series Database. Proc. VLDB Endow. 13, 12 (2020), 3181--3194.
[9]
Michael P. Andersen and David E. Culler. 2016. BTrDB: Optimizing Storage System Design for Timeseries Processing. In Proc. FAST. USENIX Association, 39--52.
[10]
Diego Arroyuelo, Senén González, Mauricio Oyarzún, and Victor Sepulveda. 2013. Document identifier reassignment and run-length-compressed inverted indexes for improved search performance. In Proc. SIGIR. ACM, 173--182.
[11]
Xiao Bai and Flavio Paiva Junqueira. 2012. Online result cache invalidation for real-time web search. In Proc. SIGIR. ACM, 641--650.
[12]
Oana Balmau, Florin Dinu, Willy Zwaenepoel, Karan Gupta, Ravishankar Chandhiramoorthi, and Diego Didona. 2018. SILK Preventing Latency Spikes in Log-Structured Merge Key-Value Stores Running Heterogeneous Workloads. ACM Trans. Comput. Syst. 36, 4 (2018), 12:1--12:27.
[13]
Oana Balmau, Florin Dinu, Willy Zwaenepoel, Karan Gupta, Ravishankar Chandhiramoorthi, and Diego Didona. 2019. SILK: Preventing Latency Spikes in Log- Structured Merge Key-Value Stores. In Proc. USENIX ATC. USENIX Association, 753--766.
[14]
Xavier Baril, Oihana Coustié, Josiane Mothe, and Olivier Teste. 2020. Application Performance Anomaly Detection with LSTM on Temporal Irregularities in Logs. In Proc. CIKM. ACM, 1961--1964.
[15]
Wei Cao, Yusong Gao, Feifei Li, Sheng Wang, Bingchen Lin, Ke Xu, Xiaojie Feng, Yucong Wang, Zhenjun Liu, and Gejin Zhang. 2020. Timon: A Timestamped Event Database for Efficient Telemetry Data Processing and Analytics. In Proc. SIGMOD. ACM, 739--753.
[16]
Helen H. W. Chan, Yongkun Li, Patrick P. C. Lee, and Yinlong Xu. 2018. HashKV: Enabling Efficient Updates in KV Storage via Hashing. In Proc. USENIX ATC. USENIX Association, 1007--1019.
[17]
Chun Chen, Feng Li, Beng Chin Ooi, and Sai Wu. 2011. TI: an efficient indexing mechanism for real-time search on tweets. In Proc. SIGMOD. ACM, 649--660.
[18]
Alessandro Colantonio and Roberto Di Pietro. 2010. Concise: Compressed 'n' Composable Integer Set. Inf. Process. Lett. 110, 16 (2010), 644--650.
[19]
Yue Cui, Jiandong Xie, and Kai Zheng. 2021. Historical Inertia: A Neglected but Powerful Baseline for Long Sequence Time-series Forecasting. In Proc. CIKM. ACM, 2965--2969.
[20]
Luca Deri, Simone Mainardi, and Francesco Fusco. 2012. tsdb: A Compressed Database for Time Series. In Proc. TMA (Lecture Notes in Computer Science, Vol. 7189). Springer, 143--156.
[21]
Laxman Dhulipala, Igor Kabiljo, Brian Karrer, Giuseppe Ottaviano, Sergey Pupyrev, and Alon Shalita. 2016. Compressing Graphs and Indexes with Recursive Graph Bisection. In Proc. SIGKDD. ACM, 1535--1544.
[22]
FACEBOOK. 2022. Write Stalls. https://github.com/facebook/rocksdb/wiki/Write-Stalls#write-stall-mitigation
[23]
Xiangdong Huang, Jianmin Wang, Raymond K. Wong, Jinrui Zhang, and Chen Wang. 2016. PISA: An Index for Aggregating Big Time Series Data. In Proc. CIKM. ACM, 979--988.
[24]
Søren Kejser Jensen, Torben Bach Pedersen, and Christian Thomsen. 2017. Time Series Management Systems: A Survey. IEEE Trans. Knowl. Data Eng. 29, 11 (2017), 2581--2600.
[25]
Myeongjae Jeon, Saehoon Kim, Seung-won Hwang, Yuxiong He, Sameh Elnikety, Alan L. Cox, and Scott Rixner. 2014. Predictive parallelization: taming tail latencies in web search. In Proc. SIGIR. ACM, 253--262.
[26]
Sudarsun Kannan, Nitish Bhat, Ada Gavrilovska, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. 2018. Redesigning LSMs for Nonvolatile Memory with NoveLSM. In Proc. USENIX ATC. USENIX Association, 993--1005.
[27]
Haridimos Kondylakis, Niv Dayan, Kostas Zoumpatianos, and Themis Palpanas. 2018. Coconut: A Scalable Bottom-Up Approach for Building Data Series Indexes. Proc. VLDB Endow. 11, 6 (2018), 677--690.
[28]
Viktor Leis, Alfons Kemper, and Thomas Neumann. 2013. The adaptive radix tree: ARTful indexing for main-memory databases. In Proc. ICDE. IEEE Computer Society, 38--49.
[29]
Daniel Lemire and Leonid Boytsov. 2015. Decoding billions of integers per second through vectorization. Softw. Pract. Exp. 45, 1 (2015), 1--29.
[30]
Daniel Lemire, Owen Kaser, Nathan Kurz, Luca Deri, Chris O'Hara, François Saint-Jacques, and Gregory Ssi Yan Kai. 2018. Roaring bitmaps: Implementation of an optimized software library. Softw. Pract. Exp. 48, 4 (2018), 867--895.
[31]
Panagiotis Liakos, Katia Papakonstantinopoulou, and Yannis Kotidis. 2022. Chimp: Efficient Lossless Floating Point Compression for Time Series Databases. Proc. VLDB Endow. 15, 11 (2022), 3058--3070.
[32]
Jian Liu, Kefei Wang, and Feng Chen. 2021. TSCache: An Efficient Flash-based Caching Scheme for Time-series Data Workloads. Proc. VLDB Endow. 14, 13 (2021), 3253--3266.
[33]
Joshua Lockerman and Blagoj Atanasovski. 2022. How time-series databases InfluxDB and TimescaleDB handle high-cardinality. https://www.timescale.com/blog/what-is-high-cardinality-how-do-time-series-databases-influxdb-timescaledb-compare
[34]
Lanyue Lu, Thanumalayan Sankaranarayana Pillai, Hariharan Gopalakrishnan, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. 2017. WiscKey: Separating Keys from Values in SSD-Conscious Storage. ACM Trans. Storage 13, 1 (2017), 5:1--5:28.
[35]
Giuseppe Ottaviano, Nicola Tonellotto, and Rossano Venturini. 2015. Optimal Space-time Tradeoffs for Inverted Indexes. In Proc. WSDM. 47--56.
[36]
Giuseppe Ottaviano and Rossano Venturini. 2014. Partitioned Elias-Fano indexes. In Proc. SIGIR. ACM, 273--282.
[37]
Tuomas Pelkonen, Scott Franklin, Paul Cavallaro, Qi Huang, Justin Meza, Justin Teller, and Kaushik Veeraraghavan. 2015. Gorilla: A Fast, Scalable, In-Memory Time Series Database. Proc. VLDB Endow. 8, 12 (2015), 1816--1827.
[38]
Rahul Potharaju, Terry Kim, Wentao Wu, Vidip Acharya, Steve Suh, Andrew Fogarty, Apoorve Dave, Sinduja Ramanujam, Tomas Talius, Lev Novik, and Raghu Ramakrishnan. 2020. Helios: Hyperscale Indexing for the Cloud & Edge. Proc. VLDB Endow. 13, 12 (2020), 3231--3244.
[39]
Fabian Reinartz. 2022. Writing a Time Series Database from Scratch. https://web.archive.org/web/20210622211933/https://fabxc.org/tsdb/
[40]
Xuanhua Shi, Zezhao Feng, Kaixi Li, Yongluan Zhou, Hai Jin, Yan Jiang, Bingsheng He, Zhijun Ling, and Xin Li. 2020. ByteSeries: an in-memory time series database for large-scale monitoring systems. In Proc. SoCC. ACM, 60--73.
[41]
Franco Solleza, Andrew Crotty, Suman Karumuri, Nesime Tatbul, and Stan Zdonik. 2022. Mach: A Pluggable Metrics Storage Engine for the Age of Observability. In Proc. CIDR.
[42]
Chen Wang, Xiangdong Huang, Jialin Qiao, Tian Jiang, Lei Rui, Jinrui Zhang, Rong Kang, Julian Feinauer, Kevin Mcgrail, Peng Wang, Diaohan Luo, Jun Yuan, Jianmin Wang, and Jiaguang Sun. 2020. Apache IoTDB: Time-series database for Internet of Things. Proc. VLDB Endow. 13, 12 (2020), 2901--2904.
[43]
Zhiqi Wang and Zili Shao. 2022. TimeUnion: An Efficient Architecture with Unified Data Model for Timeseries Management Systems on Hybrid Cloud Storage. In Proc. SIGMOD. ACM, 1418--1432.
[44]
Zhiqi Wang, Jin Xue, and Zili Shao. 2021. Heracles: An Efficient Storage Model And Data Flushing For Performance Monitoring Timeseries. Proc. VLDB Endow. 14, 6 (2021), 1080--1092.
[45]
Jinzhao Xiao, Yuxiang Huang, Changyu Hu, Shaoxu Song, Xiangdong Huang, and Jianmin Wang. 2022. Time Series Data Encoding for Efficient Storage: A Comparative Analysis in Apache IoTDB. Proc. VLDB Endow. 15, 10 (2022), 2148--2160.
[46]
Hao Yan, Shuai Ding, and Torsten Suel. 2009. Inverted index compression and query processing with optimized document ordering. In Proc. WWW. ACM, 401--410.
[47]
Fangjin Yang, Eric Tschetter, Xavier Léauté, Nelson Ray, Gian Merlino, and Deep Ganguli. 2014. Druid: a real-time analytical data store. In Proc. SIGMOD. ACM, 157--168.
[48]
Yang Yang, Qiang Cao, and Hong Jiang. 2019. EdgeDB: An Efficient Time-Series Database for Edge Computing. IEEE Access 7 (2019), 142295--142307.
[49]
Ting Yao, Yiwen Zhang, Jiguang Wan, Qiu Cui, Liu Tang, Hong Jiang, Chang-sheng Xie, and Xubin He. 2020. MatrixKV: Reducing Write Stalls and Write Amplification in LSM-tree Based KV Stores with Matrix Container in NVM. In Proc. USENIX ATC. USENIX Association, 17--31.
[50]
Naoki Yoshinaga and Masaru Kitsuregawa. 2014. A Self-adaptive Classifier for Efficient Text-stream Processing. In Proc. COLING. ACL, 1091--1102.
[51]
Xiaoyu You, Mi Zhang, Daizong Ding, Fuli Feng, and Yuanmin Huang. 2021. Learning to Learn the Future: Modeling Concept Drifts in Time Series Prediction. In Proc. CIKM. ACM, 2434--2443.
[52]
Chaoli Zhang, Tian Zhou, Qingsong Wen, and Liang Sun. 2022. TFAD: A De- composition Time Series Anomaly Detection Architecture with Time-Frequency Analysis. In Proc. CIKM. ACM, 2497--2507.

Cited By

View all
  • (2024)Scalable Transformer for High Dimensional Multivariate Time Series ForecastingProceedings of the 33rd ACM International Conference on Information and Knowledge Management10.1145/3627673.3679757(3515-3526)Online publication date: 21-Oct-2024
  • (2024)AdpDM: Adaptive Data Model for Efficient Dynamic Management of Large-Scale High-Cardinality Time-Series DatabasesDatabase Systems for Advanced Applications10.1007/978-981-97-5569-1_27(409-425)Online publication date: 13-Dec-2024

Index Terms

  1. Khronos: A Real-Time Indexing Framework for Time Series Databases on Large-Scale Performance Monitoring Systems

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      CIKM '23: Proceedings of the 32nd ACM International Conference on Information and Knowledge Management
      October 2023
      5508 pages
      ISBN:9798400701245
      DOI:10.1145/3583780
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 21 October 2023

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. performance monitoring
      2. real-time indexing
      3. time series database

      Qualifiers

      • Research-article

      Funding Sources

      • National Science Foundation of China
      • Alibaba Group Holding Limited through Alibaba Innovative Research Program

      Conference

      CIKM '23
      Sponsor:

      Acceptance Rates

      Overall Acceptance Rate 1,861 of 8,427 submissions, 22%

      Upcoming Conference

      CIKM '25

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)149
      • Downloads (Last 6 weeks)13
      Reflects downloads up to 08 Mar 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Scalable Transformer for High Dimensional Multivariate Time Series ForecastingProceedings of the 33rd ACM International Conference on Information and Knowledge Management10.1145/3627673.3679757(3515-3526)Online publication date: 21-Oct-2024
      • (2024)AdpDM: Adaptive Data Model for Efficient Dynamic Management of Large-Scale High-Cardinality Time-Series DatabasesDatabase Systems for Advanced Applications10.1007/978-981-97-5569-1_27(409-425)Online publication date: 13-Dec-2024

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media