Design and Evaluation of Self-Management Approaches for Virtual Machine-Based Environments
Total Page:16
File Type:pdf, Size:1020Kb
Fachhochschule Wiesbaden Fachbereich Design Informatik Medien Studiengang Informatik Master-Thesis zur Erlangung des akademischen Grades Master of Science – M.Sc. Design and Evaluation of Self-Management Approaches for Virtual Machine-Based Environments vorgelegt von Dan Marinescu am 29. Februar 2008 Referent: Prof. Dr. Reinhold Kröger Korreferent: Prof. Dr. Steffen Reith II Erklärung gem. BBPO, Ziff. 6.4.2 Ich versichere, dass ich die Master-Thesis selbstständig verfasst und keine anderen als die angegebenen Hilfsmittel benutzt habe. Wiesbaden, 29.02.2008 Dan Marinescu Hiermit erkläre ich mein Einverständnis mit den im Folgenden aufgeführten Verbreitungs- formen dieser Master-Thesis: Verbreitungsform ja nein Einstellung der Arbeit in die √ Bibliothek der FHW Veröffentlichung des Titels der √ Arbeit im Internet Veröffentlichung der Arbeit im √ Internet Wiesbaden, 29.02.2008 Dan Marinescu III IV Contents 1 Introduction 1 2 Background 5 2.1 Virtualization ................................ 5 2.1.1 Taxonomy ............................. 5 2.1.2 Case Study: Xen .......................... 10 2.1.3 Live Migration ........................... 13 2.1.4 Hardware-Assisted Virtualization ................. 16 2.1.5 Management of Vitual Machine Environments .......... 17 2.2 Service Level Management ......................... 20 2.3 Autonomic Computing ........................... 21 2.3.1 Motivation ............................. 21 2.3.2 Taxonomy ............................. 22 2.3.3 Architectural Considerations .................... 23 2.3.4 Examples of Autonomic Computing Systems ........... 24 2.4 Complexity theory and Optimization .................... 25 2.4.1 Introduction to Complexity Theory ................ 25 2.4.2 Complexity Classes ......................... 25 2.4.3 Optimization Problems ....................... 26 2.4.4 The Knapsack Family of Problems ................. 27 2.4.5 Approximation Algorithms ..................... 29 2.4.6 Heuristics .............................. 32 V 3 Analysis 37 3.1 State of the Art ............................... 37 3.1.1 Related Academic Work ...................... 38 3.1.2 Limitations of the Previous Work ................. 42 3.1.3 Commercial Solutions ....................... 43 3.2 Architectural considerations ........................ 44 3.2.1 A Formal Model of the Managed Infrastructure .......... 44 3.2.2 Framework Requirements ..................... 46 3.3 The Resource Allocation Problem ..................... 47 3.3.1 Controller Requirements ...................... 47 3.3.2 Approaches ............................. 48 3.3.3 Heuristics .............................. 49 3.3.4 Approximation Algorithms ..................... 51 3.4 A Bottleneck Determination Mechanism .................. 52 3.4.1 The Expert Systems Approach ................... 53 3.4.2 The Time Series Analysis Approach ................ 55 3.5 The Overprovisioning Problem ....................... 56 4 Design 59 4.1 Architecture of the Framework ....................... 59 4.1.1 The basic concept .......................... 59 4.1.2 The Physical Manager ....................... 61 4.1.3 The VM Manager .......................... 63 4.1.4 The Cluster Manager ........................ 64 4.1.5 The Complete Architecture ..................... 66 4.1.6 The Intra-Manager Communication ................ 66 4.1.7 The Inter-Manager Communication ................ 67 4.2 The Bottleneck Determination Mechanism ................. 69 4.3 The Controller ................................ 70 4.3.1 Algorithm A ............................ 71 4.3.2 Algorithm B ............................ 73 VI 5 Implementation 79 5.1 Software Configuration of the Cluster ................... 79 5.2 The Framework ............................... 80 5.2.1 The Self-Manager Backbone .................... 80 5.2.2 The Physical Manager ....................... 83 5.2.3 The VM Manager .......................... 93 5.2.4 The Cluster Manager ........................ 98 5.2.5 The Inter-Manager Communication ................ 99 5.3 The Bottleneck Determination Mechanism ................. 106 5.4 The Cluster Controller ........................... 111 5.4.1 Algorithm A ............................ 112 5.4.2 Algorithm B ............................ 113 5.5 Code Statistics ............................... 118 6 Evaluation 119 6.1 The Testbed ................................. 119 6.2 Evaluation of the Management Framework ................. 120 6.3 Evaluation of the Cluster Controllers .................... 122 7 Summary 125 8 Bibliography 129 VII VIII List of Figures 2.1 Hosted Architecture ............................. 7 2.2 OS-Layer Virtualization ........................... 8 2.3 Hardware-Layer Virtualization ....................... 9 2.4 The structure of a machine running Xen [BDF+03] ............ 13 2.5 Xen Live Migration [CFH+05] ....................... 15 2.6 An exemplary lifecycle of a hardware-assisted VMM [Int05] ....... 16 2.7 The Xen Management Architecture [Mel07] ................ 18 2.8 Autonomic Element [KC03] ........................ 24 2.9 Complexity Classes ............................. 26 2.10 Search Space Example ........................... 34 2.11 The GA approach .............................. 36 3.1 Example of local search trough the search space .............. 49 3.2 Crossover example ............................. 51 3.3 Operation mode of an expert system .................... 54 3.4 Time series example ............................ 56 4.1 The basic concept .............................. 61 4.2 The Physical Manager ........................... 62 4.3 The VM Manager .............................. 63 4.4 The Cluster Manager ............................ 64 4.5 The complete architecture of the framework ................ 67 4.6 Modular Self-Manager architecture ..................... 68 4.7 Exemplary inter-manager and intra-manager communication ....... 69 4.8 The internal architecture of the VM Logic module ............. 70 4.9 The internal architecture of the Cluster Logic module ........... 70 IX 4.10 Exemplary limitation of Algorithm A ................... 73 4.11 Algorithm B visual example ........................ 77 5.1 The complete architecture of the framework ................ 81 5.2 The architecture of the Self-Manager .................... 81 5.3 The Implementation of the Physical Manager ............... 84 5.4 Using the Xen API to access the Xen hypervisor .............. 90 5.5 The Implementation of the VM Manager .................. 94 5.6 The Implementation of the Cluster Manager ................ 98 5.7 VMProblemSolver UML class diagram ................. 100 5.8 The VM Manager-to-Cluster Manager communication .......... 101 5.9 ClusterMonitorUpdater UML class diagram ............ 103 5.10 The Physical Manager-to-Cluster Manager communication ........ 104 5.11 ClusterRequestProcessor UML class diagram .......... 105 5.12 The Cluster Manager-to-Physical Manager communication ........ 106 6.1 The testbed ................................. 120 6.2 Empirical observations ........................... 121 6.3 Influence of available memory on SLO violations ............. 122 6.4 A scenario comprising two physical machines ............... 123 6.5 A scenario comprising three physical machines .............. 124 X List of Tables 4.1 Exemplary VM-to-PM encoding of two parent-child states ........ 74 5.1 Code statistics ................................ 118 XI XII List of Listings 5.1 Configuration file example ......................... 82 5.2 The Module interface ........................... 82 5.3 The properties of the Physical Manager Monitor module ......... 85 5.4 Extract from the PMMonitor.java, showing how the module proper- ties are loaded ................................ 85 5.5 Extract from the PMMonitor.java, showing how the to be monitored parameters are sent to the Xen module ................... 86 5.6 Extract from the PMMonitor.java, showing how the messages re- ceived from the Xen module are processed ................ 87 5.7 The properties of the Physical Manager Actuator module ......... 88 5.8 The setMemoryVM() from the PMActuator.java ......... 88 5.9 The properties of the Physical Manager Xen module ........... 89 5.10 Extract from the XenManager Python class ................ 91 5.11 Extract from the XenHelper Java class ................... 91 5.12 Extract from XenModule.java, showing how the received messages are processed ................................ 92 5.13 The properties of the SL Monitor module ................. 94 5.14 The subscribeServiceParameters() method of the SL Monitor 95 5.15 Extract from VMActuatorModule.java, showing how a received message is processed ............................ 97 5.16 Extract from ClusterMonitor.java, showing how a message is sent to the Cluster Logic ............................. 99 5.17 The giveMemory() method ....................... 102 5.18 Instantiating and registering a remote object ................ 103 5.19 Updating the gloabl resource view ..................... 104 5.20 Delegating a task to a Physical Managers ................. 106 5.21 Parameters loaded by the VM Logic module ................ 107 XIII 5.22 Updating a TomcatParameter bean ..................... 107 5.23 Calling Jess from inside the VM Logic module .............. 108 5.24 The Jess rule ................................ 109 5.25 The configuration parameters for the Cluster Logic ............ 111 5.26 Algorithm A ................................. 112 5.27 Extract from ClusterState.java ................... 114 5.28 The startKbfsAlgorithm() method ................. 116