scieee AI-readable full text Open interactive document viewer

Optimizing serverless architectures for data-intensive analytics workloads

Nestorov, Anna Maria

Abstract

(English) Recently, serverless computing has garnered attention from academia and industry due to its on-demand resource provisioning, allowing users to focus solely on their core business logic by breaking down tasks into small stateless functions. Serverless offers benefits like a 'pay-per-use' cost model, greater flexibility, and transparent elastic resource auto-scaling. Researchers in academia and industry are increasingly exploring serverless computing's potential in complex, data-intensive analytics. These tasks, resource-heavy and highly parallel, involve significant inter-function communications. However, this shift presents challenges, requiring alignment with the specific needs and constraints of such applications. This research area is currently considered one of the most compelling areas of study. This thesis shows that it is possible to efficiently execute modern data-intensive analytics workloads, traditionally deployed in managed cloud clusters, within serverless computing environments using direct data inter-function communication and optimized performance-cost efficient resource allocation policies. To demonstrate this thesis, we first build a performance model for serverless workloads, considering data sharing, volume, and communication technologies. The model, with a relative error of 5.52%, evaluates the performance of a representative workload in serverless, analyzing task granularity and concurrency, data locality, resource allocation, and scheduling policies. Our results indicate that the performance of data-intensive analytics workloads in serverless can be up to 4.32x faster depending on how these are deployed. Furthermore, this characterization highlights inefficiencies in centralized object storage and stresses the primary importance of efficient resource use. We then introduce Floki, a data forwarding system that tackles the centralized object storage bottleneck. It enables direct communication between producer-consumer function pairs using fixed-size communication methods. Floki establishes point-to-point data channels for intra- and inter-node data transmission, allowing transparent data transfer and reducing network data copying. This workflow-oriented approach boosts performance and minimize resource requirements without restricting function placement.Our experimental evaluation, performed on the principal communication patterns in distributed systems, shows that Floki reduces the end-to-end time up to 74.95x, decreasing the most extensive data sharing time from 12.55 to 4.33 minutes, saving almost two-thirds of time. Additionally, Floki achieves up to 50,738x of resource-saving, equivalent to a memory allocation of approximately 1.9MB instead of an object storage allocation of 96GB. Finally, we investigates how to achieve efficient resource utilization in modern serverless environments and proposes Dexter, a novel resource allocation manager, leveraging serverless computing elasticity. Dexter continuously monitors application execution, dynamically allocating resources at a fine-grained level combining predictive and reactive strategies to ensure performance-cost efficiency (optimizing total runtime cost). Unlike black-box Machine Learning (ML) models, Dexter reaches a sufficiently good solution, prioritizing simplicity, generality, and ease of understanding. The proposed experimental evaluation demonstrates that our solution achieves a significant cost reduction of up to 4.65x, while improving resource efficiency up to 3.50x, when compared with the default serverless Spark resource allocation that dynamically requests exponentially more executors to accommodate pending tasks. Dexter also enables substantial resource savings, demanding up to 5.71x fewer resources. Dexter is a robust solution to new, unseen workloads, achieving up to 2.72x higher performance-cost efficiency thanks to its conservative resource scaling approach.

Full text

OPTIMIZING SERVERLESS ARCHITECTURES FOR DATA-INTENSIVE ANALYTICS WORKLOADS anna maria nestorov Dissertation submitted in partial fulfillment of the requirements for the Degree of Doctor of Philosophy in Computer Architecture Universitat Politècnica de Catalunya - BarcelonaTECH March 2024 Anna Maria Nestorov: Optimizing Serverless Architectures for Data-Intensive Analytics Workloads Dissertation submitted in partial fulfillment of the requirements for the Doctoral Degree in Computer Architecture, March 19,2024. supervisors: Josep Lluís Berral David Carrera affiliation: Departament d’Arquitectura de Computadors Universitat Politècnica de Catalunya - BarcelonaTECH location: Barcelona colophon The front cover picture shows the sunrise over one of the seven Rila lakes, Bulgaria. Unlicensed and free-to-use picture from WallPaperFlare. This document was typeset using the typographical look-and-feel classicthesis developed by André Miede and Ivo Pletikosi´c. The style was inspired by Robert Bringhurst’s seminal book on typography “The Elements of Typographic Style”. The greatest glory in living lies not in never falling, but in rising every time we fall. Nelson Mandela ABSTRACT In recent years, serverless computing has gained significant attention from academia and industry. Its execution paradigm allows provisioning resources on-demand, leaving the tedious work of infrastructure and operational concerns to the cloud provider. This allows users to entirely focus on their core business logic, decomposing their jobs into small stateless functions to be managed independently and updated flexibly. In addition, serverless computing attracts many tenants in today’s cloud environments also for its fundamental principles, including the ‘pay-per-use’ cost model with fine-grained charge granularity, greater flexibility, and transparent elastic resource autoscaling all the way down to zero resources in the absence of requests allowing massive scalability. Given the success in many simple real-world applications across multiple domains ranging from web microservices to Internet of Things ( IoT ) applications in a serverless environment, researchers in both academia and industry have begun to explore its applicability in more complex dataintensive analytics workloads. These workloads are usually resource-intensive, highly parallel, and are characterized by considerable inter-function communications. However, this shift comes with inherent challenges, making it essential to align the paradigm with this type of application’s specific needs and constraints. This research area has gained significant interest and is currently considered one of the most compelling areas of study. This thesis shows that it is possible to efficiently execute modern data-intensive analytics workloads, traditionally deployed in managed cloud clusters, within serverless computing environments using direct data inter-function communication and optimized performance-cost efficient resource allocation policies. To demonstrate this thesis, we first build a performance model for serverless workloads that considers how data is shared between functions, including the volume of data and the underlying communication technology employed. With a relative error of 5.52%, the proposed model allows us to evaluate the performance of a representative workload in serverless, analyzing task granularity and concurrency, data locality, resource allocation, and scheduling policies. We also explore possible solutions for the data-sharing problem, like using local memory and storage. Our results indicate that the performance of data-intensive analytics workloads in serverless can be up to 4.32 × faster depending on how these are deployed. Furthermore, this characterization emphasizes the current state-of-practice centralized object storage inefficiencies and highlights the primary importance of efficient resource utilization. We then present Floki, a data forwarding system addressing the centralized object storage bottleneck by proactively enabling direct inter-function communication between producer-consumer pairs of functions through utilizing established and widely adopted fixed-size communication mechanisms. Floki creates point-to-point data channels for intra-node and inter-node data transmission, allowing data to be transferred directly from producer to consumer functions in a fully transparent fashion, minimizing data copying over the network. Floki offers workflow-oriented data communication, increasing performance while minimizing resource requirements without imposing any constraint on function placement. Specifically, its flexibility and observability allow creating data channels adapting vii to the specific function scheduling of the underlying orchestration framework. Our experimental evaluation, focusing on the principal communication patterns in distributed systems, shows that Floki reduces the end-to-end time up to 74.95× , decreasing the most extensive data sharing time from 12.55 to 4.33 minutes, translating into nearly two-thirds of time-savings. Furthermore, leveraging the efficiency of the employed fixed-size communication mechanisms, Floki achieves up to 50, 738× of resource-saving, equivalent to a memory allocation of approximately 1.9MB, vastly outperforming state-of-practice object storage allocation of 96GB. This thesis finally investigates how to achieve efficient resource utilization within modern serverless environments and proposes Dexter, a novel resource allocation manager, fully leveraging serverless computing elasticity. Dexter continuously monitors application execution, dynamically allocating resources at a fine-grained level to ensure performance-cost efficiency (optimizing total runtime cost). Dexter is novel in combining predictive and reactive strategies that fully exploit the resource elasticity of serverless to enhance the performance-cost efficiency for workflow executions. Unlike black-box Machine Learning ( ML ) models, Dexter quickly reaches a sufficiently good solution, prioritizing simplicity, generality, and ease of understanding. The proposed experimental evaluation, considering two industry-standard benchmarks and a real-world workload, demonstrates that our solution achieves a significant cost reduction of up to 4.65× , while improving resource efficiency up to 3.50× , when compared with the default serverless Spark resource allocation that dynamically requests exponentially more executors to accommodate pending tasks. Dexter also enables substantial resource savings, demanding up to 5.71× fewer resources. Finally, Dexter is a robust solution to new, unseen workloads, achieving up to 2.72× higher performance-cost efficiency thanks to its conservative resource scaling approach. ACKNOWLEDGMENTS I would like to express my sincere gratitude to all those who have contributed to completing this doctoral thesis. The Ph.D. has been a challenging journey, a formidable test of resilience, perseverance, and unwavering dedication. The support, invaluable guidance, and encouragement of all the people I have met along the way have been inestimable and made the Ph.D. journey a transformative and enriching experience, not only shaping me as a researcher but also as an individual. First and foremost, I express my deepest gratitude and appreciation to my Ph.D. advisors, Dr. Josep L. Berral, and Dr. David Carrera, and previously also Dr. Jordà Polo, who have been a constant source of inspiration. Your expertise and constant encouragement have been fundamental in shaping the direction of my research. Your insightful feedback and constructive criticism have significantly contributed to refining my ideas and research. I am truly fortunate to have had you as my advisors, and I am immensely grateful for the invaluable lessons and skills I have gained under your mentorship. Also, thanks to Yolanda for being my tutor at UPC for some time and managing all the related bureaucracy. I extend my heartfelt gratitude to my Ph.D. thesis committee members, including Dr. Xavier Martorell, Dr. Ramon Nou, Dr. Jordi Guitart, Dr. Marc Sanchez-Artigas, and Dr. Amirhosein Taherkordi. Thank you for accepting being part of this final step in my Ph.D. journey, for the time and effort to rigorously examine my research which I am sure it will provide constructive feedback and valuable suggestions that will significantly enhance the quality of this research. Special thanks are also due to the supervisors and mentors I had the honor to work with in my collaboration with IBM during my stay in Barcelona and internship abroad. I want to thank Claudia Misale, Chen Wang, Alaa Youssef, Radu Stoica, and Bernard Metzler for the time invested in mentoring me, your dedication, and the positive impact you have had on my academic and professional development. I am privileged to have had the opportunity to work under your guidance. I would like to say thank you to my colleagues and fellow researchers who provided stimulating discussions, insightful critiques, and a supportive community throughout my Ph.D. journey. First of all, the BSC Data-Centric Computing team made me feel at home from day one at BSC: Nicola, Felipe, Aaron, Alberto, Paco, Kiyana, Dani, Marcelo, David B., Claudia F., Ferran, Diego, Marc, Peini, Omar, Gonzalo, and Pol. I am proud to have been part of a team with someone as capable and dedicated as you. Your support has been my anchor, giving me the strength to overcome challenges and persevere. Many thanks also ix ACRONYMS BDS Boosted Decision Stumps BRR Bayesian Ridge Regression CAGR Compound Annual Growth Rate CDF Cumulative Distribution Function CI/CD Continuous Integration and Continuous Delivery CNCF Cloud Native Computing Foundation CRD Custom Resource Definition DAG Directed Acyclic Graph DART Dropouts Additive Regression Tree DRL Deep Reinforcement Learning DSO Distributed shared object FaaS Function as a Service FIFO First In First Out GB Gradient Boosting IoT Internet of Things IPC Inter Process Communication JVM Java Virtual Machine LOOCV Leave One Out Cross-Validation LR Linear Regression LSTM Long Short Term Memory MAE Mean Absolute Error MILP Mixed-Integer Linear Programming ML Machine Learning NFS Network File System NN Neural Network OCR Optical Character Recognition OLAP On-Line Analytical Processing PaaS Platform as a Service PV Persistent Volume RDD Resiliant Distributed Dataset RF Random Forest ROI Return Of Investment RPC Remote Procedure Call SIMD Single Instruction Multiple Data 3NF Third Normal Form TCP Transmission Control Protocol TIFF Tagged Image File Format VM Virtual Machine xvi LIST OF FIGURES Figure 1.1Thesiscontributions................................. 4 Figure 2.1Kubernetes cluster architecture example. . . . . . . . . . . . . . . . . . . . . 9 Figure 2.2Kubernetes ecosystem enabling event-driven and serverless executions. . . 10 Figure 2.3 Application (a) sample execution schedule with dynamic allocation over a maximum of 5executors, featuring two vCPUs each with a one-to-one coretask mapping (cold start are depicted in gray and the number of tasks are reported in parentheses), and (b) most time-consuming job DAG reporting the average job’s stages duration on 5sequential runs with different circle sizes. ......................................... 13 Figure 3.1 Tesseract Long Short Term Memory ( LSTM )-based Neural Network ( NN ) architecture. The model takes in input a text line and returns all the associated time-steps language probabilities. The layer type and the related matrix size is reported above each layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Figure 3.2 Scalability analysis of the (a) initial TIFF conversion phase and (b) text recognitionphase................................... 25 Figure 3.3 Tesseract per-page average execution times exploiting one and four threads (1T and 4T). The horizontal red lines identify the averages over all the numberofpages. .................................. 26 Figure 3.4 Tesseract dataflow graph reporting the macro-nodes data movements on the arcs. The different workload levels of parallelism pi , i.e., page, block and text line, are highlighted on both macro-nodes and arcs. The dotted and dashed arcs are mutually exclusive: the dotted arcs are used with the coarse-grained workload computation, while the dashed arcs are used with the fine-grained workloadcomputation................................ 27 Figure 3.5 Memory and disk characterization. First and Next keywords highligh the first and subsequent local/remote disk bandwidths, while Remote Disk SN refers to remote operations with producer and consumer placed on the same node. ......................................... 28 Figure 3.6 End-to-end time speedup versus the sequential execution, achieved by applying the three different levels of parallelism. . . . . . . . . . . . . . . . . . 31 Figure 3.7 End-to-end time speedups versus the sequential execution, achieved by exploiting page- and textline-level of parallelism (p, t), and Task-instances number. (a) highlights the local deployment, while (b) highlights the remote deployment reporting network load impact with increasingly bigger symbol sizes. ......................................... 32 Figure 3.8 Comparison of the considered scheduling policies when simulating the execution of a 50 page input on a cluster with 100 nodes. Horizontal bars divide computational time (bottom) and inter-function I/O time (top). . . . 34 Figure 4.1Floki’sarchitecture.................................. 39 xvii Figure 4.2A step-by-step example of Floki. . . . . . . . . . . . . . . . . . . . . . . . . . 43 Figure 4.3 Average transfer time (left-hand side legend) and resource usage (right-hand side legend) for 16GB of data with pipe and socket buffer sizes ranging from 1to 128 pages (4KB to 512KB). .......................... 44 Figure 4.4 Floki’s end-to-end speedups over the object storage solution in the analyzed distributed systems patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Figure 5.1 Influence of scaling parallelism level on performance and cost at per-query level. Queries runtimes (bottom) and costs (top). Saturation points are reported with dashed vertical lines. . . . . . . . . . . . . . . . . . . . . . . . . . 59 Figure 5.2 Influence of scaling parallelism level on performance (bottom) and cost (top) at per-stage level. Red dashed vertical line reports the TPC-H q21 query saturation point, while the remaining lines reports its stages saturation points. 60 Figure 5.3Influence of scaling parallelism level on performance at per-task level. . . . 61 Figure 5.4 Dexter’s system architecture showing new components in light blue and modified components with dotted rectangles. . . . . . . . . . . . . . . . . . . 63 Figure 5.5System implementation overview. . . . . . . . . . . . . . . . . . . . . . . . . . 68 Figure 5.6 Time intervals performance of different stages, with varying average task runtime (within round brackets), when scaling intervals from 1s to 20s. Optimal values are reported with a black circle, while not valid time intervals (lower than the average task runtime) are reported with not filled circles. . 69 Figure 5.7 Optimal time intervals, achieving minimum MAEs, when varying the task runtime......................................... 70 Figure 5.8 End-to-end performance over the two baselines when running TPC-H benchmark. ......................................... 72 Figure 5.9Resource allocation patterns for TPC-H q7query. ............... 73 Figure 5.10 Resource provisioning of the two baselines and Dexter, highlighting the resource savings achieved by Dexter. . . . . . . . . . . . . . . . . . . . . . . . 74 Figure 5.11 Dexter’s (a) runtime performance, (b) cost savings, (c) performance-cost efficiencies, and (d) resource savings when running the 99 TPC-DS queries with 100GBinputdata................................ 76 LIST OF TABLES Table 3.1Tesseract simplified call-graph . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Table 3.2Modelaccuracy. ................................... 30 Table 4.1Resource usage and saving on 16GBdatasize. ................. 48 Table 5.1Models prediction error and error distribution. . . . . . . . . . . . . . . . . . 62 Table 5.2 Runtime and cost of the five most compute-intensive queries from TPC-DS benchmarks. ..................................... 77 Table 5.3 Efficiency and resource savings evaluation of the five most compute-intensive queries from TPC-DS benchmarks. . . . . . . . . . . . . . . . . . . . . . . . . 78 Table 5.4Overview of related work and comparison with this work. . . . . . . . . . . 81 xix 1 INTRODUCTION In this chapter, we first provide the context of this thesis and the motivation underlying the work, highlighting the research challenges we are attempting to address and the thesis statement (Section 1.1). Then, we present the the main contributions of this thesis, specifying for each contribution the associated achievements (Section 1.2). 1.1 thesis context and motivation Representing the long-held dream of computing as a utility [1], the cloud computing model enables ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal management effort or service provider interaction [2]. However, users still have to make decisions that can be challenging for many: instance types, cluster size, load balancing strategy, etc. In this context, serverless computing has received a significant uptick in attention over the last few years, both in academia and industry. Unlike the traditional cloud computing model, in the serverless paradigm, the operational concerns of the infrastructure are fully managed by the cloud provider, completely relieving the user from challenging management decisions. Serverless computing [3] attracts many tenants in today’s cloud environments also for its fundamental principles, including transparent elastic resource scaling allowing massive scalability, ‘pay-as-you-go’ cost model with fine-grained charging granularity, and hassle-free management. While allowing tenants to focus on their core logic and run their applications as a set of functions on-demand, saving costs for unused computing resources, the serverless computing paradigm enables cloud providers to control the entire development stack and efficiently optimize and manage resources. Today, almost all major cloud providers offer services to deploy serverless functions through a Function as a Service ( FaaS ) computing platform. Examples include AWS Lambda [4], Google’s Cloud Functions [5], and IBM’s Cloud Functions [6] in commercial clouds, and Open-Lambda [7], Open-Whisk [8], and Knative [9] in open-source projects. 1 2 introduction Given the success in many simple real-world applications across multiple domains ranging from web microservices to IoT applications, in a serverless environment, academia and industrial research have begun to explore its usage in more complex resource intensive and highly parallel applications, characterized by considerable inter-function communications. This research area has gained significant interest and is currently considered one of the most compelling areas of study. Researchers have demonstrated how the serverless paradigm can be successfully exploited in complex applications, including linear algebra tasks [10, 11], video encoding [12–14], deep learning training and inference [15–28], Monte Carlo simulations [29–32], as well as MapReduce-style [11,33–36] and SQL-style analytics [37–40]. The serverless market share was valued at USD 8.93 billion in 2022 and is projected to reach USD 55.24 billion by 2030, with a Compound Annual Growth Rate (CAGR) of 22.45% [41]. Despite these successes, serverless computing exhibits limitations [23,42–45]. The absence of network addressability and the lack of efficient data sharing between functions makes it challenging for a vast number of data-intensive analytics workloads to benefit from serverless. Not supporting direct inter-function communication, major serverless platforms [4–6,46] take disaggregation to an extreme, imposing functions to exchange data only through shared object storage. Being data-intensive analytics workloads characterized by a considerable amount intermediate data transfers, shared object storage becomes a bottleneck for efficient inter-function communication due to its high-latency access. Furthermore, since data-intensive analytics workloads are typically resource-intensive and inherently parallel, they highly benefit from the elasticity and the virtually unlimited scalability offered by serverless platforms. In particular, since early 2022, a prominent effort has been made towards leveraging serverless platforms to efficiently run big data analytics frameworks, such as Apache Spark [47], which are traditionally deployed in managed cloud clusters. GCP Dataproc Serverless [48], Databricks Serverless [49], and IBM Analytics Engine [50] exemplify this trend. However, auto-allocating resources to complex workflows, such as big data analytics applications, is complex because the relationship between resource allocation and performance is complicated and changes over the application runtime [51]. As detailed in the remainder of this chapter, currently serverless comes with limitations, such as communication through shared object storage and the absence of an optimized resource auto-scaling mechanism. These limitations are posing several research challenges when porting data-intensive analytics workloads to serverless platforms. Research challenge 1:While the desirability and potential advantages of enabling more complex workloads, such as data-intensive analytics workloads, in serverless environments are known, we need to fully understand its feasibility and efficiency. This involves identifying which are the key elements preventing these workloads to completely benefit from serverless environments. In particular, to understand whether new approaches are necessary, there is the need to analyze in-depth the performance impact of running more complex workloads on 1.1 thesis context and motivation 3 serverless platforms. This analysis should focus on various factors, including inter-function communication latencies, workload parallelisms, and resource requirements. Although shared object storage enables the complete decoupling of storage and computation in serverless environments and offers a durable and low-cost data storage solution, it shows relatively high access latencies, leading to highly inefficient workload executions when running data-intensive analytics workloads. This brings a new research challenges: Research challenge 2:While object storage represents a good solution when there is the need to persist data, letting users to use them over time, we need to have an alternative data communication mechanism for scenarios where the long-term availability of data is not a requirement, allowing a high-performance volatile data sharing. Instead of buffering intermediate results in state-of-practice remote shared storage and exchange data between functions over the network, it is crucial to explore alternative communication mechanisms that facilitate rapid and direct intermediate data communication between functions. Finally, while serverless auto-scaling automatically increases or decreases the number of workload instances based on the number of incoming requests, when executing more complex data-intensive analytics workloads it is crucial to accurately adjust resources at a fine-grained level. This leads us to the final research challenge this thesis attempts to address. Research challenge 3:Given their typical resource-intensive and inherently parallel nature, it is fundamental to comprehend how to dynamically scale the amount of resources (i.e., parallelism/scale level), and at which granularity level, to fully leverage the virtually unlimited scalability offered by serverless platforms. Specifically, we need to dynamically adapt to variations by setting the level of parallelism to maximize the resource utilization and to achieve a balance between performance and cost, thereby minimizing the overall monetary cost while ensuring acceptable runtime performance. Due to these reasons, this thesis wants to demonstrate the feasibility of the following statement: It is possible to efficiently execute modern data-intensive analytics workloads, traditionally deployed in managed cloud clusters, in serverless computing environments by using direct data inter-function communication and optimized performance-cost efficient resource allocation policies. 4 introduction 1.2 thesis contributions To prove the aforementioned thesis statement, we divided the work into the following three major research contributions which are summarized as follows: C1: Workload Scalability and Performance Analysis C2: Direct Inter-Function Communication Enablement C3: Automatic Performance-Cost Efficient Resource Allocation The comprehensive analysis performed in the first contribution identifies and underscores research opportunities aimed at optimizing the execution of data-intensive analytics workloads in serverless environments. The analysis provides strong motivations for the subsequent second and third contributions, as illustrated in Figure 1.1. The second and third contributions are independent since they tackle two different problems, but they are complementary as they are part of one incremental work towards an efficient execution of data-intensive analytics workloads in serverless environments. 1.2.1Contribution 1: Workload Scalability and Performance Analysis This first contribution aims to fully characterize a proper use case data-centric analytics workload and to assess its performance when executed in current serverless platforms. Focusing on data communication, we deeply study and model all memory and storage data exchange mechanisms available in current open-source serverless platforms. In particular, in this analysis, we consider various function replication scenarios for embarrassingly parallel functions to optimize the balance between data communication and computation delays. The workload is then used to analytically demonstrate that directly using existing serverless platforms would lead to extremely inefficient executions of such workloads. This analysis allows us to understand which are the most critical key elements preventing data-intensive analytics workloads to completely benefit from serverless environments, and thereby indicating whether new approaches are necessary. Contribution 2 Direct Inter-Function Communication Enablement Contribution 1 Workload Scalability and Performance Analysis Contribution 3 Automatic Performance-Cost Efficient Resource Allocation A B Res. Res. Res. Figure 1.1: Thesis contributions 1.2 thesis contributions 5 The achievements of this contribution are: – Workload characterization in terms of execution times, scalability, and data movements. – Identification of the serverless functions and the parallelism opportunities, showing a methodology to extract the necessary components to translate a traditional monolithic application to serverless. – Development of a performance model capturing the performance of serverless workloads involving data exchanges, supporting different configurations and data exchange mechanisms. – Evaluation of workload performance impact concerning task granularity and concurrency, data locality, resource allocation and scalability, and scheduling policies. 1.2.2Contribution 2: Direct Inter-Function Communication Enablement The second contribution has the scope to enable the runtime management of direct interfunction communication essential to efficiently run data-centric analytics workloads in opensource serverless environments. Utilizing established and widely adopted communication mechanisms, we introduce a new point-to-point data sharing communication mechanism capable to handle arbitrarily complex data structures. This data sharing mechanism enables proactive and fast data transfers without imposing any constraint on function placement. In this contribution we address the centralized storage bottleneck by proposing a system facilitating direct communication between functions, where data exchanges are orchestrated on a producer-consumer functions pair level, minimizing data copying over the network. Directly sharing data between functions implies two main advantages. First, the number of concurrent read/write operations is reduced since resources are shared among a lower number of functions, i.e., the ones co-placed on a given node, or of exclusive use. Second, leveraging multi-threading capabilities, a producer function can concurrently send the same data to multiple consumer functions, while a consumer function can simultaneously receive data from multiple producer functions. The achievements of the contribution are: – Build a proactive workflow-based data forwarding system enabling point-to-point data transfers without incurring additional overheads, such as state-of-practice storage overheads. – Design of a full communication stack between functions, allowing non-colocated functions to seamlessly exchange data as they are hosted on the same node through local read and write operations. 12 background machines relying on its fundamental Resiliant Distributed Dataset ( RDD ) data structure. An RDD represents an immutable, distributed collection of objects that can be processed in parallel. Each RDD is divided into logical partitions across the cluster and thus can be operated in parallel, on different nodes of the cluster. When a Spark parallel data processing application is submitted, the resource manager starts the driver, running the main() method of the application and generating both the logical and physical execution plans. More precisely, Spark converts the application into one or more jobs based on the presence of actions in the code. At a high level, each job is represented by a logical execution plan abstracting all the transformation steps, encoded as a DAG . A DAG consists of a set of 1) nodes representing computational stages, delimited by operations requiring data shuffling, comprising by one or more parallel tasks that apply the same operation over a different data partition, and 2) edges representing input/output dependencies between pairs of nodes, determining the order of execution and the extent to which stages can be executed in parallel. Many Spark applications often consist of tens or hundreds of stages characterized by a different number of parallel tasks with high volatility in duration and amount of data that they process. From the logical execution plan, Spark driver derives the the physical plan, a plan describing how the logical plan is going to be executed on the cluster. The driver directly coordinates with the cluster manager to request executors, representing computing processes, and schedule the execution of one or multiple tasks on each executor. The cluster manager usually spawns the executors within containerized Java Virtual Machines ( JVM s) on the worker nodes. During the initialization phase, known as cold start, each executor’s setup involves the following steps: 1) Downloading the container image if not present on the designated node, 2) Launching a new container, and then 3) Performing all the JVM -related operations, such as bytecode loading, heap allocation, and internal threads creation. The first task is launched as a thread once the JVM is ready. The driver includes several components, including the DAG Scheduler, the Task Scheduler, and the Backend Scheduler, all responsible for translating user-written code into jobs that are executed on the cluster. The default allocation strategy is to assign all available executors to stages in a First In First Out ( FIFO ) manner: given a queue of runnable stages, the first stage gets priority on all available resources, then the second stage gets priority, and so on. The number of executors held by each stage depends on the number of stage’s tasks. If a stage has fewer tasks than available executors, the scheduler allocates part of the available executors, allowing multiple independent stages to be executed concurrently. Contrarily, if a stage has more tasks than there are executors, all executors are assigned to the stage, and tasks are executed in multiple “waves”. The Spark scheduler faces two main scheduling decisions: 1) Deciding which stage(s) to run next from a set of runnable stages and 2) Deciding how many executors to assign to each runnable stage. Then, upon completion of a stage, the dependent child stages becomes runnable and are considered for scheduling. With 2.3 apache spark 13 Most Time-Consuming Job 68.2s 89.8s 145.5s2.3s173.6s 31.5s 173.8s 30.2s 54.7s28.9s 15.5s 6.7s 0.5s (a) Most Time-Consuming Job 68.2s 89.8s 145.5s 2.3s 173.6s 31.5s 173.8s 30.2s 54.7s 28.9s 15.5s 6.7s 0.5s (b) Figure 2.3: Application (a) sample execution schedule with dynamic allocation over a maximum of 5 executors, featuring two vCPUs each with a one-to-one core-task mapping (cold start are depicted in gray and the number of tasks are reported in parentheses), and (b) most time-consuming job DAG reporting the average job’s stages duration on 5sequential runs with different circle sizes. default allocation, during the course of application execution, the framework requests in realtime exponentially more executors in case of pending tasks waiting to be scheduled. If the queue of schedulable tasks is not drained in one second (default backlog timeout), then new executors are requested. If the queue persists for another second, then more new executors are requested, and so on. At each round the number of requested executors increases exponentially from the previous round until the upper bound, defined by the autoscaling property, is reached. The rationale for the exponential increase is twofold. First, executors should be initially added slowly in case the number of extra executors needed is small. Otherwise, more executors than the necessary ones could be requested, possibly leading to some executors not performing any work. Second, executors should be added quickly over time in case the maximum number of executors is very high. Otherwise, ramping up under heavy workloads will take a long time. While this exponential increase can facilitate the completion of an unexpected number of tasks, a notable latency exists in responding to additional executor requests, often requiring multiple requests before attaining the intended executor allocation. This circumstance raises the risk of either belated allocation or an exponential surplus beyond the required resources. Additionally, exponentially requesting new executors implies an increasing number of parallel application image downloads, which can lead to a lower image transfer speed due to increased network load. An example of application execution schedule, with the default dynamic allocation scheduling stages in FIFO fashion, is illustrated in Figure 2.3a. Initially, the scheduler assigns 1executor (minimum set) and then scales out to 5executors (maximum set) when tasks 14 background become backlogged. Among the executors, while the remaining executors experience an actual cold start, E4executor experiences a warm start since the application image is cached because the application driver has been previously placed on the same node. The application example comprises a small single-stage single-task job at the beginning, followed by a big time-consuming job (highlighted by vertical red lines in Figure 2.3a). As shown in Figure 2.3b, this most time-consuming job features a complex DAG composed of 13 stages with a variable number of tasks and duration. 2.4 optimization and learning methods In this section we present the optimization and Machine Learning ( ML ) methods used in this thesis, helping the reader to understand the last thesis contribution (Chapter 5). We consider the hill climbing search method and four ML methods, namely Linear Regression ( LR ), Bayesian Ridge Regression ( BRR ), Boosted Decision Stumps ( BDS ), and Dropouts Additive Regression Tree ( DART ) [64], to embrace historical knowledge to improve the heuristic search. Since the last contribution aims to provide real-time responses, we use the aforementioned four methods since they provide good tradeoff between response time and predictive performance. 2.4.1Hill Climbing The hill climbing algorithm is a widely used local search optimization method. The idea behind the method is to start at an initial neighbour and to attempt to improve the current solution (climbing the hill) by iteratively moving to neighbours that enhance the current solution until an optima is reached. The initial neighbour can be generated randomly or chosen based on some heuristic. Once a local optima is reached, no further improvement can be made with the current set of moves. The selection of the initial neighbour affects both the solution quality and the number of search steps needed to find the local optima solution. Hill climbing only guarantees optimal solutions for convex problems. In contrast, only local optima is guaranteed for the rest of the problems. Even though, in the context of this thesis, hill climbing only guarantees local optima solutions, it is a simple, effective, and intuitive algorithm that is easy to understand and represents a good choice for problems where a sufficiently good solution is needed quickly. 2.4 optimization and learning methods 15 2.4.2Linear Regression Linear regression is a fundamental statistical method used for modeling the relationship between quantitative variables. It identifies a linear relationship between one or more input variables (observed values) and the output variable (predicted value). The graphical intuition of linear regression is to find the best-fitting straight line through the known points that minimize the sum of the squared difference, called residuals of error, between the observed and predicted values. Thus, the model equation can be formalized as follows: y=β0+β1x1+· · · +βkxk(2.1) Here, y represents the output variable the model tries to predict, {x1,· · · ,xk} are the input variables the model observes, β0 is y-axis intercept, and {β1,· · · ,βk} coefficients are known as the regression coefficients and they represent the contribution of each input variable to the output value y . In the case of a single input variable, Equation (2.2) simplifies to the following linear equation: y=β0+β1x1(2.2) Linear regression is one of the simplest and most widely used techniques in predictive analysis in both ML and statistics. 2.4.3Bayesian Ridge Regression In traditional linear regression, the primary goal is to identify a set of parameters that minimize the sum of squared differences between the predicted and actual values. Thus, this method inevitably inherits the uncertainties in parameters estimation, potentially arising from data errors. BRR model addresses this inherent instability in the estimated coefficients and associated uncertainty in the model - commonly referred to as the multicollinearity problem - by incorporating a Bayesian approach. This model characterizes the distribution of the regression coefficients, typically opting for a Gaussian (normal) distribution, in contrast to the linear relationship between them assumed in classical linear regression. Consequently, the BRR model provides a more flexible and robust solution, particularly useful in scenarios with limited or noisy data. 2.4.4Boosted Decision Stumps Gradient Boosting ( GB ) [65] regression is an ensemble learning technique where multiple weak learners are combined to construct a strong learner. During the training phase, weak 16 background learners are added in an iterative process wherein the ensemble error guides the subsequent models’ creation. In other words, further iterations of the ensemble try to correct previous errors to produce more accurate estimates. This process iterates until a maximum number of iterations (models) is reached. Differently from GB , which typically employs decision trees as the weak learners, the BDS model utilizes decision stumps [66]. A decision stump is a simplified form of a decision tree, constrained to a single decision node and two leaf nodes containing the output values. Each decision stump tests a single input feature against a threshold, deciding the output value based on the test result. The training of each weak learner occurs sequentially, with increasing importance on misclassified instances from the previous iteration. Each decision stump is associated with a weight throughout the training process, giving more influence to decision stumps that perform well (with higher accuracy) on the training data. The boosting process continues for a specified number of iterations or until a certain level of accuracy is achieved. The final model prediction is determined through a weighted voting scheme, where each decision stump contributes to the final prediction in proportion to its assigned weight. 2.4.5Dropouts Additive Regression Tree The DART model is an extension of GB model, designed to address the problem of overspecialization. This problem arises when trees added at later iterations tend to impact the prediction of only a few instances, thereby making a negligible contribution to the final prediction of all the remaining instances. This makes the ensemble very sensitive to the decision made by the few, initially added trees. To deal with the over-specialization problem, the DART model adapts the dropout technique [67], originally proposed in the context of learning deep neural networks to mute random neurons to prevent overfitting, to an ensemble of decision trees. Specifically, at training time, DART introduces randomness by muting a random subset of weak learners, dropping out at least one complete tree when creating the model. This randomness results in a more robust ensemble, effectively mitigating errors introduced by previous trees. 2.5 applications To evaluate the thesis a diverse set of applications ranging from real-wold workloads to standard benchmarks that are representative for data analytics frameworks have been used. 2.5 applications 17 2.5.1Tesseract The Tesseract Optical Character Recognition ( OCR ) engine [68] is a highly accurate opensource OCR solution developed by Google. Originally created by Hewlett-Packard in the 1980s and later open-sourced in 2005, Tesseract has emerged as one of the most popular and widely used OCR engines globally, representing the current open-source state-of-the-art. It is designed to recognize printed text in images and convert it into a machine-readable format. Input images include scanned documents, photographs, and screenshots including text even with complex fonts and layouts. Document digitalization, data extraction, archiving and document management, and automated text recognition are examples of Tesseract use cases. With support for a multitude of languages — over 100 and expandable through language-specific training data — Tesseract proves to be a versatile tool for text recognition across diverse linguistic contexts. 2.5.2TPC-H The TPC-H [69] is an industry-standard decision support benchmark, featuring a set of business oriented ad-hoc queries and concurrent data modifications. The 22 queries and the data populating the database aim for broad industry-wide relevance, showcasing decision support systems, such as data warehouses, database, and Big Data systems, handling large volumes of data volumes to address to critical business questions. The benchmark randomly generates eight relational tables with a schema reflecting a typical data warehouse involving sales, customers, and suppliers. The benchmark employs relatively straightforward queries, suitable for sharding, avoiding tables pre-join and aggregation, utilizing singlecolumn indexes. Noteworthy, TPC-H has shortcomings include the linear scaling of non-fact tables, homogeneous data distribution, use of Third Normal Form ( 3NF ) rather than a star schema (common in this type of analytical workloads [70]), and the non-comparability of its handcrafted queries with the auto-generated queries of actual workloads [71]. Despite these limitations, the TPC-H benchmark remains widely cited, with hundreds of annual reference in the literature. 2.5.3TPC-DS The TPC-DS [72] is another industry-standard decision support benchmark, involving much complex queries using much wider tables when compared to previous TPC decision support benchmarks, such as TPC-H. More precisely, its tables are composed of up to 39 columns with domains ranging from integer, float (with various precisions), char, varchar (of various 18 background lengths) and date. Combined with a large number of tables (total of 25 tables and 429 columns) the schema gives both the opportunity of a realistic and challenging query set as well as an opportunity for innovative data placement algorithms and other schema optimizations, such as complex auxiliary data structures. Furthermore, the introduction of NULL values into any column except the primary keys opens yet another dimension of complexity compared to TPC-H benchmarks. TPC-DS generalized query model utilizes 99 query templates testing the interactive and iterative nature of On-Line Analytical Processing ( OLAP ) queries, the extraction of queries for data mining tools, ad-hoc queries, and the more planned behavior of well known reporting queries. The benchmark queries feature advanced SQL features, extensive filter predicates and functions, and diverse data scans. 2.5.4Terasort Terasort [73] is a widely recognized benchmark used to assess the performance of sorting large volumes of data in Big Data processing frameworks, especially within distributed computing settings. It was introduced as part of the Apache Hadoop project and has since become a standard benchmark for evaluating the efficiency and scalability of systems handling massive datasets. Terasort is specifically designed for execution on distributed computing frameworks like Apache Spark. The sorting of substantial datasets is a foundational task in data processing. In Big Data scenarios, efficient sorting massive datasets is crucial for a range of analytical, data mining, and processing tasks. Terasort operates on semi-structured data, consisting of key-value pairs, where keys are structured as strings while values are often unstructured or irrelevant to the sorting operation. An example of use case is a large-scale e-commerce company generating massive amounts of log data daily, which needs to sort this data based on timestamps to gain insights into customer behavior. 3 WORKLOAD SCALABILITY AND PERFORMANCE ANALYSIS This chapter describes the first contribution of this thesis. This contribution analyzes the data exchange mechanisms between functions in current open-source serverless platforms, considering function levels of parallelism, and proposes a performance model capturing the behavior of serverless workloads (Section 3.2). Furthermore, we present the use case and validation workload, along with its characterization, showing a methodology to extract the necessary components to translate a traditional monolithic application to a serverless application (Section 3.3). Then, we perform a bandwidth characterization of the different available communication mechanisms and evaluate the accuracy of the proposed performance model (Section 3.4). Finally, thanks to the flexibility of the proposed model, we investigate the performance impact on the use case workload of the following key factors: task granularity and concurrency, data locality, resource allocation, and scheduling policies (Section 3.5). 3.1 introduction The stateless nature of serverless computing initially limited its applicability to a subset of workloads, primarily encompassing simple real-world applications, e.g., web microservices and IoT applications. Nevertheless, the intrinsic resource-intensive and inherently parallel characteristics of data-intensive analytics applications suggest that this type of applications could highly benefit from the elasticity and the virtually unlimited scalability offered by serverless platforms. However, while the desirability and advantages of enabling more complex workloads in serverless environments are known, its feasibility and efficiency still remain unclear. There is a need to fully understand 1) data exchange mechanisms between functions in current serverless platforms, and whether new approaches are needed, and 2) data flows of these workloads, considering their levels of parallelism and resource requirements. Furthermore, being able to evaluate the data sharing impact on the workload execution and to choose the best storage configuration ahead of the actual porting, would save time and increase the overall workload performance. Aiming to understand the possible 19 20 workload scalability and performance analysis data exchange solutions and the impact of complex data flows in serverless environments, the main contributions of this work are: – A performance model capturing the performance characteristics of serverless workloads with data exchanges, supporting different configurations and models of exchanging data. – A complete characterization of a data-intensive workload, showing a methodology to extract the necessary components to translate a traditional application to serverless. – A comprehensive evaluation of data-intensive workloads in serverless environments, exploring parallelism, data exchange, resource allocation, and scheduling policies. 3.2 performance model The goal of the proposed model is to estimate the end-to-end performance of a non-trivial workload with data dependencies between the pipeline tasks, as if it was running in a data center on top of a Knative-based serverless environment. Since there is a significant emphasis on data, the model allows for different exchange mechanisms, including local memory, local storage, and remote storage. While some of these may not be supported or are limited in current serverless implementations, they can still be used to evaluate alternative solutions. The inputs of the model are: 1) hardware platform description, 2) scheduling strategy, 3) workload input, 4) workload graph, and optionally 5) bandwidth characterization. The hardware platform description (1) input provides the necessary information about the cluster machines’ memory and storage. For memory, it specifies the speed [MegaTransfers/s] and the data width [bits] necessary to compute the theoretical memory bandwidth (i.e., speed ×data_width/8 ) [Mbps], while for storage, the maximum transfer rate [Mbps] is reported. We have retrieved this information from the datasheets or, in the case of memory, inspecting the underlying system from the CLI (e.g., Linux dmidecode command). The scheduling strategy (2) input specifies the task-node assignments. The workload (3) input defines the input dimension, the total execution time, and the amount of data it contains. The workload graph (4) input specifies for each task its name, predecessor tasks names, inputs/outputs object names, compute time or profiling real percentage, parallelisms object with their possible degree of parallelism. With degree of parallelism we denote the number of concurrent task executions for a specific parallelism. Finally, the optional bandwidth characterization (5) input provides, for a set of data dimensions, the median read/write bandwidths for the three accounted data exchange mechanisms. If this last input is provided, the model returns a more realistic estimation; otherwise, it provides a best-case prediction by using the theoretical bandwidths. Given a pipeline composed of ntasks, each i-th task total time is composed of: the time necessary to read the input data Tr i , the compute time Tc i , 3.2 performance model 21 and the time necessary to write the output data Tw i . Given the i-th task exploits mlevels of parallelism, for each j-th level of parallelism, we denote with xi,j the number of sequential computations in case of no task replication and with pi,j the degree of parallelism. Therefore, xi,j pi,j represents the actual number of computations the task has to perform. In case of no concurrent execution, the model considers pi,j=1 . Thus, we derive the end-to-end pipeline time Ttot as: Ttot = n ∑ i=1" m ∏ j=1xi,j pi,j!(Tr i+Tc i+Tw i)#(3.1) where: Tr i= 3 ∑ k=1 ni ∑ s=0 Ds BWr k(Ds)!(3.2) Tw i= 3 ∑ k=1 no ∑ u=0 Du BWw k(Du)!(3.3) For example, in a text recognition workload, given a 6pages input ( xi,1 =6 ) with an average of 40 text lines ( xi,2 =40 ) each, if the i-th task has to perform its computation for each input page text line, it inherits m=2levels of parallelism. With a sequential execution, the i-th task total number of actual computations amounts to (6 1×40 1) = 240 , since pi,1 =pi,2 =1 . Differently, with a parallel execution computing 2pages ( pi,1 =2 ) and 5text lines ( pi,2 =5 ) concurrently, implying 2×5=10 i-th Task replicas, the model only considers the total number of actual computations of a single parallel replicas, i.e., (6 2×40 5) = 24. As shown in Equation (3.2) and Equation (3.3), to account for the three data exchange mechanisms, the model computes the read time Tr i and the write time Tw i as the sum of the ni inputs and no outputs partial communication latencies, computed by dividing the amount of data to be read/written D by the specific mechanism bandwidth BW . Bandwidths BW are functions of the amount of data D . If the bandwidth characterization input is given and the target data dimension D is not present in the set of benchmarked dimensions, the bandwidth BW is estimated by applying the linear interpolation method between the two data dimension points defining the interval containing the target data dimension, as described in Equation (3.4). More specifically, the method approximates the output bandwidth ˆ BW by generating a straight line between the bottom point (Db,BWb) and the top point (Dt,BWt), with Db<D<Dt, and taking the corresponding bandwidth value: ˆ BW(D) = BWb+ (D−Db)BWt−BWb Dt−Db (3.4) 28 workload scalability and performance analysis Local Memory Local Disk First Local Disk Next Remote Disk First Remote Disk Next Remote Disk SN Read Bandwidth [MBps] 0 250 500 750 1000 1250 1500 1750 2000 Data Dimension [Bytes] 1K 4K 16K 64K 256K 1M 4M 16M 64M 256M 1G (a) Read Local Memory Local Disk First Local Disk Next Remote Disk First Remote Disk Next Remote Disk SN Write Bandwidth [MBps] 0 100 200 300 400 500 600 700 800 900 1000 Data Dimension [Bytes] 1K 4K 16K 64K 256K 1M 4M 16M 64M 256M 1G (b) Write Figure 3.5: Memory and disk characterization. First and Next keywords highligh the first and subsequent local/remote disk bandwidths, while Remote Disk SN refers to remote operations with producer and consumer placed on the same node. Ethernet Controller. Physical nodes are connected through a 10Gbps Brocade VDX6740 network switch. The memory, the raid controller, and the disk feature 17GBps, 1.6GBps, and 175MBps of maximum transfer rate, respectively. 3.4.2Model: Bandwidth Characterization One of the model inputs is the characterization of the different communication mechanisms, i.e., local memory, local storage, and remote storage. In this characterization we want to capture the performance of the same complete stack that can be found in a serverless platform, and not just the performance of the devices. The experiments are based on two kinds of tasks: producer tasks writing data, and consumer tasks reading data. Focusing on solutions inside the same infrastructure, data can be shared by either using a local PV (local memory and storage), or a remote PV map on the NFS server (remote storage). The latter can also be used to simulate an environment similar to that of major public serverless providers. While it would be possible to run directly against a Google Cloud Storage or Amazon S3bucket, it is not considered in this characterization because the focus is on storage solutions inside the same infrastructure. We evaluate data exchanges of different sizes, ranging from 1KB to 1GB with a 4× increment. Figure 3.5shows the sequential bandwidths of the considered data exchange mechanisms. For both read and write operations, the local memory and the local disk (First) solutions exhibit similar performance. Thanks to the disk buffering computing infrastructure optimization, allowing to buffer data in main memory buffer cache space, the local disk read and write bandwidths reach a maximum of 3.4 evaluation of the model 29 535MBps and 602MBps, which are much higher than the 175MBps disk maximum transfer rate reported by the vendor. When a Task reads or writes data on a PV map on local disk, data are buffered in main memory buffer cache space, allowing to benefit from higher bandwidths compared to the disk ones. The actual dump on the disk is done periodically in background from the operating system. Differently, the remote data requests are handled by communicating directly with the disk. The only exception is when two tasks are co-placed: the producer task writes the data on the remote disk, while the consumer task reads from the memory buffer cache. We notice that in both local and remote solutions, when a task reads/writes multiple times sequentially on the same PV , e.g., a task collecting multiple data in input from various producers, the first operation and the following ones exhibit different bandwidths. More precisely, the subsequent local and remote read and write bandwidths are up to 4.41× and 2.14× , and 3.34× and 1.88× higher when compared to the first operations bandwidths, accordingly. The local disk bandwidth increase is due to caching, while, being the data read/written sequentially, the subsequent remote operations take advantage of the sequential locality at the hard disk level. Since the model is meant to handle many tasks running and sharing data at the same time, we also evaluate the performance degradation with concurrent requests. We characterize concurrent read and write bandwidths by manually enforcing the synchronization of the executed tasks. As expected, by increasing the number of concurrent requests, the single task bandwidth decreases, especially with high data dimensions. More specifically, with 30 concurrent tasks, the read and write bandwidth experience the highest performance degradation with a decrease of up to 4.60 × and 5.98 × , and to 26.72 × and 38.55 × , for local and remote operations, accordingly. 3.4.3Model: Accuracy To validate and measure the accuracy of the proposed model, we compute the average relative error of the inter-function I/O time prediction with respect to the actual communication overhead of 100 Tesseract-like deployment runs over two different input datasets, featuring 1and 10 pages, respectively. Following a classical black-box approach, with Tesseract-like deployment we mean a deployment where each task performs the same data exchanges described in 3.3.3, and sleeps during the specified time. To be fairer in the results, since compute time is constant and significantly larger than inter-function I/O time, we consider only the I/O time in the measurements. We run the Tesseract-like computations in two configurations: the first co-places all the tasks on a single node following the default Knative/Tekton strategy, while the second maps the tasks on the worker nodes in a round-robin fashion. These two configurations are referred to as local and remote. 30 workload scalability and performance analysis Table 3.2: Model accuracy. KPI Coarse-grained Fine-grained 1page 10 pages 1page 10 pages Local Avg I/O Time [s] 0.324 2.890 0.670 7.362 Pred I/O Time [s] 0.319 2.753 0.750 7.055 Avg Rel Error [%] 3.09 4.21 7.70 5.64 Remote Avg I/O Time [s] 1.189 9.303 5.388 49.938 Pred I/O Time [s] 1.099 9.283 5.579 53.813 Avg Rel Error [%] 6.90 3.64 5.61 7.42 To validate our model, we only consider sequential executions, representative of several real-world serverless applications [75,76]. We run exhaustive experiments with varying data dimensions and number of operations, and compare the I/O times with the model predicted values. In particular, we run the coarse-grained and fine-grained Tesseract-like workloads exploiting both local and remote storage configurations. As shown in Table 3.2, our model predicts communication latency with an average relative error of 5.52% , which we believe is accurate enough to analyze the I/O time impact when porting a workload to Knative/Tekton. 3.5 evaluation of data-aware serverless Thanks to the flexibility of the proposed model, we investigate the performance impact on the use case workload of the following key factors: task granularity and concurrency, data locality, resource allocation, and scheduling policies. 3.5.1Task Granularity and Concurrency Task granularity and concurrency are two relevant factors that could highly increase or reduce performance in terms of number of deployed task-instances and overall end-to- end time. Finding the optimal task granularity and concurrency becomes crucial when moving to serverless. Figure 3.7shows the effect of different granularities and concurrencies on the number of deployed task-instances and the end-to-end time in local and remote deployments on a 10 pages input with 100 text lines each. As shown in Figure 3.6, given the three levels of parallelism, i.e., at per-page, per-block, and per-textline level, we find that the page parallelism always improves the end-to-end time, while the block parallelism negligibly impacts the performance and the text line parallelism have similar end-to-end times for concurrency ranging from 25 to 100. For this reason, while the coarse-grained (CG) solution exploits page parallelism, the fine-grained (FG) solution exploits different degrees of parallelism at per-page level, no block parallelism, and up to a degree of parallelism of 25% 3.5 evaluation of data-aware serverless 31 Page Block Text line End-to-End Time Speedup 0 1 2 3 4 5 Unrolling Factor [%] 025 50 75 100 Figure 3.6: End-to-end time speedup versus the sequential execution, achieved by applying the three different levels of parallelism. for the text line parallelism. The fully-parallelized coarse-grained deployment increases the number of task-instances from 5to 32 and achieves an end-to-end time speedup of 4.57× and 3.44× , for local and remote deployments, respectively. The fully-parallelized fine-grained deployment significantly increases the number of task-instances from 11 to 812, achieving a speedup of 6.79× and 4.24× , accordingly. For similar configurations (depicted as circles in Figure 3.7), coarse-grained deployment outperforms fine-grained deployment, especially in the remote configuration where it achieves up to 1.55×of performance increase. On the other hand, fine-grained executions achieve higher speedups, but at the expense of number of tasks and I/O. This needs to be considered because the number of tasks may be limited in local configurations, and I/O may become a bottleneck in remote configurations. In the remote configuration, the network load changes substantially: with fully-parallelized coarsegrained deployment it reaches 1.4GB, while it grows up to 15.6GB with fully-parallelized fine-grained deployment. 3.5.2Data Locality The local deployment outperforms its equivalent remote deployment in both coarse-grained and fine-grained scenarios, as shown in Figure 3.7. However, fully local deployments are not realistic for many applications, particularly in large clusters where remote deployments may be more flexible and improve overall throughput and resource usage. A shortcoming of existing serverless frameworks is that tasks that are co-placed on the same node and share the same inter-function data (e.g. functions that read the same input) do not currently benefit from data reuse. That is, each instance of a function on the same node will fetch the same inter-function input data. Enabling data-intensive serverless workloads will likely require some optimizations in this regard. Creating a local memory or disk buffer holding the shared input data might be a simple way to benefit from data locality, decreasing requests for remote data, and improving its performance. 32 workload scalability and performance analysis CG 1p CG 5p CG 10p FG (1p, 1t) FG (1p, 25t) FG (5p, 1t) FG (5p, 25t) FG (10p, 1t) FG (10p, 25t) End-to-End Time Speedup 0 1 2 3 4 5 6 7 Task-Instances 0200 400 600 800 (a) Local CG 1p CG 5p CG 10p FG (1p, 1t) FG (1p, 25t) FG (5p, 1t) FG (5p, 25t) FG (10p, 1t) FG (10p, 25t) End-to-End Time Speedup 0 1 2 3 4 Task-Instances 0200 400 600 800 (b) Remote Figure 3.7: End-to-end time speedups versus the sequential execution, achieved by exploiting page- and textline-level of parallelism (p, t), and Task-instances number. (a) highlights the local deployment, while (b) highlights the remote deployment reporting network load impact with increasingly bigger symbol sizes. 3.5.3Resource Allocation In an ideal serverless environment, the user should not need to provide any resource configuration. However, existing frameworks still allow customizing expected resource usage for improved performance and cost. In case of no customization, frameworks usually default new tasks with predefined amount of CPU and memory (i.e., 100m of CPU and 128MiB of memory), leaving the Task to use more resources if available, up to the default limits (i.e., 2CPU and 1GiB of memory). With the default resource allocation, tasks underutilizing the assigned resources could prevent other tasks from being scheduled, leading to worse overall system throughput. This is particularly relevant for many data-intensive workloads since tasks belonging to the same pipeline may have significantly different resource requirements, and these can also change depending on the input. For example, focusing exclusively on memory for the sake of simplicity, we get approximately 31GiB of allocatable memory in each one of the worker nodes in the evaluation environment. Each Tesseract execution amounts to 150MiB on average, with a peak of 167MiB, in the first two-thirds of its execution and 90MiB in the last one-third. In a coarsegrained scenario, and allocating the same peak memory of 167MiB (see Section 3.3.3) to all 5tasks, we would be able to fit up to 38 Tesseract deployments per node. With a more accurate allocation of 150MiB, 167MiB, 150MiB, 90MiB, 90MiB for each one of the five tasks, we would be able to fit up to 49 Tesseract deployments. 3.5.4Scheduling Policies Most of the schedulers proposed in the literature consider properties such as CPU usage, memory utilization, job execution time, and job deadline. Another essential factor to consider 3.6 related work 33 when optimizing data-intensive task placement is the effect on the network. By leveraging on the proposed model, we highlight the primary importance of data locality in reducing communication overheads by showing the impact on the overall end-to-end time of four different scheduling strategies: (1) random, (2) round-robin, (3) consolidating, and (4) datacentric. The first two are self-explanatory. The consolidating strategy places tasks at per-node level in a sequential fashion, saturating the resources available for each node. The data-centric strategy aims to reduce inter-node data movements, considering the number and amount of data to be shared and exchanged between functions. For the use case workload, the datacentric strategy maps for the coarse-grained scenario the processMultipageTIFF,Pre-Processing and Processing tasks on the same node. For the fine-grained scenario, instead, the set of tasks computing the same page and belonging to the pre-processing and processing phase are co-placed, while spreading the remaining ones randomly. This allows to reduce the communication overhead by exploiting the higher local bandwidths for the most relevant data movements, and to reduce the number of remote data exchange. Figure 3.8shows the performance achieved by the four strategies when simulating the execution of 50 pages input on a 100 nodes cluster, with a degree of parallelism of 50% and 100%. It is noticeable that the random and round-robin performance are similar, and that they are outperformed by both the consolidating and data-centric strategies. In particular, the consolidating strategy achieves an I/O time speedup of 4.32×and 3.40×in the coarsegrained scenario, and of 1.49× and 1.16× in the fine-grained scenario, for 50% and 100% degrees of parallelism, respectively. The data-centric solution gains an I/O time speedup of 2.62 × and 2.35 × in the coarse-grained scenario, and of 1.84× and 1.48× in the fine-grained scenario, for 50% and 100% degree of parallelism accordingly. The coarse-grained workload deployment is composed of 77 and 152 tasks for 50% and 100% degrees of parallelism, respectively; its consolidating placement performs better than the data-centric solution because it relies on fewer nodes, i.e., one or two. Differently, the fine-grained workload deployment comprises a much higher number of tasks, i.e., 2027 and 4052; therefore, the data-centric solution impact on the network load is lower than the consolidating solution. More specifically, the data-centric achieves a 1.23× and 1.27× of performance improvement versus the consolidating strategy, for 50% and 100% degrees of parallelism, respectively. While the consolidating solution sequentially maps tasks, the data-centric one efficiently places all the tasks characterized by the page-level parallelism as a unit, reducing the communications over the network. 3.6 related work A big challenge when deploying data-intensive workloads on serverless computing platforms is efficiently sharing data between tasks. Several works in the literature have proposed 34 workload scalability and performance analysis Random 50% Round-Robin 50% Consolidate 50% Data-Centric 50% Random 100% Round-Robin 100% Consolidate 100% Data-Centric 100% End-to-End Time [s] 0 50 100 150 Workload Scenario Coarse-grained Fine-grained 4.32x 2.62x 3.40x 2.35x 1.49x 1.84x 1.16x 1.48x Figure 3.8: Comparison of the considered scheduling policies when simulating the execution of a 50 page input on a cluster with 100 nodes. Horizontal bars divide computational time (bottom) and inter-function I/O time (top). relaxing disaggregation to favor performance. [77] proposes the “fluid multi-resource disaggregation” concept, where the platform can fall back on disaggregation as needed, but can also move resources around to enhance proximity, meaning co-locating code with the data it accesses. Similarly, [78] proposes the so-called “fluid code and data placement” in which the infrastructure should have the ability to selectively co-locate code and data on the same side of a network boundary, whether done via caching/prefetching data near computation or pushing computation closer to data. The same work claims that this feature is not provided in a meaningful way by today’s serverless frameworks. In the past years, there have been many proposals to orchestrate distributed computing running on serverless [79–83], but only a few focusing on storage [37,84,85]. The majority of the works present in the literature are built on top of AWS Lambda, as the two discussed in the following, which more relate to the proposed work. In [37], the authors propose Locus, a serverless model for the most general all-to-all shuffle scenario that combines cheap but slow storage with fast but expensive storage, achieving 4 × -500 × performance improvements over baseline, and at the same time being close to or beating Spark’s query completion time by up to 2 × . The work shows that, with only slow storage, sorting 100TB of data, a hash-based shuffle would be 500 × slower than the current record, while with only fast storage, supporting a much higher throughput, the cost would become prohibitive. Locus accurately predicts shuffle performance, with an average error of 15.9%. When compared to Locus, being much more general, our model predicts, with higher accuracy, the performance of an entire workload deployment, exploiting fast local storage as much as possible. [84] highlights the relevance of efficiently communicate data between functions via a shared data store in analytics workloads on serverless platforms. The work analyzes three different storage systems, i.e., a disk-based managed object storage service, an in-memory key-value store, and a Flash-based distributed storage system. In particular, the authors show that S3 has significant overhead, particularly for small requests, achieving a throughput of up to 3.7 summary 35 70MBps for requests of 10MB or larger. Similarly, by characterizing an NFS -based remote shared storage, we show that it also introduces significant overheads for small requests while achieving higher throughput at scale. To be in line with the serverless abstraction, in this work, we only account for fully-managed storage solutions, as in-memory key-value stores and flash-based storage would require the user to either select instance types with the appropriate memory, compute and network resources, or to manually configure and scale their storage cluster resources, respectively. To the extent of our knowledge, our work is the first analyzing the storage solutions and modeling the data-sharing performance within the serverless Kubernetes-base ecosystem. 3.7 summary This work analyzes in detail the feasibility and efficiency of running more complex workloads, such as data-intensive analytics workloads, within serverless environments. More precisely, we fully understand data exchange mechanisms between functions in current opensource serverless platforms, emphasizing that communication latency through shared object storage represents the main bottleneck in scenarios involving more complex workloads. To address this, we introduce a performance model accurately predicting the data-sharing performance with an average relative error of 5.52%. This performance model accounts for how data is shared between functions, considering not only the amount of data but also the underlying technology employed. Such model enables the assessment of data-intensive analytics workloads in terms of task granularity and concurrency, data locality, resource allocation, and scheduling policies. Our evaluation shows that task granularity and concurrency are pivotal factors that could highly reduce or increase performance in terms of overall end-to-end time and number of deployed task-instances. For similar configurations, coarse-grained deployment outperforms fine-grained deployment, achieving an end-to-end time speedup of up to 1.55× . On the other hand, when considering varying parallelism configuration, fine-grained executions achieve higher speedups (from up to 4.57× to up to 6.79× ), but at the expense of number of tasks (from 11 to 812 tasks) and I/O (from 1.4GB to 15.6GB). We also show that, when fixing the amount of resources, a more accurate resource allocation strategy allows to fit 49 workload instances per worker node, an increase of 11 instances compared to the default resource allocation. Finally, we show that the data-sharing time for such complex workloads can reach a speedup of up to 4.32× , depending on how the workload is deployed and scheduled. This work gave us valuable insights on research directions towards optimizing the performance of serverless environments when executing complex data-intensive analytics workloads. 36 workload scalability and performance analysis 3.8 publications The contents of this contribution are summarized in the publication: [86]Anna Maria Nestorov, Jordà Polo, Claudia Misale, David Carrera and Alaa S. Youssef, “Performance Evaluation of Data-Centric Workloads in Serverless Environments.” In Proceedings of the 14th International Conference on Cloud Computing (CLOUD). IEEE, Chicago, IL, USA, 2021, pp. 491-496,10.1109/CLOUD53861.2021.00064 4 DIRECT INTER-FUNCTION COMMUNICATION ENABLEMENT This chapter describes the second contribution of this thesis. This contribution tackles the problem of centralized object storage, leading to highly inefficient workload executions when directly using serverless platforms to run data-intensive analytics workloads. To cope with this, we propose Floki, a system enabling direct data communication between non-colocated functions, allowing to efficiently run data-centric analytics workloads in open-source serverless environments (Section 4.2). We prototype our proposed solution and our experimental evaluation (Section 4.3) shows the effectiveness of the proposed solution to overcome state-of-practice shared object storage high latency accesses and to execute data-intensive analytics workloads efficiently in terms of end-to-end latencies and resource usage impact. 4.1 introduction Major serverless platforms [4–6,46] take disaggregation to an extreme, imposing functions to exchange data only through shared object storage. In the context of data-intensive analytics workloads, represented as DAG sand characterized by a considerable intermediate data transfers, shared object storage becomes a bottleneck for efficient inter-function communication due to its high-latency access. Indeed, as demonstrated in [37], directly using a serverless platform for data-intensive workloads leads to highly inefficient executions. The slow data transfers between functions make the CloudSort benchmark [87] to be up to 500 × slower when executed on AWS Lambda [4] with S3instead of on a cluster of VMs. Recent studies tackle this problem by implementing optimized exchange operators [4,38], using multi-tier storage combining slow with fast storage or solely remote in-memory storage [37,85,88], exploiting per-node caches [89,90], co-locating functions on a single container [91–94], handling external storage on long-running VM s[16,95,96], or circumventing the network constraints [97]. However, these methods either use domain-specific optimizations, require two copies of data over the network, are not fully transparent to the user, break the advantage of fine-grained scaling, or use non-serverless components. 37 44 direct inter-function communication enablement Pipe Socket Pipe Socket Transfer Time [s] 0 20 40 60 80 100 120 Resource Usage [KB] 0 200 400 600 800 1000 Buffer Size [KB] 4 8 16 32 64 128 256 512 Figure 4.3: Average transfer time (left-hand side legend) and resource usage (right-hand side legend) for 16GB of data with pipe and socket buffer sizes ranging from 1to 128 pages (4KB to 512KB). object storage, outside the Kubernetes cluster but inside the infrastructure, is considered in the experiments as shared storage. In-memory key-value stores, such as Redis [99] and Memcached [100], are not considered since they require users to select instance types in terms of network, compute, and memory resources to satisfy their application requirements, and to explicitly provision resources. This requirement breaks the serverless hassle-free management fundamental principle. Furthermore, these in-memory storage solution usually re-introduce always-on infrastructure, severely limiting the benefits of serverless. Finally, while cloud providers offer in-memory storage instances based on Memcached or Redis, they are not fault tolerant and do not auto-scale as do serverless computing platforms (not matching the real flexibility demands of such platforms [3,82]. The master runs in a Linux-based VM with 32GB of memory, 16 virtual cores, and 100GB of disk space, while the workers run in a Linux-based VM with 128GB of memory, 16 virtual cores, and 200GB of disk space each. The MinIO server runs bare-metal on a node featuring an Intel ® Xeon E5-2620 CPU running at 2.00GHz, interfacing with two 1.6TB Intel ® DC P3608 SSDs through NVMe. The VM sare synchronized in the millisecond range. The Kubernetes cluster is mapped on 8physical nodes residing in the same rack and featuring either an Intel ® Xeon Silver 4114 CPU running at 2.20GHz or an Intel ® Xeon E5-2630 v4CPU running at 2.20GHz. In the first case, nodes are connected to four Seagate ® ST2000NM0033-9ZM; in the second case, nodes are connected to four Seagate ® ST2000NM0055-1V4104. Physical nodes are connected through a 10Gbps Brocade VDX6740 network switch. Memories and disks feature 17GBps, 19GBps, 175MBps, and 249MBps of maximum transfer rate, respectively. The experimental evaluation reports average results computed over 10 sequential runs for reliability. 4.3.2Pipe and Socket Buffer Sizes Analysis In this analysis, we want to analyze the impact of different buffer sizes on fixed-size data communication over pipes and sockets and find the optimal buffer sizes. The experiments are based on two types of functions: a producer function writing data in packets on a channel 4.3 experimental results 45 and a consumer function reading data in packets from a channel. The evaluation considers different buffer sizes, ranging from 1system page, i.e., 4KB, to 128 system pages, i.e., 512KB, with the kernel imposed constraint of a power-of-two increment 1 . The lower range limit, i.e., 1system page, represents the size for which the kernel guarantees pipe writes operations to be atomic. Within Floki, a data-pipe is of exclusive use of a single producer at a time; thus, the pipe buffer size can be increased without affecting writes operations atomicity. Figure 4.3shows the average transfer times of a 16GB data object with different pipe and socket buffer sizes, and the related resource usage. Note that the socket resource usage is always twice the corresponding buffer size: TCP allocates twice the requested buffer size and uses the extra space for administrative purposes and internal kernel structures. While the difference between the pipe and socket transfer times is significant for small buffer sizes, the transfer times are comparable for big buffer sizes. In particular, as highlighted in Figure 4.3,16 system pages buffer size, i.e., 64KB, represents the optimal size, reducing and balancing the pipe and socket transfer times. Increasing the buffer size would provide comparable transfer times while using more resources. Therefore, the following experiments and evaluations consider a buffer size of 16 system pages. 4.3.3Performance Evaluation We conduct a series of experiments to evaluate the performance of Floki in terms of end- to-end times. Targeting data-intensive analytics workloads, the evaluation considers data sizes ranging from 1MB to 16GB with a 2× increment. The object storage end-to-end time, representing the baseline, considers two time components: the function time to write data from the object storage, and the function time to read data from the object storage. Differently, Floki end-to-end time considers three time components: the function time to write on the local buffer on the producer side, the time to transmit the data on the network, and the function time to read data from the local buffer on the consumer side. To measure the end-to-end times, we register the timestamp before each producer function starts to write data and the timestamp after each consumer function finishes reading data. Thus, given Nproducers and Kconsumers functions with TSpi and TScj as their timestamps, we derive the end-to-end time TE2Eas: TE2E=max(TSc1, .., TScK)−min(TSp1, .., TSpN)(4.1) 1 A power-of-two increment is a constraint set by the kernel when allocating the pipe buffer size: given a requested buffer size x, the kernel allocates the next higher power-of-two page-size multiple of x. 46 direct inter-function communication enablement As Equation (4.1) shows, the end-to-end time TE2E accounts for possible not fully concurrent operations by considering the minimum of the producers timestamps TSpi and the maximum of the consumers timestamps TScj. Analyzing Floki end-to-end time components, i.e., write, network, and read times, we find that the network component dominates the end-to-end time. More specifically, local write and read times are in the tens of milliseconds range, while the network times are in the range of hundreds of milliseconds. As writers and readers functions are sequentially executed, the network component is highly affected by the underlying orchestrator overhead of creating, scheduling, and initializing the readers functions pods. With the data size increase, this almost constant overhead becomes negligible because the read and write time components, ranging from tens to thousands of seconds, tend to dominate the end-to-end time. While the overhead is visible in the one-to-one pattern, it is hidden in the remaining patterns by the object storage performance degradation. With multiple writers and readers, in the proposed volume-based solution, each writer/reader exclusively operates on its local PV ; instead, with object storage, the writers/readers access the shared storage Contrarily to a naïve solution relying on shared object storage, producers and consumers functions are deployed and run concurrently. The benefits of the volatile data share are more visible with small data sizes, i.e., from 1MB to 256MB, for which a higher performance increase is obtained. It is worth noting that, since data objects are read sequentially from the consumer functions, with multiple producers, functions using Floki gain smaller performance than those achieved with a single producer. Floki reduces the end-to-end time up to: 74.95× in the one-to-one pattern; 25.34× , 15.83× , and 24.83× in the fan-out pattern; 10.11× , 10.18× , and 7.49× in the fan-in pattern; 9.99× and 8.11× in the all-to-all pattern. Overall, considering the impact of Floki in terms of end-to-end time, the most significant time-savings are reached with a data size of 16GB, featuring the largest data transfer latency. In particular, the higher time reductions are achieved in the 1to6pattern, where communication latencies are reduced from 753s to 260s on average. In other words, Floki allows saving 8.22 minutes on data sharing latency over the object storage baseline requiring 12.55 minutes. 4.3.4Resource Usage Evaluation Resource usage is crucial in serverless environments, where resources are billed with a pay-as-you-go model. We want to estimate and compare the resource usage of Floki to the object storage solution, representing the baseline, in the four considered patterns, i.e., one-to-one, fan-out, fan-in, and all-to-all. To assess the gap of resource requirements between varying data sizes, we choose two extreme cases just for comparison, i.e., 1MB and 16GB. In the following, DS represents the data size, T the total amount of functions composing the 4.3 experimental results 47 1to2 1to4 1to6 Fan-Out Speedup (log) 1 2 3 4 10 20 29 2to2 3to3 1M 2M 4M 8M 16M 32M 64M 128M 256M 512M 1G 2G 4G 8G 16G All-to-All Speedup (log) 1 2 3 4 5 8 10 Data Size [Bytes] 2to1 4to1 6to1 Fan-In Speedup (log) 1 2 5 10 1to1 One-to-One Speedup (log) 1 5 10 30 60 Figure 4.4: Floki’s end-to-end speedups over the object storage solution in the analyzed distributed systems patterns. specific pattern, P and C the number of producers and consumers functions, and PBD and SBD the pipe and socket local buffer sizes (i.e., 64KB and 128KB), accordingly. The object storage resource usage estimation does not consider the necessary internal buffers to write and read the data object/file since their sizes are negligible compared with the analyzed data sizes. Being the object storage shared among the different functions, we derive the related resource usage RUObjStorage as: RUObjStorage = (P∗DS)D(4.2) The required disk space is proportional to the number of producers functions P . Therefore, from a resource usage perspective, there is no difference among the patterns composed 48 direct inter-function communication enablement Table 4.1: Resource usage and saving on 16GB data size. Num. Producers Num. Consumers Object Storage Floki Usage [GB] Usage [KB] Saving 1 1 16 384 43,691 1 2 16 704 23,831 1 4 16 1,344 12,483 1 6 16 1,984 8,456 2 1 32 704 47,663 4 1 64 1,344 49,932 6 1 96 1,984 50,738 2 2 32 1,280 26,214 3 3 48 2,688 18,725 of the same number of producers and a different number of consumers. For instance, the fan-in pattern with three producers and one consumer would require the same disk space as the all-to-all pattern with three producers and three consumers. Differently, Floki represents a significantly less expensive resource usage solution. Considering only the memory space needed to hold the local buffers to perform the pipe and socket operations, we derived Floki resources usage RUFloki as: RUFloki = (T∗PBD +2∗P∗C∗SBD)M(4.3) We evaluate Floki resource usage following the presented analysis. By applying Equations (4.2) and (4.3), the resource-saving is evaluated by dividing the resource usage of the object store baseline for the Floki resource usage. For example, when sharing 1MB, Floki saves 1MB 384KB =2.67× of resources compared to the baseline. As Table 4.1shows, Floki always demands a significantly lower amount of resources compared to the object storage solution. More precisely, each function composing the workflow only requires 64KB of memory for the pipe buffer (PBD) and 128KB for each client/server socket buffer (SBD), allowing significant resource-saving scaling linearly with the data size increase. For example, considering the simple one-to-one pattern ( P=1 and C=1 ) on 16GB, while the object storage requires 16GB of disk space, Floki only requires 2∗64KB +2∗1∗1∗128KB =384KB of memory space, allowing a 16GB/384KB =43, 691× of resource-saving. The achieved resource-saving on 16GB differs from the corresponding 1MB saving by a factor of 16, 384× , equivalent to the difference between the two data sizes. Overall, Floki achieves up to 50, 738× of resource-saving, translating into a memory allocation of roughly 1.9MB instead of an object storage allocation of 96GB. 4.4 discussion 49 4.4 discussion Envisioning Floki as part of Knative and Kubernetes-based workflows frameworks, we discuss the made assumptions and their integration limitations. In particular, the missing features relate with interfaces, fault-tolerance, multi-tenancy, data recovery, and integration with such frameworks. 4.4.1Assumptions Floki requires two inputs: the functions-nodes mapping and the workload DAG describing the workload pipeline. In the currently available computation frameworks, the workload DAG is provided by the user in the form of a configuration file (e.g., JSON file) [101,102], in the form of a high-level description [103], or derived by the framework [104–106]. In our scenario, an immediate solution requires the user to supply the workload DAG . However, this could be a solution for coarse-grained pipelines with a small number of functions but challenging for complex pipelines with a large number of functions. Further steps are required to either facilitate the DAG specification or to remove the user from the loop. Instead, the mapping between functions and cluster nodes can be easily retrieved by inspecting the Kubernetes scheduler. 4.4.2Interface and Application Data Endpoints Floki currently requires the application to write data into a local binary “file” or a pipe. Given the current POSIX write function implementation, writing a file in a local file system is a straightforward process for the application, while writing a pipe requires reading and writing data in batches. Adapting an application would require substituting such write functions with looped writes, where a simple library function provided as API could interface such change without changing the programming model. Furthermore, processing data batches is performed sequentially, while enhanced write functions could perform the operations both in a sequential and a parallel fashion, increasing throughput. Finally, in scenarios where data is processed as streams, additional write functions could be provided for transmitting and computing concurrently, processing batches upon arrival at the consumer. 4.4.3Fault-Tolerance, Multy-Tenancy, and Data Recovery Fault-Tolerance, multi-tenancy, and data recovery represent crucial attributes of cloud and serverless computing. Floki needs more effort to be fault-tolerant. Hard multi-tenancy, 50 direct inter-function communication enablement enforcing strict tenant isolation, in Kubernetes environments can be achieved through complex namespaces, resource quotas, access control, and virtual cluster configuration, and Floki indirectly guarantees security in a multi-tenant environment. Concerning data recovery, in case of a component failure, intermediate data must be re-computed by re-running the entire workflow. However, in data-intensive workloads, re-computing data would imply an additional overhead, which scales linearly with the function computation complexity. Re-computing only failed functions could lower the overhead; thus, we believe per-function data recovery deserves further investigation. 4.4.4Porting on Kubernetes-based Workflow Frameworks and Knative Even though Floki is currently at its first maturity stage, we target to port the proposed solution to Kubernetes-based workflows frameworks and Knative. To integrate Floki with Knative, two main features are required. First, following the underlying orchestration platform feature, it is necessary to enable Knative functions to mount local volumes. Second, on top of the existing Knative Custom Resource Definitions ( CRD s) providing sequential and parallel functions invocations, a more general workflow CRD has to be built. While porting Floki to Knative is more complex, the porting on Kubernetes-based workflows frameworks, e.g., Argo, would only require to automatically create the system components. 4.5 related work As we previously introduced, efficient intermediate data sharing between functions represents a key challenge for chained function execution, especially when dealing with data-intensive workloads [7,16,19,23,85,95]. In recent years, different approaches have been proposed to optimize data exchange in serverless workflows. Lambada [34] and Starling [38] are serverless distributed data processing frameworks reducing the remote shared storage overhead by implementing exchange operators specifically optimized for cloud object storage. However, these works focus solely on database analytics, using domain-specific optimizations. Locus [37] is an analytics system combining cloud object storage with managed in-memory storage to overcome the performance limitations of shared storage while remaining costefficient. The system applies a performance model to guide users in selecting the type and the amount of storage to achieve the desired cost-performance trade-off. Pocket [85] provides specialized and autoscaled distributed data stores for intermediate data sharing combining three storage tiers: a DRAM, a Flash, and an HDD tier. The authors show how the key goals of low-latency/high-throughput, storage resource sharing, and resource elasticity can be achieved by strictly decoupling control, metadata, and data planes. However, technologies 4.5 related work 51 like Locus and Pocket leverage per-workload resource demand information, provided by the user at submission time, to allocate and reserve resources for the workload lifetime. Different from these works, our pipe-based solution does not need any information on resource demand. As shown in [37,88,107], intermediate data sizes can consistently vary during the workload execution, resulting in the well-understood problem of potential performance degradation and/or resource under-utilization [108,109]. To cope with this, Jiffy [88] is an elastic far-memory system allocating memory resources at the granularity of small fixed-size memory blocks—multiple memory blocks store intermediate data for individual tasks within a job. All these works involve indirect communication, demanding two serial data copies over the network in the critical path: one from producer function to shared storage and one from shared storage to consumer function. Contrarily, Floki always requires only one data copy for each inter-function communication (from source to destination node). Crucial [89] improves inter-function data sharing in highly-concurrent applications by building a Distributed shared objects ( DSO s) layer implemented on top of a modified Infinispan [110] in-memory data grid. Cloudburst [90] achieves logical disaggregation and physical co-location of computation and state by exploiting per-node data caches interacting with a specialized key-value store service [111,112]. Unfortunately, the authors do not provide details on how the node caches are provisioned and sized, which indicates the necessity of manual/static provisioning of per-node cache resources. Similarly, OFC [113] exploits the co-location of functions and states to benefit from per-node caches and proposes an in-memory caching system distributed over the cluster nodes, leveraging RAMCloud [114]. However, it relies on a storage backend service and focuses on objects of 10MB or less. SAND [91] reduces data sharing latency by executing multiple functions in a workload as separate processes within long-lived containers where data are shared using a messagepassing service exploiting data locality. SONIC [115] is a data-passing manager selecting the optimal data sharing method for each inter-function communication. It adopts a hybrid approach by sharing files within a VM (VM-Storage), copying files across VM s(Direct-Passing), or sharing files through shared storage (Remote-Storage). Even though our volume-based and SONIC’s Direct-Passing data-passing methods are similar, we proactively start copying data from source to destination node immediately after producer function termination, while SONIC waits for consumer function to be scheduled to start copying data. While works mentioned above allow workload functions to span across multiple nodes, Faasm [92] and Nightcore [93] co-locate workload functions on a single container to minimize data sharing latency thanks to shared memory access. The difference between these two works relates to the isolation strategy they leverage to provide private memory partitions. Following the same approach, Faastlane [94] also executes workload functions as threads within a single process of a container instance. It further identifies opportunities for function 52 direct inter-function communication enablement parallelism and concurrently executes parallel functions in fork processes or new container instances. While OFC, SAND, SONIC, and Faastlane represent fully transparent solutions, Crucial, Cloudburst, Faasm, and Nightcore require modifications at the application level. Even though container sharing systems improve data sharing efficiency, memory overprovisioning is necessary to ensure containers run multiple functions and extra services for concurrent executions during peak usage. Moreover, posing restrictions on function placement affects the advantage of fine-grained scaling of serverless. Other works [16,95,96] rely on long-running VM sto handle external storage. For example, Cirrus [16] is an end-to-end framework specialized for ML training in serverless cloud infrastructures using large VM instances to run a custom storage backend through which intermediate results are shared. These works require additional infrastructure using nonserverless components and add complexity and cost to scale the VM sto match elasticity and function parallelism. Finally, the work which most relates to Floki is Boxer [97]. Boxer has recently improved Lambada [37] by enabling inter-function direct network communication using conventional TCP connections. The authors overcome the limit preventing functions to accept incoming connections by deploying with the function code the Boxer sub-systems, executed alongside each function, establishing connections by exploiting the sequential and parallel TCP hole punching protocols [116,117]. Differently, Floki establishes TCP connections on the host namespace; therefore, it does not require deploying additional connection-specific components in the serverless platform. Besides, Boxer sends buffers asynchronously, while Floki sends buffers synchronously. 4.6 summary In this work, we presented Floki, a data forwarding system tackling the shared object storage problem by implementing direct inter-function communication between non-coplaced functions. Floki proactively establishes point-to-point communication channels between producer-consumer pairs of functions through fixed-size memory buffers, pipes and sockets. The designed memory mechanism’s resource utilization scales linearly with the data volume increases, allowing to effectively deal with arbitrary data sizes within a paradigm where resources are billed with a pay-as-you-go model. Even though Floki is currently in its initial stage of maturity, with this work we demonstrate that direct inter-function communication is crucial for executing data-intensive analytics workloads in serverless platforms. We benchmark Floki on the principal distributed systems communication patterns, i.e., one-to-one, fan-out, fan-in, and all-to-all, considering data transfers from 1MB to 16GB. The evaluation reveals remarkable improvements achieved by Floki over the object storage solution. In particular, Floki shows up to 74.95× of end-to-end time performance increase, reducing the 4.7 publications 53 largest data sharing time from 12.55 to 4.33 minutes. Moreover, Floki requires up to 50, 738× fewer disk resources, which translates into a memory allocation of roughly 1.9MB instead of an object storage disk space allocation of 96GB. These findings underscore the potential of Floki to significantly enhance the end-to-end time performance and resource utilization efficiency when executing data-intensive analytics workloads in serverless environments. 4.7 publications The contents of this contribution are summarized in the publication: [118]Anna Maria Nestorov, Josep Lluís Berral, Claudia Misale, Chen Wang, David Carrera, and Alaa Youssef. 2022. “Floki: a proactive data forwarding system for direct inter-function communication for serverless workflows.” In Proceedings of the 8th International Workshop on Container Technologies and Container Clouds (WoC ’22). Association for Computing Machinery, New York, NY, USA, 13–18.10.1145/3565384.3565890 60 automatic performance-cost efficient resource allocation Stage1 Stage3 Stage5 Stage 7 Cost [$] 0.01 0.10 0.20 0.30 0.40 Runtime [s] 0 200 400 600 800 Parallelism Level 1 5 10 15 20 25 30 (a) Long running stages. Stage2 Stage6 Stage9 Stage10 Cost [$] 0 0.05 0.10 0.15 Runtime [s] 0 100 200 300 Parallelism Level 1 5 10 15 20 25 30 (b) Medium running stages. Cost [$] Stage4 Stage6 Stage11 Stage12 0 0.03 0.06 0.09 Runtime [s] 0 20 40 60 80 100 120 Parallelism Level 1 5 10 15 20 25 30 (c) Short running stages. Figure 5.2: Influence of scaling parallelism level on performance (bottom) and cost (top) at per-stage level. Red dashed vertical line reports the TPC-H q21 query saturation point, while the remaining lines reports its stages saturation points. performance-cost saturate at 1executor, representing a twelfth of the application-level saturation point. Finally, we conduct a task runtime analysis for the most time-consuming stages, to investigate how the inherited overheads affect runtime when scaling the number of executors. Figure 5.3depicts the Cumulative Distribution Function ( CDF ) of individual tasks for one of the most time-consuming stages, i.e., Stages1of TPC-H q21 query. We make two fundamental observations. First, scaling the number of resources leads to a significant task runtime increase: while with 1executor 90% of the tasks complete in less than 3.1s with a maximum of 6.9s, with 30 executors 90% of the tasks finish within 13.5s, reaching a maximum of 32.4s. When scaling-out, the shuffle operations and the garbage collection increase, degradating performance in terms of latency. Moreover, increasing the number of executors implies a higher number of tasks belonging to the first wave, which usually show a higher task runtime due to higher transfers of data shared across all stage’s tasks (e.g., broadcast variables and task binaries), possible initializations and loading of additional libraries. Second, the task runtime variance significantly increases with the number of executors. Therefore, fine-tuning the amount of resources at per-stage level is crucial to avoid under- and over-provisioning, thus preventing waste of resources for negligible performance gains. This enhances the overall resource efficiency, increasing the number of workload instances deployable on a fixed amount of resources. To highlight the effects of varying parallelism levels on runtime and cost and to motivate the necessity of a fine-grained per-stage resource allocation, we conducted an analysis of the impact of increasing resources, i.e., number of executors and therefore number of parallel tasks, at different granularities: at application (Figure 5.1), stage (Figure 5.2), and task (Figure 5.3) levels. During this analysis, we incrementally compared the runtime and 5.3 system design 61 2122232425 Task Runtime [s] (log) 0.0 0.2 0.4 0.6 0.8 1.0 CDF 1 Executors 5 Executors 10 Executors 15 Executors 20 Executors 25 Executors 30 Executors Figure 5.3: Influence of scaling parallelism level on performance at per-task level. cost at sequential parallelism levels and identified the saturation points, or optimal scale factors, where runtime speedup turns out to be lower than the respective cost increase beyond the assigned resources. 5.3 system design This section details Dexter, a resource allocation manager constantly monitoring each application stage execution and automatically allocating the right amount of resources at a fine-grained level, guaranteeing efficient resource usage. Dexter is a significant departure from the majority of the works present in the literature, which rely on either reactive or predictive approaches. Instead, Dexter combines these approaches to tune the parallelism level of each application stage independently. Figure 5.4shows the block diagram of the proposed system architecture. At a high level, Dexter continuously monitors each stage’s performance and cost throughout its execution. We emphasize that Dexter is designed to be performance-cost-centric. Targeting a good Return Of Investment ( ROI ), if the stage performance-cost tradeoff deviates, Dexter adjusts the resource allocation, optimizing for total runtime cost. Furthermore, to increase resource utilization, once the agent assigns resources to all stages, if there are still free resources, the system reassigns them to the running stages in order of stage priority. In what follows, we first detail Dexter’s major components (Section 5.3.1), then we describe the lifecycle of an application in our optimized serverless Spark system (Section 5.3.2), and finally we discuss the system fault tolerance (Section 5.3.3). 5.3.1Key Components Dexter consists of three major components: the historical module, the search module, and the custom executor allocation manager. While the first two compose the Dexter’s scaling agent, 62 automatic performance-cost efficient resource allocation Table 5.1: Models prediction error and error distribution. KPI BDS DART LR BRR MAE 1.60 1.64 1.61 1.62 Max Error 6 6 7 7 Error ≤2 72.77%70.50%75.00%74.32% Error ≤156.59%53.18%55.36%56.45% which is external to Spark, the last one extends Spark to dynamically allocate and remove executors based on the scaling agent’s decisions. The proposed enhanced Spark architecture, highlighting Dexter’s components, is depicted in Figure 5.4. 5.3.1.1Historical Module This section details our approach for the historical module as an ML regression problem for estimating the initial amount of resource allocations for a given application stage. The key observation for this module is that different Spark application stages may present similar resource scalability needs (as highlighted in Section 5.2), enabling the use of ML to learn from past executions to predict the initial resources for the current stage. The historical module does not require user-provided information and only relies on stage attributes known up front to the stage execution (compile-time) to optimize the stage performance cost. We aim for 1) Providing a good enough estimate so the search module can refine it with minimum iterations (minimizing the total runtime) and 2) Bounded response times in the order of a few milliseconds for each sample. In this section, we compare four regression models needing low computation to achieve good enough predictive performance, namely LR,BRR,BDS, and DART (briefly presented in Section 2.4). The input to the model is a set of features describing a stage (e.g., total count of tasks, size of all RDD in bytes, and number of each RDD type). We collected a dataset of 182 input samples by running all the 22 queries composing the TPC-H benchmark, and we log features for each query stage along with the optimal number of allocated executors as determined by Algorithm 2. After cleaning constant input features, the resulting dataset contains the following six informative features: Number of tasks, Input RDDs total size, Number of MapPartitionsRDDs, Number of ShuffleRowRDDs, Number of ZippedPartitionsRDDs, and Number of FileScanRDDs. Model error drives the model selection since a high error in initial resource allocation estimations may disturb the search module convergence. We split data at the query level and use Leave One Out Cross-Validation ( LOOCV ) to compare the error of each model with different data partitions. Each cross-validation iteration leaves one query out for testing and trains the model on the remaining 21 queries. The process is repeated 22 times and ensures the collection of diverse results for each model. As shown in Table 5.1, the evaluated models 5.3 system design 63 DAGScheduler SparkAppDriver TaskSetManager CustomExecutor AllocationManager submitTaskSets {exId} TaskScheduler updateNum ExsTarget getInitialPoint {stage features} {(exId, taskId)} {(exId, taskId)} CoarseGrained SchedulerBackend (exId, taskId) taskStatus CoarseGrained ExecutorBackend predSL Historical Module (optSL, optSLT, optSLC, candSL) ScalingAgent doSearchStep (RTInfo, currSL) Search Module 2 6 3 9 Application submitJob 1 revive Offers {exId} 78 5 setInitial Resources 11 1312 14 15 4 10 16 updateNum ExsTarget Figure 5.4: Dexter’s system architecture showing new components in light blue and modified components with dotted rectangles. demonstrate comparable performance in terms of Mean Absolute Error ( MAE ). Given the limited discriminative power of this metric in model selection, we further examined the maximum error and the proportion of cases with errors at or below 2and 1. Despite LR and BRR achieve better rates of errors ≤2 , we prefer models with lower maximum error since they make the search module deviate less from the optimal. Comparing BDS and DART , BDS provides slightly better percentages of errors ≤1 . Thus, we deployed BDS to provide initial resource estimations to the search module, selecting the model tested on TPC-H q8query since it represents the query with the highest number of stages. 5.3.1.2Search Module The search module is responsible for handling imperfect resource predictions of the historical module by fine-tuning each stage parallelism level. Specifically, its main target is twofold. First, it handles imperfect resource prediction of the historical module, potentially leading to either under- or over-estimation of resources. Second, it constantly monitors each stage’s performance and cost metrics throughout its execution, and, in case the performance-cost tradeoff deviates, it adapts the number of allocated resources towards the new optimal scaling level. Algorithm 2shows the pseudo-code of the proposed search module, with the top-function represented by the doSearchStep function. Each TaskSetManager invokes the search module on a periodic cycle, calling the doSearchStep function, potentially adjusting the stage allocated resources at each cycle. 64 automatic performance-cost efficient resource allocation During each function call, the search module compares the optimal solution found so far ( optSL ) with the current solution ( currSL ). More precisely, the module initially estimates the expected runtime and cost for the current scaling level (lines 22 and 23). Given nMissTasks missing tasks to compute for a given stage and SL available executors, each one computing ExvCPUs tasks in parallel, the number of missing task waves tWaves is determined as: tWaves =nMissTasks SL ×ExvCPUs (5.1) The module derives the expected time E[T] by multiplying the number of missing task waves, computed using Equation (5.1), by the average task runtime observed so far (line 2). The expected cost is then determined by adding up the two costs associated with the two different components defining each Spark executor, i.e., the allocated amount of vCPUs ExvCPUs and memory ExGBs resources (line 8). Specifically, to compute each cost component (lines 6and 7), the module multiplies the expected time (expressed in hours) by the pricing per hour for the serverless Spark components, the number of resources, and the number of executors assigned to the stage. If Dexter is performing the first search step, the search module gets the the current optimal solution (set to the current scaling level due to reassignment of free and active executors), the optimal solution predicted by the historical module and the current solution, and returns a new candidate solution, along with the optimal information (lines 24-27). Otherwise, it computes the performance (line 28) and cost variation values (line 29) achieved by the current solution over the optimal one found so far. At this point, in case we are increasing resources (lines 31-37), the doSearchStep function checks if a good return of investment characterizes the current solution by comparing the performance and cost variation values (line 32). Suppose the current solution represents a better neighbouring solution than the currently known optimum solution (condition in line 32 is true). In this case, the current solution becomes the new optimum solution (line 33), and the module updates its expected runtime and cost information (lines 34 and 35). Otherwise, if the current solution does not represent an improvement, it is rejected, and the optimum solution remains unchanged. Contrarily, in case we are decreasing resources (lines 37-45), we compute the performance slowdown and the corresponding cost reduction (lines 38 and 39). If the performance decrease is smaller than the cost reduction (condition in line 40 is true), the module sets the new optimum solution to the current solution (line 41) and updates its expected runtime and cost information (lines 42 and 43). Then, based on the current optimum solution ( newOptSL ), the module picks a new candidate neighbour (line 46). When selecting the new candidate, we consider the possible reassignment of free and active executors aimed at increasing the overall system resource utilization. Specifically, when we are decreasing the current amount of allocated resources (condition in line 12 is true), we search in the lower range with respect to the current solution towards the optimal solution (lines 13-14). 5.3 system design 65 Algorithm 2Dexter’s search module algorithm. 1:function computeExpTime(currSL,nMissTasks,avgTaskTime) 2:E[T] = lnMissTasks currSL×ExCPUs m×avgTaskTime 3:return E[T] 4:end function 5:function computeExpCost(currSL,E[T]) 6:E[CCPU] = E[T] 3600 ×Price1vCPU/h ×ExCPUs ×currSL 7:E[CMem] = E[T] 3600 ×Price1GB/h ×ExGBs ×currSL 8:E[C] = E[CCPU] + E[CMem] 9:return E[C] 10:end function 11:function getCandidate(newOptSL,optSL,currSL) 12:if |currSL −optSL|>stepSize and optSL <currSL then 13:lowerBound = getMax(1,newOptSL -stepSize) 14:searchRange =[lowerBound,newOptSL −1] 15:else 16:searchRange =[newOptSL +1, newOptSL +stepSize] 17:end if 18:cand = selectRandValIn(searchRange) 19:return cand 20:end function 21:function doSearchStep(nMissTasks,avgTaskTime,optSL,E[T]opt,E[C]opt,currSL) 22:E[T]curr =computeExpTime(currSL,nMissTasks,avgTaskTime) 23:E[C]curr =computeExpCost(currSL,E[T]curr) 24:if E[T]opt == 0.0 then 25:candSL =getCandidate(currSL,optSL,currSL) 26:return (optSL,E[T]curr,E[C]curr,candSL) 27:end if 28:perfVar =E[T]opt E[C]curr 29:costVar =E[T]curr E[C]opt 30:newOptSL =optSL 31:if optSL <= currSL then 32:if perfVar > costVar then 33:newOptSL =currSL 34:E[T]opt =E[T]curr 35:E[C]opt =E[C]curr 36:end if 37:else 38:perfSlowDown =1−perfVar 39:costRed =costVar −1 40:if perfSlowDown <costRed then 41:newOptSL =currSL 42:E[T]opt =E[T]curr 43:E[C]opt =E[C]curr 44:end if 45:end if 46:candSL =getCandidate(newOptSL,optSL,currSL) 47:return (newOptSL,E[T]opt,E[C]opt,candSL) 48:end function 66 automatic performance-cost efficient resource allocation We then select and return a random value in the selected search range (lines 18 and 19). This condition is verified when, to increase resource usage, executors previously used in parent stages that have become free are allocated to the current stage. Contrarily, we randomly select a value in the upper range (lines 16). This design decision aims to increase resource utilization: if at the previous search step we have set the candidate to N executors, testing a smaller number of executors M , i.e., M<N , would imply leaving N−M resources idle, lowering the overall resource utilization. Finally, the module returns all information related to the current optimum solution, along with the newly candidate solution (line 47). 5.3.1.3Custom Executor Allocation Manager This component dynamically allocates and removes executors based on the scaling agent decisions. In particular, it maintains a changing target number of executors, periodically syncing to the underlying cluster manager. Every running stage TaskSetManager checks the equivalence between the agent-suggested candidate and the current scaling level, and it requests to increase or decrease the target if necessary. More precisely, increasing the target number of executors happens when the candidate exceeds the currently allocated executors. When the target number of executors increases, the amount of requested resources to the cluster manager can vary. If there are enough available active executors, there is no need for new resources, and the custom executor allocation manager assigns the missing executors to the given stage from the pool of free and active executors. Otherwise, it assigns all the active executors, if any, to the stage and requests the missing ones to the cluster manager. Differently, decreasing the target number of executors happens when the candidate scaling level is more than the currently allocated resources, meaning that fewer resources are sufficient to handle the current load. In this case, even though the target number is lowered, none of the executors are killed immediately. The executor is killed only if it has been idle for a certain amount of time, by default 60s, meaning that the current running stages run efficiently with the currently allocated resources. 5.3.2Execution Lifecycle When a new application is deployed, Spark launches the application driver on one of the cluster nodes. The driver assumes the pivotal role of coordinating the entire application’s execution across the worker nodes within the cluster. Among the driver’s components, the DAGScheduler is a crucial element since it represents the high-level scheduling layer. When presented with a new application (step 1), the DAGScheduler computes the DAG of stages, keeping track of RDDs, tasks, and stage outputs, 5.3 system design 67 and submitting stages as TaskSets. Each TaskSet contains a collection of fully independent tasks computing the same function on different data partitions. Before submitting a stage, the DAGScheduler sets its initial scale level by inspecting the historical module via a gRPC call, i.e., getInitialPoint, forwarding the stage main features (step 2), identified as detailed in Section 5.3.1.1. It receives the predicted optimal scaling level based on historical knowledge (step 3). It then sets the stage scaling level to the predicted optimal scaling level and automatically requests resources to the custom executor allocation managerbefore the TaskSet is run (step 4). In turn, the custom executor allocation manager checks the number of free and active executors and forwards the request for new resources to the cluster manager only if there are not enough free resources. Then, the DAGScheduler submits the stage TaskSet to the TaskScheduler (step 5). Upon the submission of a new TaskSet with specified stage parallelism N , the TaskScheduler assesses the number of free and active executors and takes one of the following two actions: 1) Assigns N active executors to the TaskSet if there are more than N available, or 2) In case there are fewer than N active executors, it assigns the available ones (if any) and submits a request for new executors to the underlying resource manager through the CoarseGrainedSchedulerBackend (step 6). For every new schedulable TaskSet, and whenever the TaskScheduler has tasks ready for scheduling, such as upon task completion, the TaskScheduler requests the list of active executors (steps 7and 8) to the CoarseGrained- SchedulerBackend, charged to coordinate and communicate with the underlying resource manager. If only one active TaskSet exists, the TaskScheduler makes all active executors available to that TaskSet. Conversely, if multiple active TaskSets are enqueued, the TaskScheduler allocates executors following the default stage priority order (step 9). Every TaskSetManager schedules the tasks within a single TaskSet across the allocated executors, closely monitoring every task’s progress until all tasks have been completed successfully, regardless of the number of task attempts. Specifically, it schedules the set of tasks, assigning them to the set of active executors, and returning pairs in the form of (taskId, executorId). These pairs mappings are then returned to the CoarseGrainedSchedulerBackend through the DAGScheduler (steps 10 and 11), which is notified that the subset of tasks has been started. Finally, the CoarseGrainedExecutorBackend launches tasks on executors as specified in the pairs mappings (step 12). After the task has been launched, it receives every task status update from the CoarseGrainedExecutorBackend (step 13). Throughout the entire stage execution, using a dynamic time interval, function of the current stage average task runtime, the TaskSetManager calls the proposed search module through a doSearchStep gRPC call, exploring the search space with an additional step (step 14). The search module carries out this search step and returns the optimal scaling level, with its related expected runtime and cost information, as well as a new candidate scaling level (step 15). At this point, the TaskSetManager resets the stage task average runtime to zero 68 automatic performance-cost efficient resource allocation Master Executor Executor Executor Executor Executor Executor Executor Executor Driver Executor Executor Executor Executor Executor Executor Executor Executor Executor Executor Executor Executor Executor Executor Executor Executor Workers Figure 5.5: System implementation overview. and the search module is not called again until all the new executors are up and running and, starting from this point in time, the optimal time interval is not expired. This allows the system to collect accurate tasks information about the tasks execution over the new amount of resources. In case the candidate scaling level, candSL , exceeds the current scaling level, currSL , it contacts the custom executor allocation manager, which sets the overall target number of executors accordingly and requests currSL −candSL new executors to the underlying resource manager (step 16). After resetting the task average runtime, the TaskSetManager does not call again the search module until all new executors are up and running and within the optimal time interval, ensuring accurate task execution information collection across the expanded resources. This allows indirectly Dexter to consider both provisioning latencies and executors’ cold start times in its decision-making. 5.3.3Resiliency and Fault Tolerance Failures in large and complex distributed systems are inevitable and can happen for many reasons, e.g., network unreliability, so fault tolerance plays a crucial role in preventing system-wide outages. Because Dexter is based on Remote Procedure Call ( RPC ) offering built-in features that allow clients to retry failed calls automatically, Dexter is by design resilient to failures. Therefore, the system is capable of continuing to operate in the face of outages. Specifically, RPC offers multiple patterns to overcome RPC failures: 1) Retrying a failed RPC ,2) Rerouting traffic to a healthy service, and 3) Adding a fallback path. We have instructed the Spark scaling agent client to automatically retry failed g RPC calls with a maximum number of call attempts of ten, including the original attempt, and a maximum backoff delay between retry attempts of five seconds. 5.4 system implementation 69 Stage1 (0.329s) Stage2 (1.979s) Stage3 (3.091s) MAE [Executor] 0 5 10 15 Time Interval [s] 1 2 3 4 5 6 7 8 9 1011 121314151617181920 Figure 5.6: Time intervals performance of different stages, with varying average task runtime (within round brackets), when scaling intervals from 1s to 20s. Optimal values are reported with a black circle, while not valid time intervals (lower than the average task runtime) are reported with not filled circles. 5.4 system implementation We have implemented a complete Spark system integrating Dexter with all components detailed in Section 5.3.1. Figure 5.5shows the overall system implementation overview. Kubernetes, representing the de facto standard for deploying and managing containerized applications in cloud environments, serves as underlying resource manager for Spark. Our scaling agent is implemented relying on g RPC [132], a modern, high-performance, open-source universal RCP framework, accepted to CNCF in 2017. The scaling agent server side was implemented in approximately 150 lines of Python, and the client side required roughly 30 lines of Scala. Additionally, the protobuf [133] file defines the protocol buffer messages and services in around 20 lines. Adaptations to Spark’s DAGScheduler, TaskScheduler, TaskSetManager, and Stage required roughly 50,100,150, and 50 lines of Scala, respectively. About 1500 lines of Scala were needed to implement the custom executor allocation manager. To store input and output data, we have deployed a MinIO server [98], a high-performance Kubernetes-native object storage tailored for large-scale systems. 5.5 system evaluation This section presents a comprehensive evaluation of Dexter. After presenting the baseline algorithms (Section 5.5.1) and the experimental setup (Section 5.5.2), we first analyse the impact of different search time intervals on the final solution accuracy (Section 5.5.3). Second, we discuss the end-to-end performance of Dexter, highlighting the performance-cost tradeoff and the obtained resource usage efficiency (Section 5.5.4). Third, we analyse the accuracy 76 automatic performance-cost efficient resource allocation Runtime Slowdown [times] 1.0 1.5 2.0 2.5 3.0 3.5 Dynamic FIFO Dynamic FAIR (a) Runtime slowdowns. Cost Saving [times] 1.0 1.5 2.0 2.5 3.0 3.5 Dynamic FIFO Dynamic FAIR (b) Cost savings. Performance-Cost Efficiency [times] 1.0 1.5 2.0 2.5 3.0 3.5 Dynamic FIFO Dynamic FAIR (c) Performance-cost efficiencies. Resource Saving [times] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 Dynamic FAIR Dynamic FIFO (d) Resource savings. Figure 5.11: Dexter’s (a) runtime performance, (b) cost savings, (c) performance-cost efficiencies, and (d) resource savings when running the 99 TPC-DS queries with 100GB input data. DS involves more complex queries compared to TPC-H ones with advanced SQL features, extensive filter predicates, and diverse data scans, Terasort represents a real-world workload used by most of the existing serverless analytics systems [37,89,135,136,138]. Furthermore, given the notable diversity in datasets often observed in serverless environments, we extend our analysis to include Dexter’s adaptability to dataset variations. Regarding TPC-DS, Figure 5.11 depicts the distribution of Dexter’s runtime performance, cost savings, performance-cost efficiencies, and resource savings in comparison to the two baselines. As shown in Figure 5.11a, on the one hand, Dexter presents a median runtime slowdown of 1.33× (interquartile range: 1.27× to 1.38× ) compared to the dynamic FIFO baseline. Similarly, when compared to dynamic FAIR baseline, Dexter exhibits a median runtime slowdown of 1.34× (interquartile range: 1.28× to 1.38× ). On the other hand, as shown in Figure 5.11b, Dexter demonstrates notable cost savings compared to the two baseline. More precisely, when compared to the dynamic FIFO baseline, Dexter enable a median cost saving of 2.41× (interquartile range: 2.30× to 2.56× ). High cost savings are achieved also in the case of dynamic FAIR baseline, where Dexter allows a median cost saving of 2.40× (interquartile range: 2.31× to 2.54× ). When considering the unbiased composite performance-cost efficiency metric presented in Figure 5.11c, Dexter achieves a median efficiency increase of 1.79× (interquartile range: 1.69× to 1.96× ). When compared with the dynamic FAIR baseline, Dexter presents a median efficiency increase of 1.77× (interquartile 5.5 system evaluation 77 Table 5.2: Runtime and cost of the five most compute-intensive queries from TPC-DS benchmarks. Query Dynamic FIFO Dynamic FAIR Dexter Runtime[s] Cost[$] #Exs Runtime[s] Cost[$] #Exs Runtime[s] Cost[$] #Exs q14a140.89 0.5339 50 131.47 0.5521 50 169.56 0.2324 22.5 q23b153.92 0.6366 50 139.18 0.6283 50 184.91 0.2953 23.3 q67 189.34 0.6717 50 188.09 0.6482 50 207.68 0.2546 14.9 q72 133.94 0.5091 50 124.24 0.4925 50 154.45 0.2459 20.5 q78 126.91 0.5666 50 125.53 0.5621 50 170.72 0.2138 16.7 range: 1.67× to 1.90× ). While increasing significantly performance-cost efficiencies, Dexter allows a median resource saving of 3.40× (interquartile range: 2.99× to 3.73× ), as presented in Figure 5.11d. We selected the top 5most time-consuming TPC-DS queries, namely, q14a, q23b, q67, q72, and q78. Table 5.2shows the end-to-end runtime and cost when running the five most time-consuming queries with the two considered strategies. The corresponding performance-cost tradeoff and the achieved resource savings are shown in Table 5.3. While Dexter slightly increases the runtime by a factor ranging from 1.10× to 1.34× , it achieves monetary savings ranging from to 2.08× to 2.65× . Similarly to what we have done with TPC- H queries in Section 5.5.4, we analyze the benefit in terms of additional deployable instances under various constraints. With 100 executors, the proposed solution deploys from 2.15× up to 3.36× more query instances than the baseline dynamic resource allocation with FIFO scheduling, resulting in a maximum of 100 19.9 =6 deployable instances instead of 100 50 =2 . When the time window is fixed at one hour, our solution deploys, on average, 1.20× fewer instances, i.e., 4less instances, compared to the baseline. Finally, when constrained by a monetary budget of 100$, Dexter deploys 2.37× more instances of average, which translates in 233 more workload instances. When running Terasort, Dexter demonstrates a remarkable enhancement in cost efficiency, achieving a cost reduction of up to 2.39× . Moreover, the performance-cost efficiency is significantly increased by up to 1.93× , alongside notable resource savings of up to 2.3× . These improvements are achieved while observing a slight increase in runtime, with a maximum factor of 1.26×. Dataset changes affect runtime and cost, which are considered in Dexter’s decision-making process. This is evidenced by differences in TPC-H and TPC-DS benchmarks, using different datasets (8and 22 tables), with TPC-DS queries exhibiting significant variability in data scan ranges. Moreover, experiments with Terasort further underscore Dexter’s adaptability to dataset changes, including shifts in data models, such as from structured relational data models to semi-structured ones. Our sensitivity analysis underlines the Dexter adaptability to both workload and dataset changes, establishing its usefulness in optimizing resource allocation for previously unseen workloads. 78 automatic performance-cost efficient resource allocation Table 5.3: Efficiency and resource savings evaluation of the five most compute-intensive queries from TPC-DS benchmarks. Query Dynamic FIFO / Dexter Dynamic FAIR / Dexter Efficiency Resource Saving Efficiency Resource Saving q14a 1.91×2.22×1.81×2.22× q23b 1.79×2.15×1.61×2.15× q67 2.41×3.36×2.28×3.36× q72 1.80×2.44×1.60×2.44× q78 1.97×2.99×1.93×2.99× 5.5.7System Overhead Evaluation In this evaluation, we discuss the system overhead in terms of time necessary to fit the historical module model and to perform the model inference when determining the initial stage parallelism level. We also discuss the time taken to perform one search step when finetuning the parallelism level during stage computation. The reported times in the remainder of this evaluation represent end-to-end latency: we compute the latency as the difference between the registered timestamp prior to each agent call and the timestamp immediately following the reception of the corresponding response. Regarding the initial parallelism level prediction, the time needed to fit the parameter model utilizing BDS on a batch of 182 stages known at compile-time is, on average, 19.12ms with a single thread. Aiming at understanding the impact of training delay in a multi-tenant cloud-like scenario, with a dataset scaled up to 18,200 rows (two orders of magnitude larger), the training would take an average of 19.12ms×102=1, 912ms≈2s. We want to emphasize that the training delay is small enough to seamlessly execute model retraining on the fly, even at per-minute granularity. The time required for the one-time per-stage prediction of the initial parallelism level averages to 15.87ms. For a single row, the prediction complexity of using BDS amounts to O(n) , where n is the number of decision stumps, since each decision stump is evaluated in constant time c ( O(n∗c) = O(n) ). In the search module, the average delay for each search step amounts to 5.65ms. Since the overall search time for a given stage strictly depends on the number of performed search steps, which in turn depends on the average task runtime, to assess the impact of search delay we consider the three different stages discussed in Section 5.5.3, featuring an average task runtime of 0.329s, 1.979s, and 3.091s, respectively. During stage execution, the agent is invoked once, twice and four times, translating into a median total search latency of 5.5ms, 6.5ms, and 26.5ms, accordingly. Therefore, we assert that Dexter’s performance-cost effective resource allocation imposes negligible overhead on the final stage execution time. 5.6 related work 79 5.6 related work Resource allocation in modern cloud data centers has been extensively investigated in the literature. However, directly applying existing work on VM sto serverless Spark is challenging. The key factors preventing this translation are: 1) The number of instances spawned is significantly higher in serverless than the one for VM s(10s for VM s,100s for serverless), and 2) Fitting the executors following a consolidating strategy goes against the concept of hardware disaggregation, at the base of the serverless paradigm. Existing cloud service providers’ production systems, such as Google Borg [139], and open source systems, such as Google Omega [140], typically provide configuration parameters to control the resource allocation process. Since the manual configuration setting requirement breaks the free-of-management serverless principle, we do not consider these solutions in this chapter. Focusing on the resource allocation problem for big data analytics frameworks, in the following, we discuss the work related to Dexter, classifying existing solutions into three main families: analytical model-based, heuristic-based, and ML -based schedulers. A detailed summary of the existing work is presented in Table 5.4. 5.6.1Analytical Model-based Schedulers OptEx [123] builds a closed-form performance model that decomposes the application completion time into smaller, logically distinct phases, leveraging profiling information. Based on the performance models, the authors identify the application’s cost-optimal resource allocation required to satisfy a specific deadline with the minimum number of resources. Justice [124] estimates the resources that applications need to meet deadlines from historical application execution traces and implements admission control and resource allocation. It also automatically adapts to workload variations to provide sufficient resources for each job to meet the deadline. 5.6.2Heuristic-based Schedulers Quasar [125] is a cluster manager that maximizes resource utilization while meeting userdefined performance and QoS high-level specifications. Given the cluster state at any point in time, combining a small profile of information from the application itself with historical data on previously scheduled applications, it applies collaborative filtering to determine the least amount of available resources necessary to meet such user specifications. In [51], the authors present Morpheus, a system designed to automatically derive periodic application SLOs and resource models from resource-usage historical data, relying on 80 automatic performance-cost efficient resource allocation recurrent reservations and packing algorithms, to place containers, minimizing cluster resource usage cost. Moreover, Morpheus dynamically adapts to changing conditions at runtime and reprovisions applications accordingly to mitigate inherent performance variance due to changes, for example, in application input or failures. AutoPath [126] leverages the application DAG information to identify parallel paths and adaptively allocates computing resources to each path during runtime based on the estimated demand. Resource allocation is triggered every time a new stage is launched. The authors estimate the total execution time of each path by analyzing runtime statistics of the average transformation time between RDDs in every parallel path, adjusting resources accordingly. 3Sigma [127] observes the importance of relying on full distributions of relevant runtime history for each job, rather than just a point estimate derived from it, to make more robust decisions. Based on this observation, the authors propose a cluster scheduling framework that employs Mixed-Integer Linear Programming ( MILP ) for bin-packing applications on available resources. AdaptiveConfig [128] is a runtime configuration tuning framework for cloud cluster schedulers. The framework automatically adapts to workload changes by comparing performance discrepancies of different configurations and identifying the best configuration to satisfy the latest mix of jobs’ resource demands. 5.6.3ML-based Schedulers ML models interact with the environment to learn the optimal behavior without a priori knowledge and can solve complex problems, such as resource allocation, accounting with uncertainty. Decima [120] makes use of Deep Reinforcement Learning ( DRL ) to automatically learn application-specific scheduling algorithms. Specifically, it employs a graph neural network to convert the states’ information concerning the application DAG and cluster nodes’ status into embedding vectors. These embedding vectors are then used as input to a policy network to concurrently select the next stage to schedule and the related application parallelism level. Noteworthy is the authors’ design decision to abstain from exploiting fine-grained stage-level parallelism. This decision stems from the need to trade-off between the granularity of control and model training complexity. By restricting parallelism control at the application level, Decima reduces the action space of scheduling policies that must be explored and optimized during training. AutoToken [121] predicts the peak resource usage of recurring big data applications. It first groups applications based on their recurring signatures and then makes use of different per-signature linear models, one for each recurring job group identified, to scale resources for each application appropriately. AutoExecutor [39] predicts the executor counts based on a parametric model analyzing the price-performance trade-off, trained using Random Forest ( RF ) regression algorithms. The features used for the parametric model include characteristics of both the application 5.6 related work 81 Table 5.4: Overview of related work and comparison with this work. Work Year Objectives Cluster All Workload DAG Knowledge Deadline Awareness Profiling Free Training Frequency Exp. Setup Granularity Level Parallelism Level Perf. Cost Nodes Unbound Size A.M. [123]2016 ✓ ✓ heterogeneous ✓ ✗ ✗ ✓ ✗ - up front cluster application static [124]2017 ✓ ✗ homogeneous ✗ ✓ ✗ ✓ ✗ - up front simulation application static Heuristics [125]2014 ✓ ✓ heterogeneous ✗ ✓ ✗ ✓ ✗ -up front, perf. not met cluster application dynamic [51]2016 ✓ ✓ homogeneous ✓ ✗ ✗ ✓ ✓ -up front, perf. not met cluster application dynamic [126]2017 ✓ ✗ homogeneous ✗ ✓ ✓ ✗ ✓ - up front cluster stage dynamic [127]2018 ✓ ✗ heterogeneous ✗ ✓ ✗ ✓ ✓ - periodic (fix) [s] cluster, simulation application dynamic [128]2019 ✓ ✗ homogeneous ✗ ✗ ✓ ✗ ✓ -up front, periodic (fix) [m] clsuter stage dynamic ML Models [120]2019 ✓ ✓ homogeneous ✗ ✓ ✓ ✗ ✓ offline set runnable stages changes cluster, simulation application dynamic [121]2020 ✓ ✗ homogeneous ✗ ✗ ✗ ✗ ✗ offline up front cluster application static [39]2021 ✓ ✓ homogeneous ✗ ✗ ✗ ✓ ✓ offline up front cluster application static [122]2021 ✓ ✓ homogeneous ✓ ✓ ✗ ✓ ✗ online up front cluster application static This 2023 ✓ ✓ homogeneous ✓ ✓ ✓ ✗ ✓ offline periodic (dyn) [s] cluster stage dynamic 82 automatic performance-cost efficient resource allocation plan and the application inputs. Differently from the majority of the works present in the literature using runtime statistics and similarly to Dexter, AutoExecutor relies only on features available at compile-time and before running the application. Differently from the majority of the works present in the literature using runtime statistics, AutoExecutor relies only on application features available at compile-time. In a similar fashion, TASQ [122] also centers its predictions only on compile-time application features. It leverages these features to train and use graph neural networks to predict the application performance characteristic curve trend and the optimal application amount of resources. Autoexecutor, TASQ, and Dexter share a common characteristic: they rely on compile-time features, known before running the application. The authors introduce a novel data augmentation technique to tackle training data sparsity. This technique effectively simulates the entire application performance characteristic curves using solely the information from a single application run with a single resource instance. 5.7 summary This work investigates the effect of resource scaling on execution duration and associated monetary cost, highlighting critical importance of setting the optimal scaling level at the smallest fine-grained granularity, specifically at the per-stage level. This implies allocating more resources to highly parallel stages with large-chunk input data, while limiting resource for stages with little inherent parallelism or processing small-chunk input data. To this aim, we present Dexter, a robust resource allocation manager designed to continuously monitor application execution, automatically assigning an optimal amount of resources at a fine-grained level to maximize resource utilization. Notably, when the stage performancecost tradeoff deviates during workload execution, Dexter dynamically adjusts resource allocation to balance the performance-cost tradeoff, minimizing the overall cost while providing acceptable runtime performance. Our experimental evaluation shows that on different analytics workloads, compared with the default serverless resource allocation, our solution achieves a significant cost reduction of up to 4.65× , while improving resource efficiency up to 3.50× and substantially reducing resource saving up to 5.71× . This work shows that dynamically adjusting resources to meet the application’s needs at fine-grain in real-time ensures greater resource allocation flexibility, as well as higher resource efficiency. Consequently, we prove that fine-grained per-stage resource allocation significantly enhances the performance of executing complex data-intensive analytics workloads in serverless environments. 5.8 publications 83 5.8 publications The contents of this contribution are summarized in the following publication: – [Submitted].Anna Maria Nestorov, Diego Marron, Alberto Gutierrez-Torre, Chen Wang, Claudia Misale, Alaa Youssef, David Carrera, and Josep Lluís Berral. “Dexter: A Performance-Cost Efficient Resource Allocation Manager for Serverless Data Analytics“. In: 25th International Middleware Conference (Middleware ’24). 6 SUMMARY AND CONCLUSIONS In recent years, serverless computing has gained significant attention from both academia and industry. Its fundamental principles, including transparent elastic resource scaling allowing massive scalability, ‘pay-as-you-go’ cost model with fine-grained charging granularity, and hassle-free management, have attracted many tenants in today’s cloud environments. However, directly using serverless platforms in more complex data-intensive analytics applications lead to highly inefficient executions and its adoption comes with inherent challenges. Given the resource-intensive and highly parallel nature of these applications, these challenges pose significant obstacles for these applications to benefit from the elasticity and the virtually unlimited scalability offered by serverless platforms. The dynamic availability of resources in modern serverless systems further introduce several challenges, making an efficient usage of resources a key requirement. In this thesis, we address the aforementioned challenges by exploring several research paths. Firstly, we comprehensively characterize a proper use case data-intensive analytics workload and access its performance when executed within serverless platforms. By deeply studying this use case workload we identify the most critical factors preventing the efficient execution these complex workloads to fully benefit from serverless environments. In particular, we find that communication via shared object storage and application-level scalability are two essential factors limiting the efficient execution of data-intensive analytics workloads within serverless platforms. Building upon this findings, we introduce a data forwarding system for direct inter-function communication, called Floki, to overcome the high data sharing latencies through object storage. Our results demonstrate that Floki significantly reduces inter-function communication latencies, thereby enhancing the end-to-end time performance and improving overall resource utilization efficiency. Finally, we examine different scalability granularities, and we propose Dexter as a solution to fine-tune at real-time the scaling levels at the smallest application granularity. Dexter enables more efficient usage of resources, in terms of total runtime cost, fine-tuning resource allocations at the smallest granularity, prioritizing simplicity, generality, and ease of understanding. It dynamically adapts to performance-cost changes by automatically adjusting the allocated resources. 85 BIBLIOGRAPHY [1] D. Parkhill. The Challenge of the Computer Utility. US: Addison-Wesley Educational Publishers Inc., 1966. [2] Peter M. Mell and Timothy Grance. SP 800-145. The NIST Definition of Cloud Computing. Tech. rep. Gaithersburg, MD, USA, 2011. [3] Eric Jonas et al. “Cloud Programming Simplified: A Berkeley View on Serverless Computing.” In: CoRR abs/1902.03383 (2019). arXiv: 1902.03383 .url: http://arxiv. org/abs/1902.03383. [4] AWS Lambda Functions. url:https://aws.amazon.com/lambda/?nc1=h_ls. [5] Google Cloud Functions. url:https://cloud.google.com/functions. [6] IBM Cloud Functions. url:https://cloud.ibm.com/functions/. [7] Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. “Serverless Computation with OpenLambda.” In: 8th USENIX Workshop on Hot Topics in Cloud Computing (HotCloud 16). Denver, CO: USENIX Association, June 2016.url: https : //www.usenix.org/conference/hotcloud16 /workshopprogram/presentation/ hendrickson. [8] Apache OpenWhisk: Open Source Serverless Cloud Platform. url: https://openwhisk. apache.org. [9] Knative: Serverless Containers in Kubernetes Environments. url: https://knative. dev. [10] Vaishaal Shankar, Karl Krauth, Kailas Vodrahalli, Qifan Pu, Benjamin Recht, Ion Stoica, Jonathan Ragan-Kelley, Eric Jonas, and Shivaram Venkataraman. “Serverless Linear Algebra.” In: Proceedings of the 11th ACM Symposium on Cloud Computing. SoCC ’20. Virtual Event, USA: Association for Computing Machinery, 2020,281–295.isbn: 9781450381376.doi: 10.1145/3419111.3421287 .url: https://doi.org/10.1145/ 3419111.3421287. [11] Josep Sampé, Gil Vernik, Marc Sánchez-Artigas, and Pedro García-López. “Serverless Data Analytics in the IBM Cloud.” In: Proceedings of the 19th International Middleware Conference Industry. Middleware ’18. Rennes, France: Association for Computing Machinery, 2018,1–8.isbn:9781450360166.doi: 10.1145/3284028.3284029 .url: https://doi.org/10.1145/3284028.3284029. 93 94 bibliography [12] Lixiang Ao, Liz Izhikevich, Geoffrey M. Voelker, and George Porter. “Sprocket: A Serverless Video Processing Framework.” In: Proceedings of the ACM Symposium on Cloud Computing. SoCC ’18. Carlsbad, CA, USA: Association for Computing Machinery, 2018,263–274.isbn:9781450360111.doi: 10.1145/3267809.3267815 .url: https://doi.org/10.1145/3267809.3267815. [13] Sadjad Fouladi, Riad S. Wahby, Brennan Shacklett, Karthikeyan Vasuki Balasubramaniam, William Zeng, Rahul Bhalerao, Anirudh Sivaraman, George Porter, and Keith Winstein. “Encoding, Fast and Slow: Low-Latency Video Processing Using Thousands of Tiny Threads.” In: 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI 17). Boston, MA: USENIX Association, Mar. 2017, pp. 363–376.isbn: 978-1-931971-37-9.url: https://www.usenix.org/conference/nsdi17/technicalsessions/presentation/fouladi. [14] Sadjad Fouladi, Francisco Romero, Dan Iter, Qian Li, Shuvo Chatterjee, Christos Kozyrakis, Matei Zaharia, and Keith Winstein. “From Laptop to Lambda: Outsourcing Everyday Jobs to Thousands of Transient Functional Containers.” In: 2019 USENIX Annual Technical Conference (USENIX ATC 19). Renton, WA: USENIX Association, July 2019, pp. 475–488.isbn:978-1-939133-03-8.url: http://www.usenix.org/ conference/atc19/presentation/fouladi. [15] Amazon. url: https://aws.amazon.com/it/blogs/machine-learning/code-free- machine-learning-automl-with-autogluon-amazon-sagemaker-and-aws-lambda/. [16] Joao Carreira, Pedro Fonseca, Alexey Tumanov, Andrew Zhang, and Randy Katz. “Cirrus: A Serverless Framework for End-to-End ML Workflows.” In: Proceedings of the ACM Symposium on Cloud Computing. SoCC ’19. Santa Cruz, CA, USA: Association for Computing Machinery, 2019,13–24.isbn:9781450369732.doi: 10.1145/3357223. 3362711.url:https://doi.org/10.1145/3357223.3362711. [17] Jiawei Jiang, Shaoduo Gan, Yue Liu, Fanlin Wang, Gustavo Alonso, Ana Klimovic, Ankit Singla, Wentao Wu, and Ce Zhang. “Towards Demystifying Serverless Machine Learning Training.” In: Proceedings of the 2021 International Conference on Management of Data. SIGMOD ’21. Virtual Event, China: Association for Computing Machinery, 2021,857–871.isbn:9781450383431.doi: 10.1145/3448016.3459240 .url: https: //doi.org/10.1145/3448016.3459240. [18] Anirban Bhattacharjee, Yogesh Barve, Shweta Khare, Shunxing Bao, Aniruddha Gokhale, and Thomas Damiano. “Stratum: A Serverless Framework for the Lifecycle Management of Machine Learning-based Data Analytics Tasks.” In: 2019 USENIX Conference on Operational Machine Learning (OpML 19). Santa Clara, CA: USENIX Association, May 2019, pp. 59–61.isbn:978-1-939133-00-7.url: https://www.usenix. org/conference/opml19/presentation/bhattacharjee. bibliography 95 [19] Joao Carreira. “A Case for Serverless Machine Learning.” In: Workshop on Systems for ML and Open Source Software at NeurIPS.2018. [20] Lang Feng, Prabhakar Kudva, Dilma Da Silva, and Jiang Hu. “Exploring Serverless Computing for Neural Network Training.” In: 2018 IEEE 11th International Conference on Cloud Computing (CLOUD).2018, pp. 334–341.doi:10.1109/CLOUD.2018.00049. [21] Marc Sánchez-Artigas and Pablo Gimeno Sarroca. “Experience Paper: Towards Enhancing Cost Efficiency in Serverless Machine Learning Training.” In: Proceedings of the 22nd International Middleware Conference. Middleware ’21. Québec city, Canada: Association for Computing Machinery, 2021,210–222.isbn:9781450385343.doi: 10.1145/3464298.3494884.url:https://doi.org/10.1145/3464298.3494884. [22] Hao Wang, Di Niu, and Baochun Li. “Distributed Machine Learning with a Serverless Architecture.” In: IEEE INFOCOM 2019 - IEEE Conference on Computer Communications. 2019, pp. 1288–1296.doi:10.1109/INFOCOM.2019.8737391. [23] Joseph M. Hellerstein, Jose M. Faleiro, Joseph E. Gonzalez, Johann Schleier-Smith, Vikram Sreekanti, Alexey Tumanov, and Chenggang Wu. “Serverless Computing: One Step Forward, Two Steps Back.” In: CoRR abs/1812.03651 (2018). arXiv: 1812. 03651.url:http://arxiv.org/abs/1812.03651. [24] Vipul Gupta, Swanand Kadhe, Thomas A. Courtade, Michael W. Mahoney, and Kannan Ramchandran. “OverSketched Newton: Fast Convex Optimization for Serverless Systems.” In: CoRR abs/1903.08857 (2019). arXiv: 1903.08857 .url: http://arxiv. org/abs/1903.08857. [25] Yanan Yang, Laiping Zhao, Yiming Li, Huanyu Zhang, Jie Li, Mingyang Zhao, Xingzhen Chen, and Keqiu Li. “INFless: a native serverless system for low-latency, high-throughput inference.” In: Feb. 2022, pp. 768–781.doi: 10 . 1145 / 3503222 . 3507709. [26] Ahsan Ali, Riccardo Pinciroli, Feng Yan, and Evgenia Smirni. “BATCH: Machine Learning Inference Serving on Serverless Platforms with Adaptive Batching.” In: SC20: International Conference for High Performance Computing, Networking, Storage and Analysis.2020, pp. 1–15.doi:10.1109/SC41405.2020.00073. [27] Anirban Bhattacharjee, Ajay Dev Chhokra, Zhuangwei Kang, Hongyang Sun, Aniruddha Gokhale, and Gabor Karsai. “BARISTA: Efficient and Scalable Serverless Serving System for Deep Learning Prediction Services.” In: CoRR abs/1904.01576 (2019). arXiv: 1904.01576.url:http://arxiv.org/abs/1904.01576. [28] Vikram Sreekanti, Harikaran Subbaraj, Chenggang Wu, Joseph E. Gonzalez, and Joseph M. Hellerstein. “Optimizing Prediction Serving on Low-Latency Serverless 96 bibliography Dataflow.” In: CoRR abs/2007.05832 (2020). arXiv: 2007.05832 .url: https://arxiv. org/abs/2007.05832. [29] Vatche Ishakian, Vinod Muthusamy, and Aleksander Slominski. “Serving deep learning models in a serverless platform.” In: CoRR abs/1710.08460 (2017). arXiv: 1710.08460.url:http://arxiv.org/abs/1710.08460. [30] Daniel Barcelona-Pons, Pierre Sutra, Marc Sánchez-Artigas, Gerard París, and Pedro García-López. “Stateful Serverless Computing with Crucial.” In: ACM Trans. Softw. Eng. Methodol. 31.3(2022). issn:1049-331X. doi: 10 . 1145 / 3490386 .url: https : //doi.org/10.1145/3490386. [31] Mariano Ezequiel Mirabelli, Pedro García-López, and Gil Vernik. “Bringing Scaling Transparency to Proteomics Applications with Serverless Computing.” In: Proceedings of the 2020 Sixth International Workshop on Serverless Computing. WoSC’20. Delft, Netherlands: Association for Computing Machinery, 2021,55–60.isbn:9781450382045.doi: 10.1145/3429880.3430101.url:https://doi.org/10.1145/3429880.3430101. [32] Michael Kiener, Mohak Chadha, and Michael Gerndt. “Towards Demystifying Intra- Function Parallelism in Serverless Computing.” In: Proceedings of the Seventh International Workshop on Serverless Computing (WoSC7)2021. WoSC ’21. Virtual Event, Canada: Association for Computing Machinery, 2021,42–49.isbn:9781450391726. doi:10.1145/3493651.3493672.url:https://doi.org/10.1145/3493651.3493672. [33] Hong Zhang, Yupeng Tang, Anurag Khandelwal, Jingrong Chen, and Ion Stoica. “Caerus: NIMBLE Task Scheduling for Serverless Analytics.” In: Symposium on Networked Systems Design and Implementation.2021. [34] Ingo Müller, Renato Marroquín, and Gustavo Alonso. “Lambada: Interactive Data Analytics on Cold Data Using Serverless Cloud Infrastructure.” In: Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data. SIGMOD ’20. Portland, OR, USA: Association for Computing Machinery, 2020,115–130.isbn: 9781450367356.doi: 10.1145/3318464.3389758 .url: https://doi.org/10.1145/ 3318464.3389758. [35] Eric Jonas, Qifan Pu, Shivaram Venkataraman, Ion Stoica, and Benjamin Recht. “Occupy the Cloud: Distributed Computing for the 99%.” In: Proceedings of the 2017 Symposium on Cloud Computing. SoCC ’17. Santa Clara, California: Association for Computing Machinery, 2017,445–451.isbn:9781450350280.doi: 10.1145/3127479. 3128601.url:https://doi.org/10.1145/3127479.3128601. [36] Youngbin Kim and Jimmy Lin. “Serverless Data Analytics with Flint.” In: 2018 IEEE 11th International Conference on Cloud Computing (CLOUD).2018, pp. 451–455.doi: 10.1109/CLOUD.2018.00063. bibliography 97 [37] Qifan Pu, Shivaram Venkataraman, and Ion Stoica. “Shuffling, Fast and Slow: Scalable Analytics on Serverless Infrastructure.” In: 16th USENIX Symposium on Networked Systems Design and Implementation (NSDI 19). Boston, MA: USENIX Association, Feb. 2019, pp. 193–206.isbn:978-1-931971-49-2.url: https://www.usenix.org/ conference/nsdi19/presentation/pu. [38] Matthew Perron, Raul Castro Fernandez, David J. DeWitt, and Samuel Madden. “Starling: A Scalable Query Engine on Cloud Function Services.” In: CoRR abs/1911.11727 (2019). arXiv: 1911.11727.url:http://arxiv.org/abs/1911.11727. [39] Rathijit Sen, Abhishek Roy, and Alekh Jindal. “Predictive Price-Performance Optimization for Serverless Query Processing.” In: CoRR abs/2112.08572 (2021). arXiv: 2112.08572.url:https://arxiv.org/abs/2112.08572. [40] Jananie Jarachanthan, Li Chen, Fei Xu, and Bo Li. “Astrea: Auto-Serverless Analytics Towards Cost-Efficiency and QoS-Awareness.” In: IEEE Transactions on Parallel and Distributed Systems 33.12 (2022), pp. 3833–3849.doi:10.1109/TPDS.2022.3172069. [41] Verified Market Research. url: https://www.verifiedmarketresearch.com/product/ serverless-architecture-market/. [42] Geoffrey C. Fox, Vatche Ishakian, Vinod Muthusamy, and Aleksander Slominski. “Status of Serverless Computing and Function-as-a-Service(FaaS) in Industry and Research.” In: CoRR abs/1708.08028 (2017). arXiv: 1708.08028 .url: http://arxiv. org/abs/1708.08028. [43] W. Lloyd, S. Ramesh, S. Chinthalapati, L. Ly, and S. Pallickara. “Serverless Computing: An Investigation of Factors Influencing Microservice Performance.” In: 2018 IEEE International Conference on Cloud Engineering (IC2E).2018, pp. 159–169. [44] Eric Jonas et al. “Cloud Programming Simplified: A Berkeley View on Serverless Computing.” In: (Feb. 2019). [45] Pedro García López, Marc Sánchez Artigas, Simon Shillaker, Peter R. Pietzuch, David Breitgand, Gil Vernik, Pierre Sutra, Tristan Tarrant, and Ana Juan Ferrer. “ServerMix: Tradeoffs and Challenges of Serverless Data Analytics.” In: CoRR abs/1907.11465 (2019). arXiv: 1907.11465.url:http://arxiv.org/abs/1907.11465. [46] Microsoft Azure Functions. url: https://azure.microsoft.com/en-us/services/ functions/. [47] Apache Spark: Unified engine for large-scale data analytics. url: https://spark. apache.org. [48] Dataproc Serverless. url:https://cloud.google.com/dataproc-serverless/docs. [49] Databricks SQL Serverless. url: https://www.databricks.com/blog/announcinggeneral-availability-databricks-sql-serverless. 98 bibliography [50] IBM Analytics Engine. url: https : / / cloud . ibm . com / docs / AnalyticsEngine ? topic=AnalyticsEngine-getting-started. [51] Sangeetha Abdu Jyothi et al. “Morpheus: Towards Automated SLOs for Enterprise Clusters.” In: 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16). Savannah, GA: USENIX Association, Nov. 2016, pp. 117–134.isbn:978- 1-931971-33-1.url: https : / / www . usenix . org / conference / osdi16 / technical - sessions/presentation/jyothi. [52] Amazon Simple Storage Service (S3). url:https://aws.amazon.com/s3. [53] IBM Cloud Object Storage. url:https://www.ibm.com/cloud/object-storage. [54] Andrea Passwater. 2018 Serverless Community Survey: huge growth in serverless usage. url: https://www.serverless.com/blog/2018- serverlesscommunity- surveyhuge-growth-usage/. Accessed: 05.07.2020. [55] Kubernetes (K8s): Production-Grade Container Orchestration. url: https://kubernetes. io. [56] Docker. url:https://www.docker.com. [57] Containerd. url:https://containerd.io. [58] Istio. url:https://istio.io. [59] CloudEvents. url:https://github.com/cloudevents/spec/blob/master/spec.md. [60] Apache Kafka. url:https://kafka.apache.org. [61] Google Cloud Pub/Sub. url:https://cloud.google.com/pubsub. [62] Tekton Cloud Native CI/CD. url:https://tekton.dev. [63] Kubeflow Pipelines with Tekton. url:https://github.com/kubeflow/kfp-tekton. [64] Rashmi Korlakai Vinayak and Ran Gilad-Bachrach. “DART: Dropouts meet Multiple Additive Regression Trees.” In: Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics. Ed. by Guy Lebanon and S. V. N. Vishwanathan. Vol. 38. Proceedings of Machine Learning Research. San Diego, California, USA: PMLR, 2015, pp. 489–497.url: https://proceedings.mlr.press/v38/ korlakaivinayak15.html. [65] Jerome H Friedman. “Greedy function approximation: a gradient boosting machine.” In: Annals of statistics (2001), pp. 1189–1232. [66] Wayne Iba and Pat Langley. “Induction of One-Level Decision Trees.” In: Machine Learning Proceedings 1992. Ed. by Derek Sleeman and Peter Edwards. San Francisco (CA): Morgan Kaufmann, 1992, pp. 233–240.isbn:978-1-55860-247-2.doi: https://doi.org/10.1016/B978- 1- 55860- 247- 2.50035- 8 .url: https://www. sciencedirect.com/science/article/pii/B9781558602472500358. bibliography 99 [67] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. “Improving neural networks by preventing co-adaptation of feature detectors.” In: CoRR abs/1207.0580 (2012). arXiv: 1207.0580 .url: http://arxiv. org/abs/1207.0580. [68] R. Smith. “An Overview of the Tesseract OCR Engine.” In: Proceedings of the Ninth International Conference on Document Analysis and Recognition - Volume 02. ICDAR ’07. USA: IEEE Computer Society, 2007,629–633.isbn:0769528228. [69] TPC-H Benchmark. url:https://www.tpc.org/tpch/. [70] Raghunath Othayoth Nambiar and Meikel Poess. “The making of TPC-DS.” In: Proceedings of the 32nd International Conference on Very Large Data Bases. VLDB ’06. Seoul, Korea: VLDB Endowment, 2006,1049–1058. [71] Adrian Vogelsgesang, Michael Haubenschild, Jan Finis, Alfons Kemper, Viktor Leis, Tobias Muehlbauer, Thomas Neumann, and Manuel Then. “Get Real: How Benchmarks Fail to Represent the Real World.” In: Proceedings of the Workshop on Testing Database Systems. DBTest’18. Houston, TX, USA: Association for Computing Machinery, 2018.isbn:9781450358262.doi: 10.1145/3209950.3209952 .url: https: //doi-org.recursos.biblioteca.upc.edu/10.1145/3209950.3209952. [72] TPC-DS Benchmark. url:https://www.tpc.org/tpcds/. [73] Owen O’Malley Yahoo! “Terabyte Sort on Apache Hadoop.” In: (2008). url: http: //www.hpl.hp.com/hosted/sortbenchmark/YahooHadoop.pdf. [74] Valgrind. url:https://valgrind.org/info/tools.html. [75] Ram Srivatsa Kannan, Lavanya Subramanian, Ashwin Raju, Jeongseob Ahn, Jason Mars, and Lingjia Tang. “GrandSLAm: Guaranteeing SLAs for Jobs in Microservices Execution Frameworks.” In: Proceedings of the Fourteenth EuroSys Conference 2019. EuroSys ’19. Dresden, Germany: Association for Computing Machinery, 2019.isbn: 9781450362818.doi: 10.1145/3302424.3303958 .url: https://doi.org/10.1145/ 3302424.3303958. [76] Tarek Elgamal, Atul Sandur, Klara Nahrstedt, and Gul Agha. Costless: Optimizing Cost of Serverless Computing through Function Fusion and Placement.2018. arXiv: 1811.09721 [cs.DC]. [77] Z. Al-Ali, S. Goodarzy, E. Hunter, S. Ha, R. Han, E. Keller, and E. Rozner. “Making Serverless Computing More Serverless.” In: 2018 IEEE 11th International Conference on Cloud Computing (CLOUD).2018, pp. 456–459.doi:10.1109/CLOUD.2018.00064. [78] Joseph M. Hellerstein, Jose Faleiro, Joseph E. Gonzalez, Johann Schleier-Smith, Vikram Sreekanti, Alexey Tumanov, and Chenggang Wu. Serverless Computing: One Step Forward, Two Steps Back.2018. arXiv: 1812.03651 [cs.DC]. 100 bibliography [79] Joao Carreira, Pedro Fonseca, Alexey Tumanov, Andrew Zhang, and Randy Katz. “Cirrus: A Serverless Framework for End-to-End ML Workflows.” In: Proceedings of the ACM Symposium on Cloud Computing. SoCC ’19. Santa Cruz, CA, USA: Association for Computing Machinery, 2019,13–24.isbn:9781450369732.doi: 10.1145/3357223. 3362711 .url: https://doi-org.recursos.biblioteca.upc.edu/10.1145/3357223. 3362711. [80] Eric Jonas, Qifan Pu, Shivaram Venkataraman, Ion Stoica, and Benjamin Recht. Occupy the Cloud: Distributed Computing for the 99%.2017. arXiv: 1702.04024 [cs.DC]. [81] Sadjad Fouladi, Riad S. Wahby, Brennan Shacklett, Karthikeyan Vasuki Balasubramaniam, William Zeng, Rahul Bhalerao, Anirudh Sivaraman, George Porter, and Keith Winstein. “Encoding, Fast and Slow: Low-Latency Video Processing Using Thousands of Tiny Threads.” In: Proceedings of the 14th USENIX Conference on Networked Systems Design and Implementation. NSDI’17. Boston, MA, USA: USENIX Association, 2017, 363–376.isbn:9781931971379. [82] Ingo Müller, Renato Marroquín, and Gustavo Alonso. “Lambada: Interactive Data Analytics on Cold Data Using Serverless Cloud Infrastructure.” In: Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (2020). doi: 10.1145/3318464.3389758.url:http://dx.doi.org/10.1145/3318464.3389758. [83] Y. Kim and J. Lin. “Serverless Data Analytics with Flint.” In: 2018 IEEE 11th International Conference on Cloud Computing (CLOUD).2018, pp. 451–455.doi: 10.1109/ CLOUD.2018.00063. [84] Ana Klimovic, Yawen Wang, Christos Kozyrakis, Patrick Stuedi, Jonas Pfefferle, and Animesh Trivedi. “Understanding Ephemeral Storage for Serverless Analytics.” In: 2018 USENIX Annual Technical Conference (USENIX ATC 18). Boston, MA: USENIX Association, July 2018, pp. 789–794.isbn:978-1-939133-01-4.url: https://www. usenix.org/conference/atc18/presentation/klimovic-serverless. [85] Ana Klimovic, Yawen Wang, Patrick Stuedi, Animesh Trivedi, Jonas Pfefferle, and Christos Kozyrakis. “Pocket: Elastic Ephemeral Storage for Serverless Analytics.” In: Proceedings of the 13th USENIX Conference on Operating Systems Design and Implementation. OSDI’18. Carlsbad, CA, USA: USENIX Association, 2018,427–444.isbn: 9781931971478.url: https://www.usenix.org/conference/osdi18/presentation/ klimovic. [86] Anna Maria Nestorov, Jordà Polo, Claudia Misale, David Carrera, and Alaa S. Youssef. “Performance Evaluation of Data-Centric Workloads in Serverless Environments.” In: 2021 IEEE 14th International Conference on Cloud Computing (CLOUD).2021, pp. 491– 496.doi:10.1109/CLOUD53861.2021.00064. bibliography 101 [87] Cloud Sort Benchmark. url:http://sortbenchmark.org. [88] Anurag Khandelwal, Yupeng Tang, Rachit Agarwal, Aditya Akella, and Ion Stoica. “Jiffy: Elastic Far-Memory for Stateful Serverless Analytics.” In: Proceedings of the Seventeenth European Conference on Computer Systems. EuroSys ’22. Rennes, France: Association for Computing Machinery, 2022,697–713.isbn:9781450391627.doi: 10.1145/3492321.3527539.url:https://doi.org/10.1145/3492321.3527539. [89] Daniel Barcelona-Pons, Marc Sánchez-Artigas, Gerard París, Pierre Sutra, and Pedro García-López. “On the FaaS Track: Building Stateful Distributed Applications with Serverless Architectures.” In: Proceedings of the 20th International Middleware Conference. Middleware ’19. Davis, CA, USA: Association for Computing Machinery, 2019,41–54. isbn:9781450370097.doi: 10.1145/3361525.3361535 .url: https://doi.org/10. 1145/3361525.3361535. [90] Vikram Sreekanti, Chenggang Wu, Xiayue Charles Lin, Johann Schleier-Smith, Jose M. Faleiro, Joseph E. Gonzalez, Joseph M. Hellerstein, and Alexey Tumanov. “Cloudburst: Stateful Functions-as-a-Service.” In: CoRR abs/2001.04592 (2020). arXiv: 2001.04592 . url:https://arxiv.org/abs/2001.04592. [91] Istemi Ekin Akkus, Ruichuan Chen, Ivica Rimac, Manuel Stein, Klaus Satzke, Andre Beck, Paarijaat Aditya, and Volker Hilt. “SAND: Towards High-Performance Serverless Computing.” In: Proceedings of the 2018 USENIX Conference on Usenix Annual Technical Conference. USENIX ATC ’18. Boston, MA, USA: USENIX Association, 2018, 923–935.isbn:9781931971447. [92] Simon Shillaker and Peter Pietzuch. “FAASM: Lightweight Isolation for Efficient Stateful Serverless Computing.” In: Proceedings of the 2020 USENIX Conference on Usenix Annual Technical Conference. USA: USENIX Association, 2020.isbn:978-1- 939133-14-4. [93] Zhipeng Jia and Emmett Witchel. “Nightcore: efficient and scalable serverless computing for latency-sensitive, interactive microservices.” In: Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (2021). [94] Swaroop Kotni, Ajay Nayak, Vinod Ganapathy, and Arkaprava Basu. “Faastlane: Accelerating Function-as-a-Service Workflows.” In: USENIX Annual Technical Conference. 2021. [95] Tian Zhang, Dong Xie, Feifei Li, and Ryan Stutsman. “Narrowing the Gap Between Serverless and Its State with Storage Functions.” In: Proceedings of the ACM Symposium on Cloud Computing. SoCC ’19. Santa Cruz, CA, USA: Association for Computing DECLARATION I hereby declare that except where specific reference is made to the work of others, the contents of this dissertation are original and have not been submitted in whole or in part for consideration for any other degree or qualification in this, or any other university. This dissertation is my own work and contains nothing which is the outcome of work done in collaboration with others, except as specified in the text and Acknowledgements. Barcelona, March 2024 Anna Maria Nestorov