managing web server performance with autotune agents by y. diao, j. l. hellerstein, s. parekh, j. p....
TRANSCRIPT
![Page 1: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/1.jpg)
Managing Web server performance with AutoTune agents
by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu
Jangwon HanSeongwon Park
2011-12-21
![Page 2: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/2.jpg)
2
Contents
Introduction Apache Web server and performance tuning Self-tuning AutoTune agents Conclusion
Managing Web server performance with AutoTune agents
![Page 3: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/3.jpg)
3
Introduction
Managing the performance of servers which have dynamic workload is challenging
System administrators must frequently tune severs manually to maintain optimal settings
Autonomic controllers can reduce the work of system administrators and provide guaranteed control per-formance.
Managing Web server performance with AutoTune agents
![Page 4: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/4.jpg)
4
Introduction
In this paperPropose an agent-based solution
• Automates the ongoing system tuning • Automatically designs an appropriate tuning mechanism for the
target system
Study the problem of controlling CPU and memory utilization of an Apache Web server using the application-level tuning parameters MaxClients and KeepAlive
Managing Web server performance with AutoTune agents
![Page 5: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/5.jpg)
5
Apache Web server and performance tuning
Apache Web server The most popular Web server
Version 1.3.x of the server on the UNIX
Processes of Apache Web serverMaster process
• Monitors the health of the worker processes and manages their creation and destruction
A pool of worker processes• Communicate with Web clients and generate response• One worker process can handle at most on connection
Managing Web server performance with AutoTune agents
![Page 6: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/6.jpg)
6
Worker process connection
Worker process has three statesIdle
• No TCP connection form the client
Waiting• After TCP connection is accepted, The worker process is wait-
ing for a HTTP
Busy• The worker process is busy in processing the client request
Apache Web server and performance tuning
![Page 7: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/7.jpg)
7
Worker process connection
TCP connection remains open between consecutive HTTP request
Eliminates the overhead for setting up one connection
TCP connection can be terminated by client or by the master process
Apache Web server and performance tuning
![Page 8: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/8.jpg)
8
Performance metric
Utilization of various resources on the serverServer - side metric
Measure CPU and memory utilization
Apache Web server and performance tuning
![Page 9: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/9.jpg)
9
Tuning parameter
MaxClient and KeepAliveIncrease MaxClient
• more client request• Increase CPU and memory utilization
Decrease KeepAlive• Worker processes is more active• Increase CPU utilization
Select the tuning parameter properly to achieve the feasible CPU and memory utilization
Apache Web server and performance tuning
![Page 10: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/10.jpg)
10
Results of manually tuning the Apache web server
Experiment
Keep Alive
CPU Utilization
MaxClients
MemoryUtilization
![Page 11: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/11.jpg)
11
Effects of dynamic workloads on manually tuned Apache server
Experiment
Keep Alive
CPU Utilization
MaxClients
MemoryUtilization
![Page 12: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/12.jpg)
12
Self-tuning AutoTune Agents (1)
Solution to the dynamic workloadServer self-tuning with multiple AutoTune agents
• Automate the entire methodology of controller design• perform the on-line system control• Implement by using Agent Building and Leaning Environment
(ABLE)– provides a comprehensive library of intelligent reasoning and
learning components– Java based toolkit
Managing Web server performance with AutoTune agents
![Page 13: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/13.jpg)
13
Self-tuning AutoTune Agents (2)
Base AutoTune agentPre-made class in ABLE
• Controller– controls adaptor by setting controller parameters and save result
in data repository• Adaptor
– controls target system by given control parameters and save result in data repository
Managing Web server performance with AutoTune agents
![Page 14: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/14.jpg)
14
Self-tuning AutoTune Agents (3)
Managing Web server performance with AutoTune agents
AutoTune agent-based self-tuning systemCreate three agents based on Base AutoTune agent
• modeling agent, control design agent– generating controller for target system
• run-time control agent– For ongoing tuning
![Page 15: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/15.jpg)
15
Modeling Agent (1)
Modeling AgentTo gain relationship (so called system model) between the tuning parameters and performance metrics of target system
• System designer sets experimental controller parameters• Controller (Exiting Signal Generator) sets workload for adaptor• Adaptor applies workload to apache server• Results are sent to control design agent
Self-tuning AutoTune Agents
![Page 16: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/16.jpg)
16
Modeling Agent (2)
System model is shown in matricesCPUk: CPU utilization at the k-th time interval
MEMk: memory utilization at the k-th time interval
A, B: modeling parameters• Identified using the least squares method
– A way to minimize the sum of the squares of the errors when mak-ing an equation
Self-tuning AutoTune Agents
results
Least squared method
![Page 17: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/17.jpg)
17
Control Design Agent (1)
Control Design AgentDesign control parameters base on the system model ob-tained from the modeling agent
• System designer sets design criteria• Controller sets controller design to• Adaptor applies controller parameters• Result is sent to run-time control agent
Self-tuning AutoTune Agents
![Page 18: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/18.jpg)
18
Control Design Agent (2)
Controller parameters are Kp,Ki
Choosing the controller parameters based on mini-mizing the following quadratic cost function :
Self-tuning AutoTune Agents
![Page 19: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/19.jpg)
19
Run-time Control Agent (1)
Run-time control agentMakes control decisions based on feedback mechanism
• Controller parameters from control design agent are applied• System administrator sets desired utilization• Feedback controller sets controller parameter to adaptor• Adaptor applies changes to apache web server• Results are used for feedback controller
Self-tuning AutoTune Agents
![Page 20: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/20.jpg)
20
Run-time Control Agent (2)
Self-tuning AutoTune Agents
Implementing feedback controllerTo make control decisions based on feedback of errors
KP : Proportional control gain for fast response
KI : Integral control gain for removing steady-state error
eCPU: + 0.2eMem: + 0.3
eCPU: + 0.1eMem:+ 0.1
Increase KeepAliveDecrease MaxClients
eCPU: + 0.05eMem:+ 0.02
eCPU: + 0.1eMem:+ 0.1eCPU: + 0.05eMem:+ 0.02
eCPU: + 0.01eMem:+ 0.00
![Page 21: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/21.jpg)
21
Experiment Environment
Self-tuning AutoTune Agents
Environment : Linux 2.2.16, Apache 1.3.19
Workload generator• WAGON
– Web trAffic GeneratOr and beNchmark• Web Stone
– Web site file access distribution :
Experiment 1Static workload
Experiment2Static workload
Dynamic workload
![Page 22: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/22.jpg)
22
Experiment 1
Self-tuning AutoTune Agents
Keep Alive
CPU Utilization
MaxClients
MemoryUtilization
Results with Self-tuning AutoTune AgentsStatic workloads
initialized with KeepAlive = 60, MaxClients = 600
![Page 23: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/23.jpg)
23
Experiment 2
Self-tuning AutoTune Agents
Results with Self-tuning AutoTune AgentsStatic workloads & Dynamic workloads (starting from 20 th interval)
initialized with KeepAlive = 5, MaxClients = 390 aprox.
Keep Alive
CPU Utilization
MaxClients
MemoryUtilization
![Page 24: Managing Web server performance with AutoTune agents by Y. Diao, J. L. Hellerstein, S. Parekh, J. P. Bigu Jangwon Han Seongwon Park 2011-12-21](https://reader035.vdocuments.us/reader035/viewer/2022062404/5518a210550346c31f8b4900/html5/thumbnails/24.jpg)
24
Conclusion
Self-tuning AutoTune Agents
Tuning server manually is annoyingServers which have dynamic workloads should be frequently tuned to be maintained, optimized
Tuning mechanism should be re-designed when target sys-tem is changed
AutoTune Agent-based self-tuning is a way to solve these problem
Automating the ongoing system tuning
Automatically designing an appropriate tuning mechanism for the target system