580 likes | 678 Views
Resource Consumption and Allocation of Middleware. Presenter: Longfei Zhang longfeiz@buffalo.edu. Outline. Introduction The Integrated Control Loop-Based Approach The SmartRod Framework Evaluation and Discussion Conclusion and Future Work. Introduction. Introduction- PaaS.
E N D
Resource Consumption and Allocation of Middleware Presenter: Longfei Zhang longfeiz@buffalo.edu
Outline • Introduction • The Integrated Control Loop-Based Approach • The SmartRod Framework • Evaluation and Discussion • Conclusion and Future Work
Introduction-PaaS • Platform as a service (PaaS) is a category of cloud computing services that provide a computing platform and a solution stack as a service. In the classic layered model of cloud computing, the PaaS layer lies between the SaaS and the IaaS layers.
Introduction-Middleware • Middleware is computer software that connects software components or people and their applications. The software consists of a set of services that allows multiple processes running on one or more machines to interact.
Introduction-Middleware(cont.) • It includes web servers, application servers, and similar tools that support application development and delivery. Middleware is especially integral to modern information technology based on XML, SOAP, Web services, and service-oriented architecture
Introduction-Issue • Thousands of cloud applications share and compete for resources simultaneously • Sufficient and necessary resource provision
Introduction-Solution • Integrate and coordinate the resource consumption and allocation management of a cloud application
Introduction-Resource Consumption Management • With a given amount of resource, adjusting the configurations of an application system to improve its resource utilization[1] • Challenge: • Many methods, due to large number of different cloud applications coexisting • Find an unified way
Introduction-Resource Allocation Management • Provide or reclaim appropriate amounts of resources to/from a system to satisfy its special requirements or guarantee its performance[1] • Challenge: • Should be done at the right time to proper extent, and should consider the features of a cloud application itself
Resource Allocation Management • Adjust the resources held by a VM • Xen,Vmware,VirutalBox
Introduction-Integration • The time to integrate • The execution frequency of each management should be adjusted dynamically according to the workload and available resources
Outline • Introduction • The Integrated Control Loop-Based Approach • The SmartRod Framework • Evaluation and Discussion • Conclusion and Future Work
The Integrated Control Loop-Based Approach • IBM autonomic computing[2]
The Integrated Control Loop-Based Approach • A control loop contains four parts: • Monitor • Analyze • Plan • Execute
Introduction-Solution • Leverage two adaptive control loops: • The resource consumption optimization loop[2] • The resource allocation loop[2] • The two loops run consecutively and repeatedly to provide infrastructure resources on-demand by first trying to improve resource utilization, and then allocating more resources when necessary
The Integrated Control Loop-Based Approach-Steps • Monitor • Collect data from the managed system • Analyze • Process and analyze the collected data based on some given policies or guides to determine if a change is necessary • Plan • Make a proper plan for changing • Execute • Put the planned changes into practice
The Resource Consumption Optimization Loop • Improve the resource utilization of a cloud application via management functions provided by the corresponding middleware layers of PaaS • IF performance is unsatisfactory THEN adjusting middleware configurations
The Resource Consumption Optimization Loop-Monitor • Tomcat management items: • threadBusy • threadCount • requestCount • errorCount • maxThreads • Jboss: QueueSize
The Resource Consumption Optimization Loop-Analyze • Set and check the relationship between these monitoring functions or between these functions and preset threshold • Use relationships as system performance metrics: • threadCount less than 85% of threadBusy • errorCount less than 30% of requestCount • threadCount less than 95% of manThreads
The Resource Consumption Optimization Loop-Plan • Select the appropriate adjusting functions and determines the execution frequencies of the selected functions • Multi-objective optimization problem • Paper’s approach: • Establish a quantitative functional relationship between an adjusting function and a performance metric • Use the contribution to the improvement of a performance metric
The Resource Consumption Optimization Loop-Plan • Definition: (Performance Improvement Contribution). PIC(Ai, Mj, Rt) is the contribution to the improvement of the performance metric Mj brought by executing the adjusting function Ai under a given amount of resource allocation Rtat time t. • The value of PIC is calculated as follows: • Pt(Mj), α + β = 1, α, β∈(0, 1), λ∈(0, 0.5]
The Resource Consumption Optimization Loop-Plan • Tomcat • α = β = λ = 0.5 • Ai is an adjusting function that increases maxThreads by 10 • Mj is: threadAlert < 0, where threadAlert= threadBusy – 0.85 × threadCount • P(Mj) is the value of threadAlert • At time t, PICt is 0.64, Pt(Mj) is 4.8. At time t+1, Ai is selected to execute, and Pt+1(Mj) is 2.4. Thus we use equation 1 to calculate the value of PICt+1, which is 0.41
The Resource Consumption Optimization Loop-Plan • Calculate the PIC values after each iteration of the optimization loop. In the next iteration of the loop, it uses these values as the input to the algorithms or methods • Output: sequence of ordered adjusting functions such as: (<Ai, 3>, <Ak, 2>, … , <Am, 1>)
The Resource Consumption Optimization Loop-Plan • Select appropriate optimization functions: • The basic idea is to combine all of the objective functions into a single functional form, called AOF(Aggregate Objective Function)[4] • The AOF of the default algorithm is: AOF = ∑ weight(Mi) × value(Mi). We can see that AOFmax is ∑ weight(Mi) • In the default algorithm, when a performance metric M is true, its value is set to 1, else 0
The Resource Consumption Optimization Loop-Plan • Tomcat • Assume that there exist two performance metrics: M1 and M2. • M1 is threadAlert < 0, where threadAlert=threadBusy – 0.85 × threadCount • M2 is errorAlert < 0, where errorAlert=errorCount – 0.3 × requestCount • M1’s weight is set to 3 and M2’s weight is set to 1 • If AOFcurrent is smaller than AOFmax, the algorithm will select the adjusting function with maximum PIC value to be executed in the execute part of the optimization loop.
The Resource Consumption Optimization Loop-Execute • Perform the adjusting type of management functions provided by a middleware • Tomcat • Increase maxThread • Disable dnsLookUp • Increase acceptCount
The Resource Allocation Loop • Provide or reclaim appropriate amounts of resources to/from the corresponding VM that hosts the cloud application and its supporting middleware
The Resource Allocation Loop • Requires system administrators to specify which kind of resources need to be allocated and the reference values of allocation-amount when executing the resource allocation loop
Outline • Introduction • The Integrated Control Loop-Based Approach • The SmartRod Framework • Evaluation and Discussion • Conclusion and Future Work
The SmartRod Framework • The middleware targeted is java application servers • Tomcat, JBoss, and JOnAS. • The VMs supported • Xen and VirtualBox. • This framework contains two main modules: • RCO implements the resource consumption optimization loop of our approach • RA implements the resource allocation loop
The SmartRod Framework • SmartRod has provided a collection of abstract management functions that includes two types: monitoring and adjusting. These abstract functions can be mapped to the specific management functions of a middleware. • System administrators only have to specify the class name, some parameters such as the amount of threads to be increased, and the mapping attribute (Tomcat), the SmartRod framework will automatically execute the corresponding management functions of the mapped middleware . • Thus this module can adapt to different middleware and applications, and unify optimization solutions
The SmartRod Framework • To leverage SmartRod, users (system administrators) only have to modify three configuration files: • Middleware.xml • VM.xml • Rod.xml
The SmartRod Framework • The Middleware.xml contains the mapping and connection information of the targeted middleware
Outline • Introduction • The Integrated Control Loop-Based Approach • The SmartRod Framework • Evaluation and Discussion • Conclusion and Future Work
Simulated PaaS Environment • Cloud application: • JEE benchmark application from the Web Performance Inc.[3] • Executes the typical transactions of e-business operations • Container: Tomcat • Test driver: LoadRunner
Simulated PaaS Environment • Tomcat configuration maxThreads, which limits the maximum number of threads uesd to process requests • LoadRunner has an adjustable parameter called Vuser, which determines the requests generation rate
Simulated PaaS Environment • Tomcat and the benchmark are running on a Xen VM • LoadRuner is running on another Xen VM • OS: Ubuntu 9.10 server edition • CPU: Intel Core Due 2.66GHz • Memory: 4GB
Manual and Statical Configuration and Allocation • 300 Vusers, increases from 0 to 300 with the rate of starting 20 Vusers every 10 seconds • Each Vuser performs a transaction of the benchmark application 10 times, and all the Vuers are scheduled to run 5 minutes.
Manual and Statical Configuration and Allocation • Throughput Result
Manual and Statical Configuration and Allocation • Response Time Result
Manual and Statical Configuration and Allocation • Test 4 almost always covers the Test 1 • Test 2 and Test 3 are intertwined
Manual and Statical Configuration and Allocation • Issue • Not fully exploit the system’s capability of optimizing resource utilization • Lead to a waste of resources
Dynamic Configuration and Allocation • Without SmartRod(Test 4) allocate 384M memory to the VM hosting the benchmark; and set maxThreadsof Tomcat to be 150. • With SmartRod: • The RCO module runs on the VM that hosts the application and Tomcat. • The RA module runs on the physical machine hosting the VM • The performance metric is threadAlert • The adjusting function to be executed in Tomcat is increasing threadpool by 10 each time. • The resources to provide and reclaim on the fly is 32M memory each time. • The initial maxThreads is 75 and the initial memory allocated is 256M.
Dynamic Configuration and Allocation • Average throughput • “With SmartRod”: 3745KB/s • “Without SmartRod”: 3568KB/s
Dynamic Configuration and Allocation • Average response and 90% response time • “With SmartRod”: 19.27s and 29.66s • “Without SmartRod”: 20.32s and 30.35s
Dynamic Configuration and Allocation • Memory consumption • “With SmartRod” : min: 256M; max: 384M; avg: 340.18M and ends in 352M • “Without SmartRod”: 384M