Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3528535.3565251acmconferencesArticle/Chapter ViewAbstractPublication PagesmiddlewareConference Proceedingsconference-collections
research-article

ShadowSync: latency long tail caused by hidden synchronization in real-time LSM-tree based stream processing systems

Published: 08 November 2022 Publication History

Abstract

Mission-critical, real-time, continuous stream processing applications that interact with the real world have stringent latency requirements. For example, e-commerce websites like Amazon improve their marketing strategy by performing real-time advertising based on customers' behavior, and latency long tail can cause significant revenue loss. Recent work [39] showed a positive correlation between latency long tail and variance in the execution time of synchronous invocation chains (critical paths) in microservices benchmarks. This paper shows that asynchronous, very short but intense resource demands (called millibottlenecks) outside of critical paths can also cause significant latency long tail.
Using a traffic analysis stream processing application benchmark, we evaluated the impact of asynchronous workload bursts generated by a multi-layer data structure called LSM-tree (log-structured merge-tree) for continuous checkpointing. Outside of the critical path, LSM-tree relies on maintenance operations (e.g., flushing/compaction during a checkpoint) to reorganize LSM-tree in memory and on disk to keep data access latency short. Although asynchronous, such recurrent maintenance operations can cause frequent millibottlenecks, particularly when they overlap, a problem we call ShadowSync. For scheduling and statistical reasons, significant latency long tail can arise from ShadowSync caused by asynchronous recurrent operations. Our experimental results show that with typical settings of benchmark components such as RocksDB, ShadowSync can prolong request message latency by up to 2 seconds. We show effective mitigation methods can alleviate both scheduled and statistical ShadowSync reducing the latency long tail to less than 20% of the original at the 99.9th percentile.

References

[1]
Muhammad Yousuf Ahmad and Bettina Kemme. 2015. Compaction Management in Distributed Key-Value Datastores. Proc. VLDB Endow. 8, 8 (apr 2015), 850--861.
[2]
Oana Balmau, Diego Didona, Rachid Guerraoui, Willy Zwaenepoel, Huapeng Yuan, Aashray Arora, Karan Gupta, and Pavan Konka. 2017. TRIAD: Creating Synergies between Memory, Disk and Log in Log Structured Key-Value Stores. In Proceedings of the 2017 USENIX Conference on Usenix Annual Technical Conference (Santa Clara, CA, USA) (USENIX ATC '17). USENIX Association, USA, 363--375.
[3]
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 2019 USENIX Annual Technical Conference (USENIX ATC 19). USENIX Association, Renton, WA, 753--766. https://www.usenix.org/conference/atc19/presentation/balmau
[4]
Netflix Technology Blog. 2016. Application data caching using SSDs: The Moneta project: Next generation EVCache for better cost optimization. Retrieved May 22, 2022 from https://netflixtechblog.com/application-data-caching-using-ssds-5bf25df851ef
[5]
Paris Carbone, Stephan Ewen, Gyula Fóra, Seif Haridi, Stefan Richter, and Kostas Tzoumas. 2017. State Management in Apache Flink®: Consistent Stateful Distributed Stream Processing. Proc. VLDB Endow. 10, 12 (aug 2017), 1718--1729.
[6]
Guoqiang Jerry Chen, Janet L. Wiener, Shridhar Iyer, Anshul Jaiswal, Ran Lei, Nikhil Simha, Wei Wang, Kevin Wilfong, Tim Williamson, and Serhat Yilmaz. 2016. Realtime Data Processing at Facebook. In Proceedings of the 2016 International Conference on Management of Data (San Francisco, California, USA) (SIGMOD '16). Association for Computing Machinery, New York, NY, USA, 1087--1098.
[7]
Xie Chen, Yu Wu, Zhenghao Wang, Shujie Liu, and Jinyu Li. 2021. Developing real-time streaming transformer transducer for speech recognition on large-scale dataset. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) (Toronto, ON, Canada). IEEE, 5904--5908.
[8]
Bonaventura Del Monte, Steffen Zeuch, Tilmann Rabl, and Volker Markl. 2020. Rhino: Efficient Management of Very Large Distributed State for Stream Processing Engines. 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, 2471--2486.
[9]
Facebook. 2021. RocksDB. Retrieved Feb 14, 2021 from https://rocksdb.org/
[10]
Avrilia Floratou, Ashvin Agrawal, Bill Graham, Sriram Rao, and Karthik Ramasamy. 2017. Dhalion: Self-Regulating Stream Processing in Heron. Proc. VLDB Endow. 10, 12 (aug 2017), 1825--1836.
[11]
Flink Forward. 2018. eBay Monitoring Platform Preprocessing and Alerting on Flink | Flink Forward | 9--10 April 2018 | San Francisco. Retrieved August 22, 2022 from https://sf-2018.flink-forward.org/index.html%3Fp=4168.html
[12]
Flink Forward. 2018. Finding Bad Acorns | Flink Forward | 9--10 April 2018 | San Francisco. Retrieved August 22, 2022 from https://sf-2018.flink-forward.org/index.html%3Fp=4078.html
[13]
The Apache Software Foundation. 2021. Apache Flink®: Stateful Computations over Data Streams. Retrieved Feb 14, 2021 from https://flink.apache.org/
[14]
The Apache Software Foundation. 2021. Apache Samza. Retrieved Feb 14, 2021 from htp://samza.apache.org/
[15]
The Apache Software Foundation. 2021. Dynamic resource allocation in spark. Retrieved Feb 14, 2021 from https://spark.apache.org/docs/latest/job-scheduling.html#dynamic-resource-allocation
[16]
The Apache Software Foundation. 2021. Kafka. Retrieved Feb 14, 2021 from https://kafka.apache.org/0102/documentation/streams/
[17]
The Apache Software Foundation. 2022. Apache Cassandra | Apache Cassandra Documentation. Retrieved August 22, 2022 from https://cassandra.apache.org/_/index.html
[18]
Tom ZJ Fu, Jianbing Ding, Richard TB Ma, Marianne Winslett, Yin Yang, and Zhenjie Zhang. 2017. DRS: Auto-scaling for real-time stream analytics. IEEE/ACM Transactions on Networking 25, 6 (2017), 3338--3352.
[19]
Moojan Ghafurian, David Reitter, and Frank E. Ritter. 2020. Countdown Timer Speed: A Trade-off between Delay Duration Perception and Recall. ACM Trans. Comput.-Hum. Interact. 27, 2, Article 11 (mar 2020), 25 pages.
[20]
Alim Ul Gias, Giuliano Casale, and Murray Woodside. 2019. ATOM: Model-driven autoscaling for microservices. In 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS) (Dallas, TX, USA). IEEE, 1994--2004.
[21]
Mike Gualtieri. 2021. The Forrester Wave: Streaming Analytics, Q2 2021. Retrieved May 22, 2022 from https://www.forrester.com/report/the-forrester-wave-streaming-analytics-q2-2021/RES161547
[22]
Hiranya Jayathilaka, Chandra Krintz, and Rich Wolski. 2017. Performance Monitoring and Root Cause Analysis for Cloud-Hosted Web Applications. In Proceedings of the 26th International Conference on World Wide Web (Perth, Australia) (WWW '17). International World Wide Web Conferences Steering Committee, Republic and Canton of Geneva, CHE, 469--478.
[23]
Albert Jonathan, Abhishek Chandra, and Jon Weissman. 2020. WASP: Wide-Area Adaptive Stream Processing. In Proceedings of the 21st International Middleware Conference (Delft, Netherlands) (Middleware '20). Association for Computing Machinery, New York, NY, USA, 221--235.
[24]
Vasiliki Kalavri, John Liagouris, Moritz Hoffmann, Desislava Dimitrova, Matthew Forshaw, and Timothy Roscoe. 2018. Three Steps is All You Need: Fast, Accurate, Automatic Scaling Decisions for Distributed Streaming Dataflows. In Proceedings of the 13th USENIX Conference on Operating Systems Design and Implementation (Carlsbad, CA, USA) (OSDI'18). USENIX Association, USA, 783--798.
[25]
Faria Kalim, Thomas Cooper, Huijun Wu, Yao Li, Ning Wang, Neng Lu, Maosong Fu, Xiaoyao Qian, Hao Luo, Da Cheng, Yaliang Wang, Fred Dai, Mainak Ghosh, and Beinan Wang. 2019. Caladrius: A Performance Modelling Service for Distributed Stream Processing Systems. In 2019 IEEE 35th International Conference on Data Engineering (ICDE). Macao, China, 1886--1897.
[26]
Sobhan Omranian Khorasani, Jan S. Rellermeyer, and Dick Epema. 2019. Self-Adaptive Executors for Big Data Processing. In Proceedings of the 20th International Middleware Conference (Davis, CA, USA) (Middleware '19). Association for Computing Machinery, New York, NY, USA, 176--188.
[27]
JinJin Lin, Pengfei Chen, and Zibin Zheng. 2018. Microscope: Pinpoint performance issues with causal graphs in micro-service environments. In International Conference on Service-Oriented Computing. 3--20.
[28]
Pinchao Liu, Dilma Da Silva, and Liting Hu. 2021. DART: A Scalable and Adaptive Edge Stream Processing Engine. In 2021 USENIX Annual Technical Conference (USENIX ATC 21). USENIX Association, 239--252. https://www.usenix.org/conference/atc21/presentation/liu
[29]
Pinchao Liu, Hailu Xu, Dilma Da Silva, Qingyang Wang, Sarker Tanzir Ahmed, and Liting Hu. 2020. FP4S: Fragment-based Parallel State Recovery for Stateful Stream Applications. In 2020 IEEE International Parallel and Distributed Processing Symposium (IPDPS) (New Orleans, LA, USA). IEEE, 1102--1111.
[30]
Chen Luo and Michael J. Carey. 2019. On Performance Stability in LSM-Based Storage Systems. Proc. VLDB Endow. 13, 4 (dec 2019), 449--462.
[31]
Chen Luo and Michael J. Carey. 2020. LSM-Based Storage Techniques: A Survey. The VLDB Journal 29, 1 (jan 2020), 393--418.
[32]
Mark Marchukov. 2017. LogDevice: a distributed data store for logs. Retrieved May 22, 2022 from https://engineering.fb.com/2017/08/31/core-data/logdevice-a-distributed-data-store-for-logs/
[33]
Hamid Nasiri, Saeed Nasehi, and Maziar Goudarzi. 2019. Evaluation of distributed stream processing frameworks for IoT applications in Smart Cities. Journal of Big Data 6, 1 (2019), 1--24.
[34]
Cao Duc Nguyen. 2020. A Design Analysis of Cloud-based Microservices Architecture at Netflix. Retrieved May 6, 2021 from https://medium.com/swlh/a-design-analysis-of-cloud-based-microservices-architecture-at-netflix-98836b2da45f
[35]
Xu Ning and Maxim Fateev. 2016. Cherami: Uber Engineering's durable and scalable task queue in Go. Retrieved May 22, 2022 from https://eng.uber.com/cherami-message-queue-system/
[36]
The University of Utah. 2021. CloudLab. Retrieved Feb 14, 2021 from https://www.cloudlab.us/
[37]
Takafumi Onishi, Julius Michaelis, and Yasuhiko Kanemasa. 2020. Recovery-conscious adaptive watermark generation for time-order event stream processing. In 2020 IEEE/ACM Fifth International Conference on Internet-of-Things Design and Implementation (IoTDI) (Sydney, NSW, Australia). IEEE, 66--78.
[38]
Calton Pu, Joshua Kimball, Chien-An Lai, Tao Zhu, Jack Li, Junhee Park, Qingyang Wang, Deepal Jayasinghe, Pengcheng Xiong, Simon Malkowski, et al. 2017. The millibottleneck theory of performance bugs, and its experimental verification. In 2017 IEEE 37th International Conference on Distributed Computing Systems (ICDCS) (Atlanta, GA, USA). IEEE, 1919--1926.
[39]
Haoran Qiu, Subho S. Banerjee, Saurabh Jha, Zbigniew T. Kalbarczyk, and Ravishankar K. Iyer. 2020. FIRM: An Intelligent Fine-Grained Resource Management Framework for SLO-Oriented Microservices. In Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation (OSDI'20). USENIX Association, USA, Article 46, 21 pages.
[40]
Chenhao Qu, Rodrigo N. Calheiros, and Rajkumar Buyya. 2018. Auto-Scaling Web Applications in Clouds: A Taxonomy and Survey. ACM Comput. Surv. 51, 4, Article 73 (jul 2018), 33 pages.
[41]
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.
[42]
Ville Satopaa, Jeannie Albrecht, David Irwin, and Barath Raghavan. 2011. Finding a "Kneedle" in a Haystack: Detecting Knee Points in System Behavior. In Proceedings of the 2011 31st International Conference on Distributed Computing Systems Workshops (ICDCSW '11). IEEE Computer Society, USA, 166--171.
[43]
Scylla. 2022. P99 CONF: the event for developers who care about high-performance, low-latency applications. Retrieved May 16, 2022 from https://www.p99conf.io/
[44]
Amazon Web Services. 2022. Amazon Kinesis Data Analytics: Gain actionable insights from streaming data with serverless, fully managed Apache Flink. Retrieved May 22, 2022 from https://aws.amazon.com/kinesis/data-analytics/
[45]
Huasong Shan, Qingyang Wang, and Qiben Yan. 2018. Very Short Intermittent DDoS Attacks in an Unsaturated System.
[46]
Ankit Toshniwal, Siddarth Taneja, Amit Shukla, Karthik Ramasamy, Jignesh M. Patel, Sanjeev Kulkarni, Jason Jackson, Krishna Gade, Maosong Fu, Jake Donham, Nikunj Bhagat, Sailesh Mittal, and Dmitriy Ryaboy. 2014. Storm@twitter. In Proceedings of the 2014 ACM SIGMOD International Conference on Management of Data (Snowbird, Utah, USA) (SIGMOD '14). Association for Computing Machinery, New York, NY, USA, 147--156.
[47]
Selima Triki. 2022. The real-time data revolution. https://digazu.com/2022/04/07/the-real-time-data-revolution/
[48]
Shivaram Venkataraman, Aurojit Panda, Kay Ousterhout, Michael Armbrust, Ali Ghodsi, Michael J. Franklin, Benjamin Recht, and Ion Stoica. 2017. Drizzle: Fast and Adaptable Stream Processing at Scale. In Proceedings of the 26th Symposium on Operating Systems Principles (Shanghai, China) (SOSP '17). Association for Computing Machinery, New York, NY, USA, 374--389.
[49]
Qingyang Wang, Yasuhiko Kanemasa, Jack Li, Deepal Jayasinghe, Toshihiro Shimizu, Masazumi Matsubara, Motoyuki Kawaba, and Calton Pu. 2013. Detecting transient bottlenecks in n-tier applications through fine-grained analysis. In 2013 IEEE 33rd International Conference on Distributed Computing Systems (Philadelphia, PA, USA). IEEE, 31--40.
[50]
Qingyang Wang, Yasuhiko Kanemasa, Jack Li, Chien-An Lai, Chien-An Cho, Yuji Nomura, and Calton Pu. 2014. Lightning in the cloud: A study of transient bottlenecks on n-tier web application performance. In 2014 Conference on Timely Results in Operating Systems (TRIOS 14). USENIX Association, Broomfield, CO. https://www.usenix.org/conference/trios14/technical-sessions/presentation/wang
[51]
Qingyang Wang, Yasuhiko Kanemasa, Jack Li, Chien An Lai, Masazumi Matsubara, and Calton Pu. 2013. Impact of DVFS on N-Tier Application Performance. In Proceedings of the First ACM SIGOPS Conference on Timely Results in Operating Systems (Farmington, Pennsylvania) (TRIOS '13). Association for Computing Machinery, New York, NY, USA, Article 5, 16 pages.
[52]
Qingyang Wang, Shungeng Zhang, Yasuhiko Kanemasa, Calton Pu, Balaji Palanisamy, Lilian Harada, and Motoyuki Kawaba. 2019. Optimizing N-Tier Application Scalability in the Cloud: A Study of Soft Resource Allocation. ACM Trans. Model. Perform. Eval. Comput. Syst. 4, 2, Article 10 (jun 2019), 27 pages.
[53]
Li Wu, Johan Tordsson, Erik Elmroth, and Odej Kao. 2020. Microrca: Root cause localization of performance issues in microservices. In NOMS 2020-2020 IEEE/IFIP Network Operations and Management Symposium (Budapest, Hungary). IEEE, 1--9.
[54]
Hailu Xu, Pinchao Liu, Susana Cruz-Diaz, Dilma Da Silva, and Liting Hu. 2020. SR3: Customizable Recovery for Stateful Stream Processing Systems. In Proceedings of the 21st International Middleware Conference (Delft, Netherlands) (Middleware '20). Association for Computing Machinery, New York, NY, USA, 251--264.
[55]
Le Xu, Boyang Peng, and Indranil Gupta. 2016. Stela: Enabling stream processing systems to scale-in and scale-out on-demand. In 2016 IEEE International Conference on Cloud Engineering (IC2E) (Berlin, Germany). IEEE, 22--31.
[56]
Le Xu, Shivaram Venkataraman, Indranil Gupta, Luo Mai, and Rahul Potharaju. 2021. Move Fast and Meet Deadlines: Fine-grained Real-time Stream Processing with Cameo. In 18th USENIX Symposium on Networked Systems Design and Implementation (NSDI 21). USENIX Association, 389--405. https://www.usenix.org/conference/nsdi21/presentation/xu
[57]
Wei D. Xu, Matthew J. Burns, Frédéric Cherqui, and Tim D. Fletcher. 2021. Enhancing stormwater control measures using real-time control technology: a review. Urban Water Journal 18, 2 (2021), 101--114. arXiv:https://doi.org/10.1080/1573062X.2020.1857797
[58]
Hisatoshi Yamaoka, Kota Itakura, Eiichi Takahashi, Gaku Nakagawa, Julius Michaelis, Yasuhiko Kanemasa, Miwa Ueki, Tatsuro Matsumoto, Riichiro Take, Sayuri Tanie, and Daigo Inoue. 2019. Dracena: A Real-Time IoT Service Platform Based on Flexible Composition of Data Streams. In 2019 IEEE/SICE International Symposium on System Integration (SII). Paris, France, 596--601.
[59]
Zhe Yang, Phuong Nguyen, Haiming Jin, and Klara Nahrstedt. 2019. MIRAS: Model-based reinforcement learning for microservice resource allocation over scientific workflows. In 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS) (Dallas, TX, USA). IEEE, 122--132.
[60]
Guangba Yu, Pengfei Chen, and Zibin Zheng. 2019. Microscaler: Automatic scaling for microservices with an online learning approach. In 2019 IEEE International Conference on Web Services (ICWS) (Milan, Italy). IEEE, 68--75.
[61]
Shungeng Zhang, Huasong Shan, Qingyang Wang, Jianshu Liu, Qiben Yan, and Jinpeng Wei. 2019. Tail amplification in n-tier systems: a study of transient cross-resource contention attacks. In 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS) (Dallas, TX, USA). IEEE, 1527--1538.

Index Terms

  1. ShadowSync: latency long tail caused by hidden synchronization in real-time LSM-tree based stream processing systems

        Recommendations

        Comments

        Please enable JavaScript to view thecomments powered by Disqus.

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        Middleware '22: Proceedings of the 23rd ACM/IFIP International Middleware Conference
        November 2022
        110 pages
        ISBN:9781450393409
        DOI:10.1145/3528535
        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 ACM 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: 08 November 2022

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. performance instability
        2. stream processing
        3. synchronization

        Qualifiers

        • Research-article

        Funding Sources

        • RCN
        • CNS
        • CRISP
        • SaTC

        Conference

        Middleware '22
        Sponsor:
        Middleware '22: 23rd International Middleware Conference
        November 7 - 11, 2022
        QC, Quebec, Canada

        Acceptance Rates

        Middleware '22 Paper Acceptance Rate 8 of 21 submissions, 38%;
        Overall Acceptance Rate 203 of 948 submissions, 21%

        Upcoming Conference

        MIDDLEWARE '24
        25th International Middleware Conference
        December 2 - 6, 2024
        Hong Kong , Hong Kong

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • 0
          Total Citations
        • 243
          Total Downloads
        • Downloads (Last 12 months)66
        • Downloads (Last 6 weeks)5
        Reflects downloads up to 12 Nov 2024

        Other Metrics

        Citations

        View Options

        Get Access

        Login options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media