Evaluation of Distributed Data Processing Frameworks in Hybrid Clouds

01/06/2022
by   Faheem Ullah, et al.
The University of Adelaide
0

Distributed data processing frameworks (e.g., Hadoop, Spark, and Flink) are widely used to distribute data among computing nodes of a cloud. Recently, there have been increasing efforts aimed at evaluating the performance of distributed data processing frameworks hosted in private and public clouds. However, there is a paucity of research on evaluating the performance of these frameworks hosted in a hybrid cloud, which is an emerging cloud model that integrates private and public clouds to use the best of both worlds. Therefore, in this paper, we evaluate the performance of Hadoop, Spark, and Flink in a hybrid cloud in terms of execution time, resource utilization, horizontal scalability, vertical scalability, and cost. For this study, our hybrid cloud consists of OpenStack (private cloud) and MS Azure (public cloud). We use both batch and iterative workloads for the evaluation. Our results show that in a hybrid cloud (i) the execution time increases as more nodes are borrowed by the private cloud from the public cloud, (ii) Flink outperforms Spark, which in turn outperforms Hadoop in terms of execution time, (iii) Hadoop transfers the largest amount of data among the nodes during the workload execution while Spark transfers the least amount of data, (iv) all three frameworks horizontally scale better as compared to vertical scaling, and (v) Spark is found to be least expensive in terms of cost for data processing while Hadoop is found the most expensive.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 5

page 6

page 7

07/31/2020

The Impact of Distance on Performance and Scalability of Distributed Database Systems in Hybrid Clouds

The increasing need for managing big data has led the emergence of advan...
06/05/2020

Skedulix: Hybrid Cloud Scheduling for Cost-Efficient Execution of Serverless Applications

We present a framework for scheduling multifunction serverless applicati...
12/15/2021

Data Placement for Multi-Tenant Data Federation on the Cloud

Due to privacy concerns of users and law enforcement in data security an...
06/10/2018

An Enhanced BPSO based Approach for Service Placement in Hybrid Cloud

Due to the challenges of competition and the rapidly evolving market, co...
03/16/2022

Evolution of HEP Processing Frameworks

HEP data-processing software must support the disparate physics needs of...
05/28/2021

Cloud Collectives: Towards Cloud-aware Collectives forML Workloads with Rank Reordering

ML workloads are becoming increasingly popular in the cloud. Good cloud ...
12/12/2021

In-Memory Indexed Caching for Distributed Data Processing

Powerful abstractions such as dataframes are only as efficient as their ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

The increasing volume of data has led to the widespread use of cloud computing, which enables users to leverage several computing machines for processing data in a parallel fashion. In order to distribute data among computing machines of a cloud, distributed data processing frameworks are used as an integral part of modern distributed data processing systems. These frameworks distribute the storage and processing of data over a cluster of computing nodes. Hadoop [1], Spark [2] and Flink [3] are the most widely used frameworks for developing distributed data processing systems [4]. Hadoop is one of the earliest framework and follows the functional programming model of MapReduce. Spark is a novel data processing framework that is designed to overcome the problems faced in Hadoop and Flink is the latest entry into the market that offers features for both batch and stream processing.

Given the high computational demand, distributed data processing frameworks are deployed and operated via cloud infrastructure [pu2015low]. A cloud can be deployed in three models – private, public, and hybrid. When a cloud is made available to use on a pay-as-you-go basis to the general public, it is called a public cloud. A private cloud is exclusively used and maintained by an organization, not available to the general public. A hybrid cloud is a combination of private and public clouds, offering the best of both worlds [8]. The cloud bursting model of hybrid clouds enables an application to use the private cloud resources and burst into the public cloud when the application faces a shortage on the private side. Hybrid cloud benefits its users in terms of security, cost, resilience and so on [8]. For example, if the data comprises of confidential and non-confidential information, the confidential data is processed via private part and the non-confidential data is burst into the public part of a hybrid cloud [9]. In the meanwhile, organizations can minimize cost by only paying for the temporary resources acquired from the public cloud under spiking workloads instead of paying for purchasing, programming, and maintaining private resources that would remain idle for most of the time [10].

Several studies have been conducted to evaluate the performance of distributed data processing frameworks in private and public clouds. Mavridis et al. [11] and Dimopoulos et al. [12] have compared the performance of Hadoop and Spark in private clouds. In [14], the authors have compared Hadoop with Spark deployed in public clouds. Similarly, the performance of Spark and Flink have been contrasted in private clouds [marcu2016spark] as well as public clouds [16]. However, none of the previous studies have comparatively evaluated the performance of Hadoop, Spark and Flink in hybrid clouds. In comparison to private and public clouds that offer computational resource located at one data centre, the impact of distance between the public and private data centres in a hybrid cloud plays a significant part in the performance evaluation of these frameworks. Moreover, although the previous studies have compared Hadoop with Spark or Spark with Flink, there is a paucity of empirical research on apple-to-apple comparison among Hadoop, Spark and Flink. To fill these gaps, this study contributes to the body of knowledge by comparatively evaluating the performance of Hadoop, Spark and Flink in a hybrid cloud.

In this paper, we report on the implementation of a hybrid cloud consisting of private and public cloud. We then leverage the hybrid cloud to evaluate the performance of the three most widely used frameworks (Hadoop, Spark and Flink). The evaluation is carried out in terms of execution time, resource utilization (CPU, RAM and disk), cost and scalability. Such evaluation aims to determine which hybrid cloud configuration works the best for which distributed data processing framework. It also aims to determine the impact on execution time when more nodes are borrowed by a private cloud from a public cloud. Scalability is a critical concern for data processing systems due to the fluctuating workload [4]. For example, a banking system may experience higher workload at the end of a month to process monthly salary transactions. Consequently, distributed data processing systems should scale up/down based on users’ needs. Whilst the $ cost for private cloud is mostly upfront and relevant to maintenance, the $ cost for public cloud depends upon the usage especially that of VMs and bandwidth. Therefore, the $ cost being another key metric in hybrid clouds is considered in our evaluation.

For the aimed evaluation, we implemented a hybrid cloud consisting of OpenStack111https://www.openstack.org/ (the private cloud located in the CREST lab222https://www.crest-centre.net/, Adelaide, Australia South region) and Azure333https://azure.microsoft.com/en-au/ (the public cloud located Sydney, Australia East region). We configured Hadoop, Spark and Flink over different combinations of private and public cloud nodes/Virtual Machines (VM). Thus, we varied the number of VMs and the number of cores in the public cloud to respectively study the horizontal and vertical scalability of the frameworks in a hybrid cloud [el2014scaling]. We also measured the resources (i.e., CPU, RAM, disk and network) utilized during the execution of the experiment. Moreover, we measured the data transfer and data received among the nodes during experimental executions. For this evaluative research study, we used both batch and iterative workloads that are commonly used for evaluating Hadoop, Spark and Flink [18]. In a nutshell, this paper makes the following contributions.

  1. We build a hybrid cloud spanning OpenStack and MS Azure for the implementation and evaluation of distributed data processing frameworks in hybrid clouds.

  2. We evaluate and compare the performance of Hadoop, Spark and Flink deployed in the hybrid cloud. Our evaluation reveals several insights in terms of execution time, scalability, data transferred/received, resource utilization and data processing cost of Hadoop, Spark and Flink.

The rest of this paper is organized as follows. Section II introduces the studied frameworks. Section III reports the hybrid cloud implementation. Section IV describes our experimental setup. Section V presents the results, which are followed by practical observations reported in Section VI. Section VII presents related work and Section VIII concludes the paper.

Ii Distributed Data Processing Frameworks

Distributed data processing frameworks are employed in a system for distributing the storage and processing of data across a cluster of nodes. In this study, we have selected the three most popular frameworks, Hadoop, Spark and Flink, based on the fact that they are the most widely used and investigated frameworks in industry and academia [4, 19, 30]. Hadoop

is one of the earliest and widely adopted disk-based data processing framework. As an open-source batch processing framework, it follows the MapReduce functional model by Java

[1]. It is composed of two layers - a data storage layer called Hadoop Distributed File System (HDFS) and a data processing layer - Hadoop MapReduce Framework. Spark is a novel framework launched to overcome the problems faced while using Hadoop (e.g., user interface and language compatibility) [marcu2016spark],[20]. Unlike Hadoop, Spark is a memory-based framework with HDFS as its input source and output destination. Before an operation, the user driver program launches multiple workers to read data from a distributed file system and cache them in the memory as partitions of Resilient Distributed Dataset (RDD). This feature enables Spark to avoid reloading data from disk at each iteration and boost the data processing speed. In spark, most of the maps are processed before reduce process starts. Flink is relatively a new open-source memory-based framework suitable for batch and stream processing [3, 19]. Fink uses a high throughput streaming engine written in Java and Scala. Similar to Hadoop and Spark, Flink follows a master-slave architecture. However, unlike Spark that implements iterations as for loops, Flink executes iterations as cyclic data flows. The iterative process in Flink significantly speedups certain algorithms by reducing the work in each subsequent iteration. For details on these frameworks, interested readers can refer to [1, 2, 3, 4].

Iii Hybrid Cloud Implementation

In this section, we describe the implementation of the hybrid cloud used for the evaluation of Hadoop, Spark and Flink.

Iii-a Private and Public Clouds

Hybrid cloud combines a private cloud with a public cloud. Here, we used OpenStack and Azure as the private and public cloud centers. OpenStack is an open-source framework, which possesses a set of tools to create and manage highly scalable and flexible private clouds. Azure is a software solution for creating, deploying and testing public clouds. To implement the hybrid cloud, we used on-demand usage model (also called cloud bursting) where consumer is a private cloud and donor is a public cloud. In such a setup, under spiking workload, a private cloud borrows resources (e.g. VMs) from a public cloud.

Iii-B Cloud Connectivity

A secure connection between private and public clouds is a significant part of a hybrid cloud because VMs are deployed across different networks in both clouds [4]. Azure provides various VPN connectivity solutions, however, most of them are costly. To build a secure and cost-free connection between OpenStack and Azure, we opted to use WireGuard [22] which is a Linux kernel-based VPN. WireGuard is user-friendly and offers several benefits such as security, reliability in connection, zero-cost and high throughput [23].

Fig. 1: Steps of hybrid cloud implementation

Iii-C Infrastructure Resource Deployment

Several tools, such as command-line interface and portable web services, are available to deploy resources in a public cloud. However, those tools only support deploying limited resources with static behaviours. Therefore, to deploy resources in a dynamic way, we leveraged Terraform [24] – an open-source tool for cloud resource management. Terraform enabled us to define and execute resource deployment in large-scale clusters in a repetitive manner with little user’s interference.

Iii-D Hybrid Cloud Implementation

Here, we outline the steps we followed for setting up a hybrid cloud. The implementation, inspired from [23], consists of 8 steps as shown in Figure 1. Step 1 - Azure broker configuration: First, we used Wireguard to create private and public keys, which are used to create the configuration file (wg0) of Wireguard for broker VM on Azure. Step 2 - Azure broker creation: This step used Terraform to create Azure broker and then install Wireguard on the broker. Step 3 - OpenStack broker configuration: Like step 1, this step used Wireguard to create private key and public key but for OpenStack broker. Then, the Wireguard config file (wg0) was created using public keys of OpenStack and Azure broker VMs. Step 4 - OpenStack broker creation: This step leveraged Terraform to create OpenStack broker and install Wireguard on the broker VM. Step 5 - Authorization of OpenStack Broker VM: In order to connect OpenStack broker VM to the Azure broker VM, the public key of OpenStack broker VM was added to the Wireguard configuration file (wg0) of the Azure broker VM. Step 6 - Shared networks creation: This step created shared networks (for hosting VMs) on Azure and OpenStack. Step 7 - Peering: Azure broker network was connected to Azure shared network and OpenStack broker network was connected to OpenStack shared network. Step 8 - Data Routing: This step implemented data routing in Azure and OpenStack. In Azure, the broker network’s routing table was linked with the shared network. Then, the routing table was updated in accordance with the shared network. In OpenStack, data routing was implemented by simultaneous addition of static rules to the router in the broker and shared networks.

After the implementation, a bandwidth measurement experiment was performed in our hybrid cloud. This experiment is important for understanding the results presented in Section V as bandwidth among nodes directly impacts the execution time. IPerf3444https://iperf.fr/, a cross-framework tool, was installed on all nodes to measure the bandwidth as presented in Figure 2. The network connection between VMs residing on the same physical machine in the OpenStack achieves the mean bandwidth of 15 Gbits/s while it is only 1.06 Gbits/s in Azure. The mean bandwidth between VMs residing on different physical machines is comparatively lower i.e., 3.52 Gbits/s in OpenStack and 923 Mbits/s in Azure. In contrast, the bandwidth of the WAN connecting the VMs in the OpenStack to the VMs in Azure is recorded as 202.91 Mbits/s. Hence, it is evident that the bandwidth between the nodes in the same cloud is much higher than that between a node in OpenStack and a node in Azure.

Fig. 2: Bandwidth between different pairs of nodes in our hybrid cloud setup

Iv Experimental Setup

Iv-a Benchmarking Workloads

Grep and K-means were selected as benchmarking workloads. Grep is a batch workload that implements one-pass processing, where the input is processed exactly once, for searching plain text. This workload uses Wikipedia text files

[marcu2016spark]. K-means is a well-known algorithm for clustering data [18]. It is an iterative workload that implements loop-caching, where the same input is processed multiple times. This workload receives input from the random data generator. We chose data sizes as 5GB for each workload in view of two factors: (i) the time and cost incurred by the range of experiments conducted and (ii) the reliability of the experimental findings. Conducting large-scale experiments on Azure costs a significant amount - 0.03$/hour for one vCPU and 0.13$/GB data sent. To ensure cost limitation do not threaten the reliability of our findings, we compared our data size with the state-of-the-art studies (e.g., [14],[zhang2019meteor]) on Hadoop Spark and Flink. We found that the chosen data size is equal to or larger than the most related works such as 350 MB in [14] and 640 MB in [zhang2019meteor].

Iv-B Infrastructure

Our experimental setup consisted of 17 VMs – one master and 16 worker nodes deployed on the hybrid cloud that consists of private (OpenStack) and public (Azure) clouds. Since conducting large-scale experiments on a public cloud incurs a significant cost, we had to choose a reasonable cluster size while avoiding the threats to the reliability of our findings. We first consulted the related studies (e.g., 8 VMs in [14], 6 VMs in [11],[20], 4 VMs in [25] and 3 VMs in [16]), and chose a cluster consisting of 17 VMs. Then, we conducted an experiment to observe the trend with the increase in the number of VMs. As presented in Section V-F, the trend continues smoothly when the number of VMs increases. Hence, even a further increase in the number of VMs is unlikely to contradict our findings. For evaluating the impact of cloud bursting on the execution time, we considered different combinations of VMs that could be distributed and deployed on private and public clouds, denoted by (x_y), where x and y respectively represent the number of VMs in private and public clouds. The configurations are (16_0), (14_2), (12_4), (10_6), (8_8), (6_10), (4_12) and (2_14)555Throughout the text and figures/tables, (x_y) denotes hybrid cloud configuration where x and y respectively represent the number of VMs deployed in the private and public cloud..

Feature     Private Cloud (OpenStack)     Public Cloud (Azure)
CPU 1 vCPU 1 vCPU
RAM 2 GB 2 GB
Disk 10 GB 30 GB
Location Adelaide Sydney
TABLE I: Specification of the virtual machines

In our setup, the master VM, equipped with 2 core CPU, 4GB RAM and 40 GB disk, is hosted in the private cloud, while the distribution of worker VMs varies based on cloud configurations. The specification of the worker VMs used in OpenStack and Azure is presented in Table I. We use Terraform [24] for reliably creating and destroying VMs in the private and public clouds. Given that our study required frequent creation and destruction of VMs, configuration of distributed data processing frameworks and installation of benchmarking suites, we have automated the whole process via bash scripts to ensure the minimal human interference. During the experiments, we always destroy the used cluster and create a fresh one to avoid the impacts of previous run/setup. Each experiment is executed three times to remove abruptness and the mean results are reported.

Iv-C Experimental Scenarios

The experimental scenario underpins the way experiment is executed. In our scenario, the user connects with the master node deployed in the private cloud using SSH connection. Using the master node, step 1 is to generate the dataset as per the workload using benchmarking suites such as HiBench [17] and BigDataBench[18]. In step 2, the dataset is uploaded to HDFS from the local file system of the nodes deployed on private and public clouds. In step 3, the measurement probes for various metrics presented in Section IV-D are activated. In step 4, the data processing job starts. Once data processing is completed, the results are recorded into a file. The execution time reported in Section V is the time consumed in step 4, i.e., data processing. The time consumed in data generation, data transmission, and uploading/downloading data to/from HDFS is reported separately in Section V-A. In this study, the data processing time is the focus to evaluate the three frameworks since these frameworks operate independently of data generation, data transfer and data upload/download.

Iv-D Evaluation Metrics

During our experiments, we measured 10 metrics i.e., execution time, data transferred, data received, vertical scalability, horizontal scalability, cost, CPU usage, RAM usage, disk read and disk write. The time consumed in each data processing phase (e.g, map and reduce) is calculated based on the log file analysis. We used iftop666https://www.tecmint.com/iftop-linux-network-bandwidth-monitoring-tool/, running on each node to measure the data transferred and received during the experiment execution. Besides, Dstat777https://linux.die.net/man/1/dstat is used to measure resource utilization (i.e., CPU, RAM, and disk). The horizontal scalability is measured by increasing the number of nodes in the public cloud, and the vertical scalability is measured by increasing the number of cores of a single node in the public cloud (details in Section V-E).

(a) Grep
(b) K-means
Fig. 3: Execution time of Hadoop, Spark and Flink for Grep and K-means with various hybrid cloud configurations
Fig. 4: Impact of bandwidth of the network connection between private and public cloud for (8_8) configuration
(a) Hadoop-Grep
(b) Hadoop-Kmeans
(c) Spark-Grep
(d) Spark-Kmeans
(e) Flink-Grep
(f) Flink-Kmeans
Fig. 5: Execution time per stages of the data processing. Same legend applies to Fig (a) and (b)

V Results

V-a Impact of Cloud Bursting

Fig. 3 shows the execution time of Hadoop, Spark and Flink in the hybrid cloud for batch (Grep) and iterative (K-means) workloads. Generally, for all three frameworks, the execution time increases when more nodes are borrowed by the private cloud from the public cloud, i.e., as we move from non-bursting (16_0) to full-bursting (2_14). This can be attributed to two factors - network bandwidth and disk I/O. As depicted in Fig. 4, the bandwidth between nodes in the private cloud is 3.52 Gbits/s, between nodes in the public cloud is 1.06 Gbits/s, and across private and public cloud (WAN) is 202 Mbits/s. As we borrow more nodes from the public cloud, more connections with lower bandwidth are used. This is evident from the amount of data transferred between nodes in various hybrid cloud configurations illustrated in Fig. 7 (details in Section V-C). To illustrate the impact of bandwidth, we ran a small-scale experiment where we used Traffic Control (a linux utility) to decrease the bandwidth of the network connection between private and public cloud for (8_8) configuration (executing grep) by 32% of the original value. The result depicted in Fig. 4 reveals that as the bandwidth decreases, the execution time increases. As more nodes are exploited in the public cloud, the disk usage increases as depicted in Fig. 9 (details in Section V-D). This is because the nodes in the public cloud are equipped with 30 GB disk as compared to 10 GB disk on nodes in the private cloud, as shown in Table I.

(a) Hadoop
(b) Spark
(c) Flink
Fig. 6: Data transfer/received (in MB) among the nodes executing K-means in (8_8). M denotes master node and W1-W16 denotes the worker nodes.
(a) Within Private Cloud
(b) Private to Public Cloud
(c) Public to Private Cloud
(d) Within Public Cloud
Fig. 7: Data transferred/received in our hybrid cloud infrastructure during the execution of K-means

On average, Hadoop is around 27.5% and 33.6% slower than Spark and Flink, respectively. This is attributed to the disk-based architecture of Hadoop that, unlike Spark and Flink significantly leverages the disk during data processing. Since disk-based operations are computationally heavy and time-consuming, it slows Hadoop down. This trend continues across almost all cloud configurations as shown in Fig. 8(d). Furthermore, Hadoop spends a lot of time in data shuffling stage during which data is written to the disk in a sequential manner. Flink outclasses Spark by around 8.1% in terms of execution time. Whilst both Spark and Flink are memory-based frameworks, the in-built optimizer of Flink enables it to use CPU and RAM more efficiently as reported in Section V-D. When moving from non-bursting (16_0) to full-bursting (2_14), the mean execution time of Hadoop, Spark and Flink increases by 3.4, 2.2 and 2.1, respectively. The slowdown in Hadoop is higher as compared to Spark and Flink because Hadoop transfers more data among the nodes during data processing as shown in Fig. 8. For instance, Hadoop, Spark and Flink transfer around 4 GB, 2.5 GB and 2.7GB data during the execution of K-means. With respect to workloads, the difference among Hadoop, Spark and Flink is not as evident for batch workload as compared to iterative workloads. This is because Hadoop is originally designed for batch workload while Spark and Flink are designed for iterative workloads. Unlike Hadoop, Spark and Flink cache intermediate data across nodes between iterations to improve efficiency. Fig. 3 also shows that the mean execution time respectively increases by 3.4 and 1.4 for batch and iterative workloads as we move from (16_0) to (2_14).

In Fig. 3, the trend of increase in execution time is not exactly smooth when borrowing more nodes from the public cloud. This is a consequence of two uncontrolled factors - the fluctuation in WAN bandwidth and load distribution among workers. Except (16_0), all the hybrid cloud configurations leverage the WAN connection for data transfer between private and public clouds. When the strength of the WAN connection fluctuates, it directly impacts the execution time. Secondly, the load distribution among the workers is not even by default, which further impacts the execution time. As shown in Fig. 9, worker W12 leverages only 41% CPU and 0.42GB RAM with Spark during the execution of K-means while other workers are used to a higher extent (49 - 55%). The under utilization of workers may be caused by multiple reasons including the network congestion and software failure. As an example, a worker may not be available to respond to the master. Then, the master node has to send more workloads to other available workers. As mentioned in Fig. 3 and Fig. 4, the execution time here is the time consumed by the frameworks during data processing. The time consumed in data generation, uploading/downloading data to/from HDFS/local file system, and data transfer is presented in Table II. Similar to data processing time, the time for other operations is also higher when more nodes are deployed in the public cloud. In addition, more time is consumed in uploading data from the local file system to HDFS on public cloud.

Operation 14_2 8_8 2_14
Data generation 104 240 415
Downloading data from HDFS to local 60 177 299
Data transfer from private to public cloud 529 375 932
Uploading data to HDFS from local 902 1,106 1,352
TABLE II: Time (sec) consumed during various operations in the three hybrid cloud configurations.

V-B Data Processing Phases

Fig. 5 shows the time consumed in each phase of data processing. It is evident that Spark takes significant time (around 73s) in framework initialization. This is because when the execution of a Spark job starts, it creates SparkContext which is a slow process. Flink takes around 45s in initialization. Contrary to Spark and Flink, Hadoop takes minimal time (around 5s) to initialize. These results imply that the actual data processing time is not dominated by the framework initialization time in our study. As expected, the framework initialization time is similar for the executions of grep and k-means. However, the phases for the execution of grep and k-means are different in Spark and Flink. Fig. 5 shows that the time consumed in each phase is negligibly impacted by the hybrid cloud configuration. Spark and Flink do not have a shuffle map phase for Grep because Spark and Flink only perform the filter transformation and result stage in the execution of Grep [marcu2016spark]. Comparing Fig. 4(b) and Fig. 4(d), we observe that Hadoop takes longer time in shuffle phase as compared to Spark. This is because during the shuffle stage, Hadoop workers write data to the disk in a sequential manner facing synchronization barrier, where each thread has to wait for the antecedent thread to finish writing. On the other hand, Spark cache most of the data in memory during shuffle phase since Spark is a memory-based framework having no synchronization barrier.

V-C Data Transfer/Received

Fig. 6 shows the data transferred between each pair of the nodes during the execution of K-means by Hadoop, Spark and Flink under (8_8) hybrid cloud configuration. We can observe that Hadoop engages almost all nodes in large data transfer. This is because Hadoop always transfers the whole data among all nodes while Spark and Flink can reduce the size of data in memory after serialization [shi2015clash]. In Spark and Flink, only a few nodes receive large data. For example, with Spark, only worker W15 made one large size data (85.2MB) transfer to worker W8. The master node communicates uneven data ranging from 0.03 - 19.9MB to workers in Hadoop and 0.16 - 45MB in Spark, while even size data ranging from 0.03 - 0.12MB are transferred from master to workers in Flink. As the data transferred from the workers to the master is concerned, all three frameworks transfer almost even data ranging from 0.27 - 0.73MB to the master node. We did not observe a significant difference in data transfer with respect to hybrid cloud configurations (e.g., (16_0) and (2_14)). Therefore, we only report the data transfer among the nodes for one representative configuration i.e., (8_8).

Fig. 8 shows the total amount of data communicated among the nodes during the execution of K-means. Overall, Hadoop transfers 4.31 GB of data among the nodes, which is followed by Flink (2.19 GB) and Spark (1.45 GB). The data transfer for Spark is quite low because transformations on RDD in Spark are lazy in nature, which helps Spark to minimize data transfer between the nodes. Unlike the total data transfer shown in Fig. 8, Fig. 7 depicts the data transfer in or between public and private clouds. For (16_0), all data transfers happened among the nodes within the private cloud, since there are no nodes deployed in the public cloud. For (2_14), most of the data is transferred among the nodes in the public cloud as 14 out of 16 nodes are deployed in the public cloud. For (8_8), most of the data transfers happened across the clouds using WAN. These results show that these data processing frameworks do not consider the underlying cloud infrastructure (e.g., bandwidth) to optimize the data transfer among the nodes.

Fig. 8: Total data transferred/received among the nodes during the execution of K-means.
(a) CPU Usage (%)
(b) RAM Usage (GB)
(c) Disk Read (MB)
(d) Disk Write (MB)
Fig. 9: Resource utilization during the execution of K-means. H, S, and F denotes Hadoop, Spark and Flink, respectively.

V-D Resource Utilization

Fig. 9 shows the mean utilization of CPU, RAM and disk during the execution of K-means. In each hybrid cloud configuration shown in Fig. 9, the first set of nodes is deployed in the private cloud and the last set in the public cloud. For example, in (14_2), the workers W1 - W14 are deployed in the private cloud and W15-W16 are deployed in the public cloud. The values presented in Fig. 9 are averaged over per second values collected using Dstat. We observe that the CPU usage of the nodes in the public cloud is higher as compared to the nodes in the private cloud. This is because the CPU capacity of the nodes in the public cloud is 2.4 GHz as compared to the 3.0 GHz CPU capacity in the private cloud. Therefore, the nodes in public cloud utilize CPU more to catch up with the private cloud nodes. The CPU usage of master node is quite low compared to the worker nodes. This is because the master node acts as a manager only without directly contributing to the job execution. Similarly, the percentage use of RAM by master node is lower than that by worker nodes. However, the RAM usage of the master node is higher than that of worker nodes in Fig. 8(b) because the master node is equipped with 4 GB RAM while worker nodes are equipped with 2 GB RAM. Overall, the CPU usage ranges from 24-79%, which reveals two facts (i) all the nodes worked well in our cluster; (ii) the CPU usage did not reach 100% due to the job dependency during data processing. For example, W1 needs a particular piece of data to execute its task. However, this piece of data is produced by W2. Therefore, W1 has to wait for W2 until the required data is produced, and this results in reducing the overall CPU usage. As expected, the RAM usages of Spark and Flink are higher than that of Hadoop. However, Flink’s RAM usage is also higher than Spark. A potential reason for this is that Spark leverages JVM’s heap memory, while Flink maintains its memory stack, which is more optimally designed.

Fig. 8(c) and Fig. 8(d) depict the disk read and disk write. The disk read and write for master node is much lower than the worker nodes. On average, Hadoop, Spark and Flink write 2.38 MB/s, 1.19 MB/s and 1.13 MB/s to the disk. This is why Hadoop is slower than Spark and Flink since disk I/O operations are computationally heavy. In terms of disk read, the trend is opposite where Hadoop, Spark and Flink read around 0.85 MB/s, 1.69 MB/s and 3.00 MB/s from the disk, respectively. We also observe that the disk writes for nodes deployed in the public cloud are higher than nodes in the private cloud. A potential reason is the higher disk availability (30 GB) of nodes in the public cloud, while nodes in the private cloud only have 10 GB disk.

V-E Horizontal and Vertical Scalability

Horizontal scalability refers to scaling-up a system by adding new computing nodes, while vertical scalability refers to the scale-up of a system by adding more cores into the same computing node. Whilst previous studies (e.g., [4],[14, marcu2016spark, 16]) have explored the scalability of these frameworks in private or public clouds, we investigate how these frameworks scale in the hybrid cloud. For assessing horizontal scalability, we fixed one VM of default settings (1 vCPU and 2GB RAM) in the private cloud and vary the number of default VMs in the public cloud from 1 to 2 and 2 to 4. For vertical scalability investigation, we deployed one default VM in the private cloud and one default VM in the public cloud. Then, we varied the number of cores of the VM deployed in the public cloud from 1 to 2 and 2 to 4. The single VM in private cloud is deployed in order to adhere to the definition of the hybrid cloud. For the sake of fair comparison, same resources (e.g., RAM size) are allocated to the various setups in vertical and horizontal scalability. For example, a VM with 4 cores in vertical scalability investigation and 4 VMs in horizontal scalability investigation are equipped with 8 GB RAM each.

Fig. 10 shows the impacts of horizontal and vertical scalability on Hadoop, Spark and Flink in the hybrid cloud. As expected, the execution time decreases with the increases in the number of VMs (horizontal scalability) or the number of cores (vertical scalability). When doubling the number of VMs, the mean execution time reduces by 51.0%, 33.7% and 41.7% for Hadoop, Spark and Flink, respectively. When doubling the number of cores, the execution time is reduced by 39.3%, 28.1% and 31.9% for Hadoop, Spark and Flink, respectively. This shows that horizontal scalability leads to more reduction in execution time compared to vertical scalability in a hybrid cloud. This is because in vertical scalability, the scale-up is bottle-necked by the low-capacity node in the private cloud due to non-optimal load distribution. Therefore, the increase in the capacity of the node in the public cloud is not fully utilized. As shown in Fig. 10(a), worker 1 is of 2 cores while worker 2 is of 8 cores. Therefore, worker 2 is only utilized around 25% since it is dependent upon a weaker node i.e., worker 1. In Fig. 10(b), all workers are of 2 cores, hence, all workers are almost equally utilized.

(a) Horizontal scalability
(b) Vertical scalability
Fig. 10: Scalability as the number of VMs (horizontal) or number of cores (vertical) increases in the public cloud
(a) 3 Node Cluster
(b) 6 Node Cluster
Fig. 11: CPU Usage in cluster with 3 nodes (vertical scaling) and with 6 nodes (horizontal scaling)

V-F Cluster Scaling

Unlike the previous section where we scale the cluster only in the public cloud, in this section, we scale the overall cluster size. The motivation for such scaling is to determine the trend with respect to the increasing number of nodes. Moreover, this experiment justifies the cluster size (16 nodes) used for the experiments reported in this paper. We conducted the experiment with various numbers of nodes, including 4, 8, 12 and 16 nodes, when executing Grep. As shown in Fig. 12, with the increase in the number of nodes, the execution times of all the three frameworks decrease because of the increase in the hybrid cloud capacity. In addition, when moving from non-bursting, i.e., (4_0), (8_0), (12_0) and (16_0) to full-bursting, i.e., (1_3), (1_7), (2_10) and (2_14), the execution times of Hadoop, Spark and Flink also increase. This is same as the analysis in Section V-A. Moreover, Hadoop always consumes the highest execution time, followed by Spark and then Flink. Therefore, we conclude that the various configurations could impact the performance of these frameworks in the experiments. However, they do not impact the performance comparison among these frameworks in general. Thus, the experiment results in Section V obtained using our experimental setup reported in Section IV-B are valid.

Fig. 12: Execution time of grep in 4, 8, 12 and 16 node cluster.
Fig. 13: Cost incurred on MS Azure for K-means execution

V-G Cost Analysis

The cost incurred by the frameworks deployed in various cloud configurations is calculated using Equation 1, which underpins the costs of VM, bandwidth and IP. Those three aspects account for around 95% of the total cost in MS Azure. In Equation (1), denotes the number of VMs, T denotes the time (in hours) VM and associated IP are used for, denotes the data (in GB) sent out from the public cloud, denotes the number of IPs, C denotes the hybrid cloud configuration, P denotes the framework, and W denotes the workload. Furthermore, 0.0264, 0.126 and 0.004 are respectively the rates (in USD) for VM, bandwidth and IP in MS Azure (Australia East region).

(1)

The costs incurred by each framework and hybrid cloud configuration during the execution of K-means are presented in Fig. 13. Since the number of IPs used is the same for the three frameworks, the main cost determinants are VM time and bandwidth for sending data. In majority of the cases, Hadoop is the most expensive followed by Flink, while Spark is the least expensive. In (12_4) and (10_6) configuration, Flink is slightly more expensive than Hadoop, which is attributed to the large data transfers (i.e., 0.89 GB and 1.38 GB) as compared to 0.70 GB and 0.66 GB data transfer by Hadoop as illustrated in Fig. 6(c). Hadoop is more expensive because Hadoop’s execution time is higher as well as Hadoop transfers significantly larger data among nodes. However, it is worth noting that execution time and cost are only two quality attributes. There are several other quality attributes (e.g., fault tolerance and usability) according to which Hadoop outclasses Spark and Flink [4]. Moreover, Hadoop is a well-established framework that is in use for years in industry, hence, its replacement with the recent frameworks is not a straight-forward undertaking [4]. Fig. 13 also shows that unlike expected, the cost does not increase consistently as more and more nodes are borrowed from the public cloud. This is because in addition to the number of VMs, the bandwidth used contributes significantly to the overall cost. For instance, the mean cost of VM, bandwidth and IP is 3.14 cents, 7.98 cents, and 0.47 cents, respectively.

Fig. 14: Time consumed in creating and destroying VMs

Vi Practical Observations and Future Work

In this section, we present our practical observations acquired during this study and directions for future research.

Infrastructure deployment in Azure is slow: Our hybrid cloud infrastructure requires dynamically creating and destroying VMs in both Azure and OpenStack using Terraform. However, such operations in Azure take much longer time than OpenStack. Fig. 14 shows the time consumed in creating and destroying VMs in three hybrid cloud configurations. When more VMs are utilized in Azure, the time increases. The potential reasons include but not limited to hardware resource allocations from the available pool, uploading OS to VMs and informing the load balancer and firewall of the Azure data center about the new deployments.

Automation is the key: We observed that the hybrid cloud implementation, framework configurations and deployments are complex and tedious. Therefore, we assert that the whole process should be as automated as possible. This not only saves a practitioner/researcher’s time but also ensures the reliability of data processing and associated experiments. In this regard, we recommend the use of Terraform [24] for automatically creating, deploying and destroying resources on a hybrid cloud. Similarly, writing shell scripts for automating the framework configuration is a fruitful practice.

Confirm version compatibility: In this study, we used various frameworks, workloads and software tools in collaboration with each other. Before dwelling into implementation, it is important to confirm that the versions of tools are compatible with each other. For example, we have noticed that Flink 0.10 is only compatible with BigDataBench 5.0, while BigDataBench 5.0 requires Hadoop 2.7. Moreover, Spark 2.4 is compatible with HiBench 7.1 but not with HiBench 7.0, and Hadoop 2.7 is only compatible with Java version 1.8 or above. In addition, Spark and Flink require version compatibility with Hadoop to use HDFS and YARN as the cluster manager. Therefore, we assert that version compatibility should be confirmed before starting the implementation.

Future Work: Optimizing data transfers: As shown in Fig. 6 and Fig. 7, the frameworks transfer data randomly among nodes in the private cloud, public cloud, and between private and public clouds. In comparison to data transfers within the same cloud, the data transfers between two clouds via WAN are costly both in terms of time and money. Therefore, the frameworks should be tuned/configured in a way that minimizes inter-cloud data transfers in a hybrid cloud setup. Whilst each framework comes with over 150 parameters, we suggest focusing on parameters (e.g., data replication factor and number of parallel threads for transferring data) related to data transfer, data distribution and network usage to optimize data transfers especially across the two clouds. VM hosting: In this study, the VMs in private and public clouds are hosted either on the same or different physical machines. As presented in Fig. 2, the bandwidth between VMs hosted on the same physical machine is higher than VMs on different machines. Furthermore, Fig. 4 also reveals that the bandwidth among VMs directly impacts the execution time. Therefore, it will be fruitful to extend this study for different combinations of VMs placement strategies such as hosting all VMs on the same physical machine, hosting only VMs in the private cloud on the same physical machine, and so on.

Vii Related Work

In this section, we compare our work with the existing studies to position the novelty of our work.

Hybrid cloud implementation and cloud bursting: Several studies (e.g., [9],[23],[33, 35, 36]) have explored the implementation of the hybrid cloud and cloud bursting. Mansouri et al. [23] used WireGuard [22] to connect private and public clouds for implementing a hybrid cloud to compare the impact of cloud bursting on the performance of six distributed databases (e.g., Cassandra and MongoDB). Clemente-Castelló et al. [35] leveraged a low throughput and high latency link to connect two clouds hosted on OpenStack for building a collaborative hybrid cloud. The authors then used this hybrid cloud for building a performance model to predict the execution time of Hadoop jobs. Similarly, Loreti et al. [9] connected two OpenStack clouds to build a hybrid cloud for evaluating Hadoop performance with respect to bandwidth. The results show that the performance gain via bursting into a public cloud is largely dependent upon the inter-cloud bandwidth. Along the same lines, Roman et al. [36] studied the impact of inter-cloud bandwidth on Spark performance in a hybrid cloud. It was observed that the shuffle phase of Spark is very sensitive to the bandwidth between the two networks (private and public) in the hybrid cloud. Bicer et al. [33]

studied the impact of cloud bursting and scalability for data-intensive applications (e.g., KNN) in a hybrid cloud comprising of local and AWS clusters. Taking inspirations from

[23], we have also used WireGuard [22] to implement a hybrid cloud that integrates private cloud (OpenStack) with public cloud (Azure).

Comparison of distributed data processing frameworks: Several studies (e.g., [11],[14],[marcu2016spark],[16],[20],[25]) have evaluated and compared the performance of distributed data processing frameworks. Veiga et al. [20] have used multiple benchmarking workloads to compare the performance of Hadoop, Spark and Flink deployed on a private cloud. The authors concluded that Spark and Flink outperforms Hadoop with an average reduction of 77% and 70% in execution time. Gu et al. [14] compared the performance of Hadoop and Spark deployed on a cluster of eight nodes. The findings revealed that Spark outperformed Hadoop with respect to execution time. However, Spark consumed far more memory than Hadoop. Perera et al. [16] compared Spark and Flink. Both the frameworks were deployed on Amazon EC2 instances. Due to pipelined execution, Flink consistently outperformed Spark with respect to execution time. Shi et al. [25] also compared the execution time of Hadoop and Spark. They found that Spark outperformed Hadoop by 2.5× for WordCount, and 5× for K-means and PageRank. In [11], the performance of Hadoop was compared with Spark by analyzing log files with respect to execution time, resource usage and scalability in a cluster of six VMs on a private cloud. The results showed that by maximizing the resource utilization, Spark outperformed Hadoop, while horizontal scale-up of worker nodes led to reducing the execution time by about 50%. In [marcu2016spark], the experiments were executed in private cloud to evaluate Spark and Flink for various workloads. The evaluation showed that Flink performed better for batch workloads whereas Spark performed well in large-scale graph processing.

In comparison to existing studies, this paper fills the following two gaps (i) none of the previous studies have evaluated/compared the execution time, data transfer/received, horizontal scalability, vertical scalability, cost and resource utilization for Hadoop, Spark and Flink in a hybrid cloud, and (ii) none of the previous studies have evaluated the performance of Hadoop, Spark and Flink with different permutations of VMs in the cloud bursting model. Hence, the previous studies are largely orthogonal to this study.

Viii Conclusion

In this paper, we first reported on the implementation of a hybrid cloud consisting of private (OpenStack) and public (MS Azure) clouds. We then used the hybrid cloud for evaluating and comparing the three most widely used distributed data processing frameworks (i.e. Hadoop, Spark and Flink) in terms of execution time, resource utilization, horizontal scalability, vertical scalability and cost. We used both batch and iterative workloads in our evaluation, and found that the execution time of the three frameworks increase as more nodes are borrowed from the public cloud. In a hybrid cloud setup, Flink is the fastest followed by Spark and then Hadoop. With respect to cost, Spark is the least expensive while Hadoop is found the most expensive. All three frameworks horizontally scale better as compared to vertical scaling. In the future, we plan to evaluate the impact of distance between private and public clouds on the performance of distributed data processing frameworks in a hybrid cloud setup.

References