skip to main content
research-article

ForestTI: A Scalable Inverted-Index-Oriented Timeseries Management System with Flexible Memory Efficiency

Published: 20 June 2023 Publication History

Abstract

Timeseries management systems play an important role in IoT and performance monitoring. As the data volume scales up, absorbing data memory efficiently with high throughput becomes a growing requirement for timeseries management systems. However, the designs of the existing systems, especially the in-memory data structures, suffer from two issues. First, they suffer from the trade-off between memory efficiency and performance. Second, they are not scalable because of lock contention where they cannot benefit from parallel insertion and querying.
In this paper, we propose ForestTI, a scalable inverted-index-oriented timeseries management system where the balance point between memory efficiency and performance can be flexibly adjusted under the increasing memory pressure. First, we present a two-level inverted index, which is scalable with optimistic lock coupling, and its internal structure can be gradually converted to more memory efficient representations. Second, we propose a two-level pointer swizzling mechanism to actively swap out the cold posting lists and in-memory timeseries objects as the number of timeseries increases. Finally, we further optimize the on-disk data structures (i.e. write-ahead logs and LSM-tree) to adapt to the high insertion throughput from the in-memory components. We prototype ForestTI with C++ from scratch, and compared to the storage engine of Prometheus, ForestTI achieves 1.79x higher insertion throughput, 52.1% lower query latency, and 56.9% lower memory occupation. We have released the open-source code of ForestTI for public access.

Supplemental Material

MP4 File
Presentation video
PDF File
Read me
ZIP File
Source Code

References

[1]
2022. CPU cores and threads per CPU core per instance type. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cpu-options-supported-instances-values.html.
[2]
2022. Grafana: The open observability platform | Grafana Labs. https://grafana.com/.
[3]
2022. mlock(2) - Linux manual page. https://man7.org/linux/man-pages/man2/mlock.2.html.
[4]
2022. mmap(2) - Linux manual page. https://www.man7.org/linux/man-pages/man2/mmap.2.html.
[5]
2022. Transaction ID Wraparound in Postgres. https://blog.sentry.io/2015/07/23/transaction-id-wraparound-in-postgres.
[6]
2022. VictoriaMetrics: Simple & Reliable Monitoring For Everyone. https://victoriametrics.com/.
[7]
Inc. or its affiliates 2020, Amazon Web Services. 2022. Amazon EC2. https://aws.amazon.com/ec2/.
[8]
Michael P Andersen and David E. Culler. 2016. BTrDB: Optimizing Storage System Design for Timeseries Processing. In 14th USENIX Conference on File and Storage Technologies (FAST 16). USENIX Association, Santa Clara, CA, 39--52. https://www.usenix.org/conference/fast16/technical-sessions/presentation/andersen
[9]
Andrea Arcangeli, Mingming Cao, Paul E McKenney, and Dipankar Sarma. 2003. Using Read-Copy-Update Techniques for System V IPC in the Linux 2.5 Kernel. In USENIX Annual Technical Conference, FREENIX Track. 297--309.
[10]
Prometheus Authors. 2020. Prometheus remote write. https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write.
[11]
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 Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (Portland, OR, USA) (SIGMOD '20). Association for Computing Machinery, New York, NY, USA, 739--753. https://doi.org/10.1145/3318464.3386136
[12]
Helen H. W. Chan, Yongkun Li, Patrick P. C. Lee, and Yinlong Xu. 2018. HashKV: Enabling Efficient Updates in KV Storage via Hashing. In 2018 USENIX Annual Technical Conference (USENIX ATC 18). USENIX Association, Boston, MA, 1007--1019. https://www.usenix.org/conference/atc18/presentation/chan
[13]
Rene De La Briandais. 1959. File Searching Using Variable Length Keys. In Papers Presented at the the March 3--5, 1959, Western Joint Computer Conference (San Francisco, California) (IRE-AIEE-ACM '59 (Western)). Association for Computing Machinery, New York, NY, USA, 295--298. https://doi.org/10.1145/1457838.1457895
[14]
Justin DeBrabant, Andrew Pavlo, Stephen Tu, Michael Stonebraker, and Stan Zdonik. 2013. Anti-caching: A new approach to database management system architecture. Proceedings of the VLDB Endowment 6, 14 (2013), 1942--1953.
[15]
Nagios Enterprises. 2020. Nagios - The Industry Standard In IT Infrastructure Monitoring. https://www.nagios.org/.
[16]
Cloud Native Computing Foundation. 2020. Horizontally scalable, highly available, multi-tenant, long term Prometheus. https://cortexmetrics.io/.
[17]
Keir Fraser. 2004. Practical lock-freedom. Technical Report. University of Cambridge, Computer Laboratory.
[18]
2021 gRPC Authors. 2020. gPRC, A high performance, open source universal RPC framework. https://grpc.io/.
[19]
influxdata. 2020. InfluxDB 1.7 Documentation. https://docs.influxdata.com/influxdb/.
[20]
Robert Kallman, Hideaki Kimura, Jonathan Natkins, Andrew Pavlo, Alexander Rasin, Stanley Zdonik, Evan P. C. Jones, Samuel Madden, Michael Stonebraker, Yang Zhang, John Hugg, and Daniel J. Abadi. 2008. H-Store: A High-Performance, Distributed Main Memory Transaction Processing System. Proc. VLDB Endow. 1, 2 (aug 2008), 1496--1499. https://doi.org/10.14778/1454159.1454211
[21]
Alfons Kemper, Donald Kossmann, and Lehrstuhl Fur Informatik. 1993. Adaptable Pointer Swizzling Strategies in Object Bases: Design, Realization, and Quantitative Analysis.
[22]
Changman Lee, Dongho Sim, Jooyoung Hwang, and Sangyeun Cho. 2015. {F2FS}: A New File System for Flash Storage. In 13th USENIX Conference on File and Storage Technologies (FAST 15). 273--286.
[23]
Viktor Leis, Michael Haubenschild, Alfons Kemper, and Thomas Neumann. 2018. LeanStore: In-Memory Data Management beyond Main Memory. In 2018 IEEE 34th International Conference on Data Engineering (ICDE). 185--196. https://doi.org/10.1109/ICDE.2018.00026
[24]
V. Leis, Alfons Kemper, and Thomas Neumann. 2013. The adaptive radix tree: ARTful indexing for main-memory databases. Proceedings - International Conference on Data Engineering, 38--49. https://doi.org/10.1109/ICDE.2013.6544812
[25]
Viktor Leis, Florian Scheibner, Alfons Kemper, and Thomas Neumann. 2016. The ART of Practical Synchronization. In Proceedings of the 12th International Workshop on Data Management on New Hardware (San Francisco, California) (DaMoN '16). Association for Computing Machinery, New York, NY, USA, Article 3, 8 pages. https://doi.org/10.1145/2933349.2933352
[26]
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, Article 5 (March 2017), 28 pages. https://doi.org/10.1145/3033273
[27]
Lin Ma, Joy Arulraj, Sam Zhao, Andrew Pavlo, Subramanya R. Dulloor, Michael J. Giardino, Jeff Parkhurst, Jason L. Gardner, Kshitij Doshi, and Stanley Zdonik. 2016. Larger-than-Memory Data Management on Modern Storage Hardware for in-Memory OLTP Database Systems. In Proceedings of the 12th International Workshop on Data Management on New Hardware (San Francisco, California) (DaMoN '16). Association for Computing Machinery, New York, NY, USA, Article 9, 7 pages. https://doi.org/10.1145/2933349.2933358
[28]
Thomas Neumann and Michael J. Freitag. 2020. Umbra: A Disk-Based System with In-Memory Performance. In 10th Conference on Innovative Data Systems Research, CIDR 2020, Amsterdam, The Netherlands, January 12--15, 2020, Misc Proceedings. www.cidrdb.org. http://cidrdb.org/cidr2020/papers/p29-neumann-cidr20.pdf
[29]
Patrick O'Neil, Edward Cheng, Dieter Gawlick, and Elizabeth O'Neil. 1996. The Log-Structured Merge-Tree (LSM-Tree). Acta Inf. 33, 4 (01 June 1996), 351--385. https://doi.org/10.1007/s002360050048
[30]
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. PVLDB 8, 12 (2015), 1816--1827. https://doi.org/10.14778/2824032.2824078
[31]
Prometheus. 2020. Prometheus - From metrics to insight, power your metrics and alerting with a leading open-source monitoring solution. https://prometheus.io/.
[32]
Pandian Raju, Rohan Kadekodi, Vijay Chidambaram, and Ittai Abraham. 2017. PebblesDB: Building Key-Value Stores Using Fragmented Log-Structured Merge Trees. In Proceedings of the 26th Symposium on Operating Systems Principles (Shanghai, China) (SOSP '17). Association for Computing Machinery, New York, NY, USA, 497--514. https://doi.org/10.1145/3132747.3132765
[33]
Jeff Dean Sanjay Ghemawat. 2022. LevelDB. https://github.com/google/leveldb.
[34]
Michael Kerrisk Serge Hallyn. 2021. cgroups - Linux manual page. https://man7.org/linux/man-pages/man7/cgroups.7.html.
[35]
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 Proceedings of the 11th ACM Symposium on Cloud Computing (Virtual Event, USA) (SoCC '20). Association for Computing Machinery, New York, NY, USA, 60--73. https://doi.org/10.1145/3419111.3421289
[36]
Franco Solleza, Andrew Crotty, Suman Karumuri, Nesime Tatbul, and Stanley B. Zdonik. 2021. Mach: A Pluggable Metrics Storage Engine for the Age of Observability.
[37]
Radu Stoica and Anastasia Ailamaki. 2013. Enabling Efficient OS Paging for Main-Memory OLTP Databases. In Proceedings of the Ninth International Workshop on Data Management on New Hardware (New York, New York) (DaMoN '13). Association for Computing Machinery, New York, NY, USA, Article 7, 7 pages. https://doi.org/10.1145/2485278.2485285
[38]
Michael Stonebraker and Ariel Weisberg. 2013. The VoltDB Main Memory DBMS. IEEE Data Eng. Bull. 36 (2013), 21--27.
[39]
Axel Thue. 1912. Uber die gegenseitige Lage gleicher Teile gewisser Zeichenreihen. Kra. Vidensk. Selsk. Skrifer, I. Mat. Nat. Kl. (1912), 1--67.
[40]
Timescale. 2020. Time Series Benchmark Suite, a tool for comparing and evaluating databases for time series data. https://github.com/timescale/tsbs.
[41]
Inc. Timescale. 2020. Time-series data simplified | Timescale. https://www.timescale.com/.
[42]
Alexander Visheratin, Alexey Struckov, Semen Yufa, Alexey Muratov, Denis Nasonov, Nikolay Butakov, Yury Kuznetsov, and Michael May. 2020. Peregreen -- modular database for efficient storage of historical time series in cloud environments. In 2020 USENIX Annual Technical Conference (USENIX ATC 20). USENIX Association, 589--601. https://www.usenix.org/conference/atc20/presentation/visheratin
[43]
Zhiqi Wang and Zili Shao. 2022. TimeUnion: An Efficient Architecture with Unified Data Model for Timeseries Management Systems on Hybrid Cloud Storage. In Proceedings of the 2022 International Conference on Management of Data (Philadelphia, PA, USA) (SIGMOD '22). Association for Computing Machinery, New York, NY, USA, 1418--1432. https://doi.org/10.1145/3514221.3526175
[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 (Feb. 2021), 1080--1092. https://doi.org/10.14778/3447689.3447710
[45]
Paul R. Wilson. 1991. Pointer Swizzling at Page Fault Time: Efficiently Supporting Huge Address Spaces on Standard Hardware. SIGARCH Comput. Archit. News 19, 4 (jul 1991), 6--13. https://doi.org/10.1145/122576.122577
[46]
Naoki Yoshinaga. 2021. cedar - C implementation of efficiently-updatable double-array trie. http://www.tkl.iis.u-tokyo.ac.jp/~ynaga/cedar/.
[47]
Naoki Yoshinaga and Masaru Kitsuregawa. 2014. A Self-adaptive Classifier for Efficient Text-stream Processing. In Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers. Dublin City University and Association for Computational Linguistics, Dublin, Ireland, 1091--1102. https://aclanthology.org/C14--1103

Cited By

View all

Index Terms

  1. ForestTI: A Scalable Inverted-Index-Oriented Timeseries Management System with Flexible Memory Efficiency

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Proceedings of the ACM on Management of Data
    Proceedings of the ACM on Management of Data  Volume 1, Issue 2
    PACMMOD
    June 2023
    2310 pages
    EISSN:2836-6573
    DOI:10.1145/3605748
    Issue’s Table of Contents
    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].

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 20 June 2023
    Published in PACMMOD Volume 1, Issue 2

    Permissions

    Request permissions for this article.

    Badges

    Author Tags

    1. inverted indexes
    2. timeseries management systems

    Qualifiers

    • Research-article

    Funding Sources

    • Direct Grant for Research, The Chinese University of Hong Kong
    • the Research Grants Council of the Hong Kong Special Administrative Region, China

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)124
    • Downloads (Last 6 weeks)3
    Reflects downloads up to 05 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    Login options

    Full Access

    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