Dynamic Resource Allocation Based on User ...

3 downloads 8575 Views 617KB Size Report
(3)Moreover, when multiple VMs or processes co-reside on a physical host, ... [14], they set up a dedicated sensor virtual machine for each virtual machine to acquire .... [1] VMware Infrastructure:“Resource Management with VMware DRS”.
Available online at www.sciencedirect.com Available online at www.sciencedirect.com

Procedia Engineering

ProcediaProcedia Engineering 00 (2011) Engineering 15 000–000 (2011) 3780 – 3784 www.elsevier.com/locate/procedia

Advanced in Control Engineering and Information Science

Dynamic Resource Allocation Based on User experience in Virtualized Servers Wei Zhang[1][2]*, Jiajun Liu[1][2], Ying Song[3][4], Mingfa Zhu[1][2], Limin Xiao[1][2], Yuzhong Sun[3][4], Li Ruan[1][2] State Key Laboratory of Software Development Environment, Beijing, 100191, China[1] School of Computer Science and Engineering, Beihang University, Beijing, 100191, China[2] Key Laboratory of Computer System and Architecture, Chinese Academy of Sciences,Beijing, [3] Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China[4]

Abstract Web workloads are known to vary dynamically with time which poses a challenge to resource allocation among the applications. In this paper, we argue that the existing dynamic resource allocation based on resource utilization has some drawbacks in virtualized servers. Dynamic resource allocation directly based on real-time user experience is more reasonable and also has practical significance. To address the problem, we propose a system architecture that combines real time measurements and analysis of user experience for resource allocation. We evaluate our proposal using Webbench . The experiment results show that these techniques can judiciously allocate system resources.

© 2011 Published by Elsevier Ltd. Selection and/or peer-review under responsibility of [CEIS 2011] Open access under CC BY-NC-ND license.

Keywords:resource allocation, virtualized servers, user experience;

1. Introduction The great popularity achieved by Internet applications has encouraged the appearance of data centres that rent out resources to enterprises on demand. Currently, data centres are in the process of adopting a cloud computing model. A key technical feature of cloud computing is server virtualization. Server *

E-mail address: [email protected]; xiaolm,ruanli}@buaa.edu.cn

1877-7058 © 2011 Published by Elsevier Ltd. Open access under CC BY-NC-ND license. doi:10.1016/j.proeng.2011.08.708

2

Wei – 3784 WeiZhang Zhangetetal.al// Procedia ProcediaEngineering Engineering15 00(2011) (2011)3780 000–000

virtualization makes it possible to execute concurrently several virtual machines on top of a single physical machine and support much more fine-grained resource allocation. However, a key challenge that comes with virtualization is the on-demand provision of shared physical resources to virtual machines so as to meet service level requirements , especially in the context of the time-varying workloads. This issue attracts great research interests from industry [1-2] and academia [3-6]. But most of these works are based on the concept of resource utilization. They always define desired resource utilization and decide the physical resource partition through evaluating the difference between the desired resource load and the monitored load. Resource allocation based on resource utilization has several disadvantages. (1) Firstly, More and more applications emerge and applications become much larger and more complex. How to determine desired resource utilization is very difficult. (2)Secondly, in virtualized environments, accurate utilization sampling is more difficult [8]. (3)Moreover, when multiple VMs or processes co-reside on a physical host, the measured resource utilization may provide a poor estimate of the actual requirement [7]. Poor users' experience not only brings the likelihood that users resort to a competitor's web-site, but also affects their perception of the company's products and the company itself. Based on the above analysis, triggering resource reallocation directly based on users' experience information not only is reasonable, but also has practical significance. This paper presents a new resource allocation scheme directly based on users’ experience. Response time is a key user-perceived metric [9] and we mainly use response time as the users’ experience. We decide how to divide physical resources among virtual machines based on response time. We consider CPU allocation which could be generally extended to other resources such as I/O, memory. We deploy our system on Xen-based environment. The experimental results show that our method can help stabilize users’ experience. This paper has the following major contributions. 1) We propose a new resource allocation scheme directly based on real-time user experience avoiding application or operating system modifications, which is obtained through low overhead. 3) We design a prototype system and deploy it on Xen-based environment. The experimental results show that the validity of the proposed approach. 2. System Architecture As seen in Figure 1, multiple virtual machines run on the physical server. Each virtual machine contains an application or a component of the application. Each such application is assumed to specify a desired response time. The goal of system is to ensure that percentile of the response time of application requests is no greater than the desired target percentile of response time.

Fig.1 System Architecture We design a system (illustrated in Figure 1). The system consists of four components: monitor, analyzer, resource request controller, and actuator. The monitor periodically collects information of request packets and response packets. The collected information is fed to the analyzer and is used to acquire current satisfaction level for every virtualized application. The resource request controller creates a performance model for targeted applications. It decides to increase or decrease the amount of resources in order to obtain the desired satisfaction level.

3781

3782

Wei Zhang al. / Procedia Engineering 15 (2011) 3780 – 3784 Wei Zhang et al et / Procedia Engineering 00 (2011) 000–000

We use Xen as our hypervisor in this paper. We mainly use response time as the users’ experience. In order to achieve the desired response time objectives, the system tries to control the CPU share allocation for each VM, assuming that other types of resources may not be the performance bottleneck. 3. System components The system consists of four components, that is, monitor, analyzer, resource request controller, and actuator. These components are described in detailed as follows. 3.1. Monitor Monitor uses capturing tools to acquire packets. We use tshark as our capturing tools. Because all the packets go through domain0, we can directly obtain necessary information from domain0. Compared to [14], they set up a dedicated sensor virtual machine for each virtual machine to acquire information. Their approach has a lot of overhead. 3.2. Analyzer The application's response time is determined by recording the timestamp of packets, request timestamp and response timestamp. The time difference is used as the server-side response time. We assume that network transmission delay is constant and are concerned only with server-side response time. First we introduce the following notations and concepts: N : The number of hosted applications. t : The controlled time interval Rij : The really amount of resource for application i in j th time interval. Ai : Application i

Di : The desired response time of application i d ij : The actual response time of application in the jth time interval.

ε i : Tolerate time deviation from the desired response time about application i Tij : Throughput of application i in the the j th time interval. N ij , Lij , U ij :Number

of requests for application i which response time is located in [Di −εi , Di +εi ],

(0, Di −εi ) or ( Di + ε i ,+∞) in the j th time interval respectively. Analyzer statistics the number of packets N ij , Lij or U ij for each application in each time interval. Such information is passed to resource request controller. 3.3. Resource request controller The resource controller calculates the current satisfaction for each application. We use a function to represent the satisfaction level. (1) Pij = N ij / Tij We define parameter α i which represents the worst tolerance level for application i. That is , if Pij > 1 − α , satisfaction with the application is met.

3

Wei – 3784 WeiZhang Zhangetetal.al// Procedia ProcediaEngineering Engineering15 00(2011) (2011)3780 000–000

4

If Qij = Lij / Tij > α i , the application is considered to be over provision. We should decrease resources for that application. This is because in this scenario, due to take up more resources, the cost becomes higher, net income will become less. If M ij = U ij / Tij > α i , the application is considered to be under provision, we should increase resources for that application. Otherwise, the application performance will be severely affected. In order to determine to increase or decrease the amount of resource, we design a performance model between response time and resource. In [9], X. Wang et.al show that the relationship between response time for web requests and the amount of resources is normally nonlinear. Instead of directly using d ij and Rij to model the system, we build a linear model by using their differences.

ad ij : average response time of application in jth time interval Δd ij = ad ij − Di : deviation from the desired response time ΔRij = Rij − Rij −1 : compared to the previous, the amount of resource should be increased or decreased.

ri : adjustment error for application i β i : coefficient for application i We use the following equation to model the relationship between performance and resource: (2) ΔRij = β i 1 − Pij * Δd ij + ri

(

)

4. Evaluation 4.1. Experimental setup Software environment: The implementation of system prototype is based on Xen(3.3.0) and Linux 2.6.18.8 kernel. We use apache for the web service and Webbench is used to generate workloads. Hardware environment: We use three servers. Each server contains two 2211MHz 8 Core AMD Opeteron(tm) processors with 512KB of cache and 32GB of RAM. One server is used as test machine and the other two as clients. 4.2. Experiments results The evaluation suggest that our method of obtaining response time in the system has a lower overhead compared to [10]. In figure 2, curve sensor ours and no-acquired respectively represent the overhead of domain0 for acquiring response time in [10], our designed method and not taking any method to acquire response time. Sensor brings about 30% higher overhead to domain0 compared to ours. This is because Each package requires additional replication in virtual bridge, and need to transmit from back-end device driver to front-end device driver. In this experiment, we set the demand so that the expected response time for web service should be 750ms. We expect that our system will try to adjust CPU allocation so that SLOs could be met. Figure 3 shows that the results. Curve without controlled and curve controlled respectively represent the response time of web service not using and using our control system. The results show that the mean deviation from the target response time with controlled is less than without controlled.

3783

3784

Wei Zhang al. / Procedia Engineering 15 (2011) 3780 – 3784 Wei Zhang et al et / Procedia Engineering 00 (2011) 000–000

5. Conclusions and Future works This paper designs a system architecture for resource allocation in virtualized servers according to real time users’ experience. The way we acquire information has low cost compared to [10]. We have confirmed the superiority through preliminary experiment.

Fig.2Overhead Compared

Fig.3 Deviation Compare for Web Service

Acknowledgements This study is sponsored by the fund of the State Key Laboratory of Software Development Environment under Grant No. SKLSDE-2009ZX-01, the National Natural Science Foundation of China under Grant No. 60973008, No. 60921002, the Doctoral Fund of Ministry of Education of China under Grant No. 20101102110018, the National "Core electronic devices high-end general purpose chips and fundamental software" project under Grant No.2010ZX01036-001 and the Fundamental Research for the Central Universities under Grant No. YWF-10-02-058. References [1] VMware Infrastructure:“Resource Management with VMware DRS”. [2] http://h18000.www1.hp.com/products/quickspecs/11726_div/11726_div.html [3] P. Padala et.al. Adaptive control of virutalized resources in utility computing environments. In Proceedings of EuroSys, 2007. [4] P. Padala, K. Hou, X. Zhu, M. Uysal, Z. Wang, S. Singhal, A. Merchant, and K. Shin. Automated control of multiple virtualized resources, in Proc. of the EuroSys 2009, Nuremberg, Germany, Mar. 2009. [5] Y. Song, etc. A Service-Oriented Priority-Based Resource Scheduling Scheme for Virtualized Utility Computing, International Conference on High Performance Computing (HiPC), 2008, p.220-231. [6] Xu, J., Zhao, M., Fortes, J., Carpenter, R., Yousif, M.: Autonomic resource management in virtualized data centers using fuzzy logic-based approaches. Cluster Comput. J. 11, 213–227 (2008). [7] D. Ardagna, R. Mirandola, M. Trubian, and L. Zhang. Run-time Resource Management in SOA Virtualized Environments. In QUASOSS2009, 2009. [8] L. Cherkasova and R. Gardner. Measuring CPU overhead for I/O processing in the xen virtual machine monitor. pp. 387–390. Proc. of USENIX Annual Technical Conf., 2005. [9] Y. Wang, X. Wang, M. Chen, and X. Zhu, PARTIC: Power-Aware Response Time Control for Virtualized Web Servers, IEEE Transactions on Parallel and Distributed Systems, 1(1): 1-15,2010. [10] Sangpetch, A., Turner, A., and Kim, H. How to tame your vms: an automated control system for virtualized services., LISA’10, pages 1–16, Berkeley, CA, USA. USENIX Association,2010.

5