Queries Based Workload Management System for the Cloud Environment Eman A. Maghawry, Rasha M. Ismail, Nagwa L. Badr, M. F. Tolba Faculty of Computer and Information Sciences, Ain Shams University, Cairo, Egypt {e_maghawry, rashaismail}@yahoo.com,
[email protected],
[email protected]
Abstract.
Workload management for concurrent queries is one of the challenging aspects of executing queries over the cloud computing environment. The core problem is to manage any unpredictable load imbalance with respect to varying resource capabilities and performances. Key challenges raised by this problem are how to increase control over the running resources to improve the overall performance and response time of the query execution. This paper proposes an efficient workload management system for controlling the queries execution over cloud environment. The paper presents an architecture to improve the query response time by detecting any load imbalance over the resources. Also, responding to the queries dynamically by rebalancing the query executions across the resources. The results show that applying this Workload Management System improves the query response time by 68%. Keywords: Cloud Computing, Query workload, Query execution
1
Introduction
Cloud Computing is becoming an emerging computing paradigm with its dynamic usage of scalable virtualized resources. It provides services to various remote clients with different requirements. As data continues to grow, it enables the remote clients to store their data on its storage environment with different clients' expectations over the internet. As clouds are built over wide area networks, the use of large scale computer clusters often built from low cost hardware and network equipment, where resources are allocated dynamically amongst users of the cluster [1]. Therefore the cloud storage environment has resulted in an increasing demand to co-ordinate access to the shared resources to improve the overall performance. Managing the query workload in cloud computing environment is a challenge to satisfy the cloud users. The workloads produced by queries can change very quickly; consequently this can lead to decreasing the overall performance (e.g. query processing time) depending on the number and the type of requests made by remote users. In this case, a cloud service provider must manage the unpredictable workloads,
through making decisions about which requests from which users are to be executed on which computational resources. Furthermore, the importance of managing the workload arises by the demand to revise resource allocation decisions dynamically. These decisions are based on the progress feedback of the workload or the behavior of the resources to recover any load imbalance that may occur. This can lead to improving the overall performance during queries execution over the distributed resources. Where the workload contains or consists of database queries, adaptive query processing changes the way in which a query is being evaluated while the query is executing over the computational resources [2]. The challenge in this paper is how to provide a fast and efficient monitoring process to the queries executed over the distributed running resource. Furthermore, responding to any failure or load imbalance occurs during the queries execution. This is done by generating an assessment plan that redistributes the queries execution over the replicated resources. This paper focuses on presenting an enhancement of the workload management sub-system of our previous architecture that was presented in [3] to overcome the challenge of slow query response time. It is beneficial to manage the queries execution after implementing the query optimization sub-system. The main objective of this paper is to minimize the overall queries response time in our query processing architecture that was presented in [3]. The paper is organized as follows. Section 2; Reviews related works. Section 3; Presents our proposed Query Workload Architecture. Section 4; Describes the mechanism used to implement the second module in our architecture. Section 5; Presents the experimental environment. Section 6; Presents the results. Conclusion and future work are discussed in Section 7.
2
Related Work
This section reviews related work on the topic of query processing and database workloads regarding how to characterize workloads and monitor query progress. In [4] they present a modeling approach to estimate the impact of concurrency on query performance for analytical workloads. Their solution relies on the analysis of query behavior in isolation, pairwise query interactions and sampling techniques to predict resource contention. In [5] they proposed a query optimization technique for query processing to improve the query response time. Furthermore, proposing a selection module for query execution by selecting a subset of resources and applying ranking function to improve execution performance for individual queries, however their technique didn't consider other queries running at the same time and load imbalance that may occur during the queries execution. In [6] their approach based on the fact that multiple requests that are executed concurrently, they may have a positive impact on the execution time of the workload. They applied a monitoring approach to derive those impacts. In [7] they propose an architecture for Adaptive Query Processing (AQP), its components communicate with each other asynchronously according to the publish/subscribe model in order to dynamically rebalance intra-operator parallelism across Grid nodes for both stateful and stateless
operations. In [8] authors presented a joint query support in CloudTPS, a middleware layer which stands between a Web application and its data store. The system enforces strong data consistency and scales linearly under a demanding workload composed of join queries and read-write transactions. A workload management is proposed in [9] for controlling the execution of individual queries, they implemented an experimental system that includes a dynamic execution controller that leverages fuzzy logic. Several techniques have been proposed in [10], for dynamically re-distributing processor load assignments throughout a computation to take into account of varying resource capabilities. Also they proposed a novel approach to adaptive load balancing, based on incremental replication of an operator state. In [2] they describe the use of utility functions to co-ordinate adaptations that assign resources to query fragments from multiple queries. As well as, demonstrating how a common framework can be used to support different objectives, specifically to minimize overall query response times. In [11] authors presented a Merge-Partition (MP) query reconstruction algorithm. Their algorithm is able to exploit data sharing opportunities among the concurrent sub-queries. This can reduce the average communication overhead. Although previous researches address several issues in query processing and optimization, our proposed architecture combines the query optimization and query resource allocation with monitoring the concurrent queries execution over the running resources. Furthermore, responding to any load imbalance by applying our workload management system on the cloud environment.
3
The Proposed System's Architecture
Our proposed architecture overcomes the challenge of a low query response time by optimizing the sub-queries. Furthermore, it assigns the sub-queries to the appropriate resources. It manages queries execution to respond to any load imbalance before returning the queries results to the users. Our proposed architecture which is shown in Fig. 1, involves three main sub-systems [3]: 1. Query Optimization Sub-system: Accepts queries from users and then detects the data sharing among the sub-queries of submitted queries from users, therefore specifying the ordering of the queries execution. Finally, it allocates the query to the appropriate resources. The output of this sub-system is the list of the resources that are responsible for the execution of the queries. 2. Workload Manager Sub-system: Manages the queries execution on resources and responds to any load imbalance that may occur throughout the execution. This paper will be focused on presenting this sub-system. The main advantages of this sub-system are the improvement of the query execution performance and overall query response time. It holds the following main processes: ─ Observer: Collects information about throughput and utilization values of each running resource during the queries execution. If these values exceed specific thresholds this means there is a fault with the current execution,
therefore the observer notifies the planner about occurring load imbalance on a specific resource. ─ Planner: Performs the assessment phase; it creates an assessment plan to recover the load on the resources during the queries execution by assigning the failure queries on another suitable replica. ─ Responder: Receives the assessment plan from the planner to respond to the failure that occurs during the queries execution. 3. Integrator Sub-system: Is responsible for collecting the queries results from the resources and partioning the merged queries results that are presented in [11] and finally, retrieving the results to the users.
Fig. 1. The Proposed Enhanced Query Workload Architecture
4
The Implementation of the Proposed System
The proposed system accepts queries from the remote users and then applies the query optimization sub-system which is presented and implemented in [3]. During the queries execution, the importance of managing the workload arises by dynamically revising the resources allocation. So the workload management subsystem is implemented through three main processes: 1. Observer: Dynamically revises and monitors the resources during queries execution by the following steps: ─ Firstly, by collecting the performance information about the running resources every 15 seconds which is ideal [12] for benchmarking scenarios. The performance information is the percentage of processing time which each resource spends on processing queries. The other measurement is the query throughput which is the number of requests received per second. Such information gives a good indicator of just how much load is being placed on the system, which has a direct correlation to how much load is being placed on the processor [13]. ─ Secondly, the observer checks the utilization of the resources processor. In other means whether the query throughput exceeds the specific baseline value and if the processing time on specific resource exceeds 80% [13]. ─ Finally, it notifies the planner with the updated information of the loaded resource to generate an assessment plan to handle the failure that may occur during the execution.
2. Planner: Is implemented to get the notifications from the observer when failure or load may occur on a specific resource. Therefore it creates an assessment plan for handling this load during the queries execution. The following steps are used to implement the planner: ─ Firstly, it collects the performance information about the replicas of the loaded resource, and then it determines the most available unloaded replica to execute the queries. ─ Secondly, it generates the assessment plan based on determining the suitable replica that can execute these queries. ─ Finally, it notifies the responder by the assessment plan with the new queries allocation distribution.
3. Responder: Is implemented to receive and implement the assessment plan from the planner to respond to the load imbalance during the queries execution. The following steps are used: ─ Firstly, it uses the assessment plan to specify the queries with a failure execution, therefore killing the queries execution on the loaded resource. ─ Secondly, it loads the information about the corresponding replica. ─ Finally, it executes the queries on the corresponding replica.
5
Experimental Environment
The TPC-H database [14] is used as our dataset (scale factor 1) to test our work. The TPC-H database has eight relations: REGION, NATION, CUSTOMER, SUPPLIER, PART, PARTSUPP, ORDERS, and LINEITEM. The cloud environment is simulated with the help of a VMWare workstation. A VMWare workstation is the global leader in virtualization and cloud infrastructure [15]. Eight virtual machines are deployed as in Fig. 2, which shows their capabilities and the relations distribution amongst them with an assumption about partitioning the relations horizontally to two parts (ex: Lineitem_P1, Lineitem_P2).
Fig. 2.Capabilities of each Resource with Relations Distribution
Twenty queries that are using the following relations LINEITEM, ORDERS, PART, CUSTOMER are used to test our experiment. Table 1, shows an example of the queries that have been used. The threshold of query throughput is specified by estimating the average transactions per second during peak activity, then using this value as a baseline to compare the query throughput during any stage of the execution. Microsoft Windows Server 2008 and Microsoft Structured Query Language Server (MS SQL server) is used to deploy the TPC-H database. Table 1. Example of five queries used in our experiment
Queries select p_type,l_extendedprice,l_discount from lineitem, part where l_partkey = p_partkey and l_shipdate >= '01-09-1995' select p_type,l_extendedprice,l_discount from lineitem, part where l_partkey = p_partkey and l_shipdate < '01-09-1995' select l_returnflag, l_linestatus from lineitem where l_shipdate < '1998/12/08' select l_shipmode from orders, lineitem where o_orderkey = l_orderkey and l_commitdate < l_receiptdate and l_shipdate < l_commitdate and l_receiptdate >= '1997-01-01' and l_receiptdate < '1998-01-01' select o_orderpriority from orders where o_orderdate >= '1993-07-01' and o_orderdate < '1993-07-01'
6
Evaluations
Table 2 shows examples of the resources that are assigned to execute the merged and non-merged queries after applying our query optimization sub-system which is presented in [3]. After executing twenty queries, VM1 transactions per second exceeds 54, which is the baseline value and its processor utilization exceeds 80% that means there is a load on VM1 during the queries execution. By applying our
Workload Management Sub-system, the latest queries with failure execution on VM1 are assigned to VM5 which is the replica of VM1. In order to evaluate our system the average execution time is computed and compared with applying our proposed system and the query processing technique in [5]. Fig.3 shows that the execution time of the queries with applying our proposed system can reduce the queries execution time, as our proposed system combines the query optimization and query resource allocation of submitted concurrent queries with monitoring these queries execution by the Workload Management sub-system which is not considered in [5]. This experiment was executed for three times and the average response time is calculated. The results show that using our proposed Workload Management Subsystem reduces the queries execution time over the technique presented in [5] by 68%. The results are shown in Table 3. Table 2. The resources selected to execute the merged and non merged queries
Queries select p_type,l_extendedprice,l_discount from lineitem,part where l_partkey = p_partkey and l_shipdate >= '0109-1995 or l_shipdate < '01-09-1995 select l_returnflag, l_linestatus from lineitem where l_shipdate < '1998/12/08' select l_shipmode from orders, lineitem where o_orderkey = l_orderkey and l_commitdate < l_receiptdate and l_shipdate < l_commitdate and l_receiptdate >= '1997-01-01' and l_receiptdate < '1998-01-01' select o_orderpriority from orders where o_orderdate >= '1993-07-01' and o_orderdate < '1993-07-01'
Assigning Virtual Machines
VM1 – VM2
VM1 – VM2
VM1 – VM3
VM1– VM3
Fig.3. The average queries execution time Table 3. The average of measuring the queries execution time
Approaches
7
Average Execution Time(Min)
Using Query Processing Technique in [5]
13.41261
Using our Proposed Technique
4.290434
Conclusion and Future Work
In this paper, a Workload Management technique is proposed to minimize the overall query execution time over cloud computing environment. This is done by monitoring the running resources performance such as processing time and throughput over the cloud computing environment. Furthermore, responding to any load imbalance may occur across these running resources. The results show that applying our proposed system which combines the query optimization and query resource allocation with monitoring the concurrent queries execution by the Workload Management technique over the running resources in cloud computing environment, improves the response time of the concurrent queries. In our future work, the integration sub-system of the proposed architecture will be implemented to collect and partition the merged queries result from the resources and improve the query scheduling mechanism.
8
References 1. Yang, D., Li, J., Han, X., Wang, J.: Ad Hoc Aggregation Query Processing Algorithms based on Bit-store in a Data Intensive Cloud. J Future Generat. Comput. Syst. 29, 725-1735 (2013) 2. Paton, N.W., de Aragão, M.A.T., Fernandes, A.A.A.: Utility-driven Adaptive Query Workload Execution. Future Generation Computer Systems 28, 1070-1079 (2012) 3. Maghawry, E.A., Ismail, R.M., Badr, N.L., Tolba, M.F.: An Enhanced Resource Allocation Approach for Optimizing a Sub-query on Cloud. In: AMLTA, vol. 322, pp. 413-422. Springer, Cairo (2012) 4. Duggan, J., Cetintemel, U., Papaemmanouil, O., and Upfal, E.: Performance Prediction for Concurrent Database Workloads In: SIGMOD, pp. 337-348. Athens (2011) 5. Liu, S., Karimi, A.H.: Grid Query Optimizer to Improve Query Processing in Grids. Future Generation Computer Systems 24, 342-353 (2008) 6. Albuitiu, M.C., Kemper, A.: Synergy based Workload Management. In proceedings of the VLDB PhD Workshop, Lyon (2009) 7. Gounaris, A., Smith, J., Paton, N.W., Sakellariou, R., Fernandes, A.A.A., Waston, P.: Adapting to Changing Resource Performance in Grid Query Processing. In: Pierson, J.M. (ed.) VLDB DMG. LNCS, vol. 3836, pp. 30-44. Springer, Heidelberg (2005) 8. Wei, Z., Pierre, G., Chi, C.: Scalable Join Queries in Cloud Data Stores. IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing, pp. 547-555. Ottawa (2012) 9. Krompass, S., Kuno, H., Dayal, U., Kemper, A.: Dynamic Workload Management for Very Large Data Warehouses: Juggling Feathers and Bowling Balls. In: 33rd international conference on VLDB, pp. 1105-1115. Vienna, Austria (2007) 10. Paton, N.W., Buenabad, J.C., Chen, M., Raman, V., Swart, G., Narang, I., Yellin, D.M., Fernandes, A.A.A.: Autonomic Query Parallelization using Non-dedicated Computers: An Evaluation of Adaptivity Options. VLDB 18, 119-140 (2009) 11. Chen, G., Wu, Y., Liu, J., Yang, G., Zheng, W.: Optimization of Sub-query Processing in Distributed Data Integration Systems. Journal of Network and Computer Applications 34, 1035-1042 (2011) 12.Performance Monitoring, https://software.intel.com/en-us/articles/use-windowsperformance-monitor-for-infrastructure-health 13. Fritchey, G., Dam, S.: SQL Server 2008 Query Performance Tuning Distilled. 2nd ed, USA (2009) 14. Transaction Processing and Database Benchmark, http:// www.tpc.org/tpch/ 15. VMware, http://www.vmware.com/