Cloud Computing Dipl.-Wirt.-Inform. Robert Neumann
Pre-Cloud Provisioning Provisioned IT Capacity Load Forecast IT Capacity Overbuy Underbuy Fixed Cost for Capacity Investment Hurdle Real Load Time 144
Cloud Elasticity Provisioned IT Capacity Load Precast IT Kapazitäten Elimination of Underbuy Reduction of Overbuy Reduction of Capacity with Declining Load Lower Initial Invest Real Load Zeit 145
Cloud Characteristics -No up-front investment into capital -Pay as you go -Alignment of capacity with demand Cloud Components 1. XaaS 2. Virtualization 3. Multitenancy 4. Business Model Cloud 146
1. XaaS Software as a Service (SaaS) Platform as a Service (PaaS) Infrastructure as a Service (IaaS) Desktop as a Service (DaaS) Employee as a Service (EaaS) Gaming as a Service (GaaS) X as a Service (XaaS) 147
PaaS Service Provider (SP) responsible for - Hosting software - Disaster recovery - Fail-over - Backup management 148
SaaS (e.g., Salesforce) Advantages - No up-front investment - Transparent IT cost - Fast implementation - Process complexity reduction - Procses mobility Disadvantages - Dependency on service provider - Slow data transfer rates - Reduced adaptability - Data and transaction risk 149
PaaS (e.g., Azure, App Engine) Advantages - Computing platform/solution stack - Facilitates deployment of applications - (.Net, JVM) Disadvantages - Lock-in 150
IaaS (e.g., EC2, S3) Advantages - Platform virtualization environment - Compute resources as a service - (VMs, Networks, Storage, etc.) Disadvantages - Risk/availability 151
2. Virtualization -Goal: - Enhance utilization of computing resources - Google server utilization ~ 60% Partial Virtualization Paravirtualization Full Virtualization Hardware-assisted Full Virtualization 152
Partial Virtualization Characteristics - Simulation of multiple instances of hardware - In particular: address spaces - To have independent address spaces for applications - VMs do not host entire OS s! - Fundamental foundation for every OS! 153
Paravirtualization Characteristics: - VM offers special API that can only be used by modified guest OS s - hypercalls to hyerpvisor - (e.g., Win4Lin9x, z/vm, LPARs) 154
Full Virtualization Characteristics - Virtual machine simulates enough hardware to run unmodified guest OS in isolation - Originated by IBM s CP-40, CP-67 in 1966 - Virtual Box, Virtual Iron, Virtual PC, Hyper-V, VMWare ESX 155
Hypervisors/Virtual Machine Monitor (VMM) Type1 (Bare metal) - Run directly on host hardware Type2 (hosted) - Run on conventional operatings systems Products - Hyper-V, VMWare ESX(i), XenServer, KVM 156
Ring priviliges Windows XP: -Kernel Mode (Ring0) -User Mode (Ring3) 157
Ring privileges Privileges? Guest has no direct Access to hardware Hypervisors 158
Virtualization Performance 1. Ring deprivileging Running guest OS at ring higher 0 2. Virtualization of protected mode Binary translation Shadow Page Tables I/O device emulation 159
Binary translation -Rewrite certain instructions that would fail or behave differently when executed above ring 0 - Segment executable into basic blocks - Translate basic blocks to and run on hardware -Static - Translate into basic blocks without running executable - Difficult to find all basic blocks -Dynamic - Translate basic blocks as they are discovered while running executable 160
Shadow page tables - Duplicating Memory Management Unit (MMU) - Contain the guest-virtual to host-physical address mapping -Principle - Denying guest direct access to MMU by: - Trapping access atempts - Emulating them in software Skip intermediate translation! src: http://www.anandtech.com/ show/2480/10 161
Translation Lookaside Buffer (TLB) -Part of the MMU -Address translation is compute-intensive -TLB buffers logical to physical address translation And in Virtualization? src: wikipedia.org 162
Nested Paging (AMD), EPT (Intel) -Context switch (VMExit/VMEntry) very heavy! - Flushes TLB - VM-specific Address Space Identifier (ASID) TLB caches both: -Virtual memory (Guest) to physical memory (Guest) -Physical memory (Guest) to Physical memory (Hardware) Tag Perf. Boost up to 23% (AMD) src: http://www.anandtech.com/ show/2480/10 163
I/O device emulation -Unsupported devices on the guest must be emulated by a device emulator that runs in the host - USB, etc. 164
Popek & Goldberg Virtualization Requirements -Equivalence - VM running on VMM must achieve same behavior as native -Resource control - VMM must be in complete control of virtualized resources -Efficiency - Majority of instructions must be executed without VMM intervention X86 did not meet these requirements! 165
Hardware Assisted Full Virtualization (Hardware Assist) -Full virtualization using hardware capabilities - Intel VT-x, AMD V - Added to X86 in 2006 Ring -1 src: http://www.techarena.in 166
Cloud Scheduling Cloud Optimization Problem: 1. Avoid wasting resources Through under-utilization 2. Avoid lengthy response times Through over-utilization 167
Cloud Scheduling Assumptions: - PM denotes a physical machine, n: {PM} - VM denotes a virtual machine, m: {VM} - VM PM: m 1 - It is desirable to: - Avoid under-utilization Have as many PMs online as necessary - Avoid unstable performance Have just as many VMs assigned to one PM as possible 168
Cloud Scheduling Cloud Frames - Number of PMs might change between frames as: - Number of VMs has changed - Problematic VMs require migration Requires reallocation of VMs and PMs S: Schedule S(m, n): m n S opt Resource allocation problem: NP-hard! (Vector Bin Packing Problem) 169
Cloud Scheduling Multiple Criteria Decision Analysis (MCDA) 1. Feasible In terms of number of migrations Number of migrations: {Migrations} Max 2. Computationally efficient In terms of terminates within reasonable amount of time Schedule compute time: t Compute Max FCOpt: Feasibility-ComputationalEfficiency Optimization FCOpt(t Compute Max, {Migrations} Max ): S S FCOpt (S(m, n) opt) FCOpt Fast-to-compute, feasible, and reasonably good configurations that do not over-utilize or under-utilize any PM 170
MCDA 1. Choosing a VM to migrate from the list of VMs that run on the problematic PM 2. Choosing a PM to migrate the chosen VM to 3. Migrating the chosen VM to the chosen PM 171
Cloud Scheduling Variations Decentral - Simple distributed method (SDM) - Migrate first VM on problematic PM to first available PM - Multiple Criteria Decision Analysis (MCDA) Central (requires arbiter) - First Fit (FF) - First Fit Decreasing (FFD) - Ordered FF (PM or VM size) 172
Cloud Scheduling Results 173
Cloud Scheduling Results 174
Azure Service Platform VMs: Windows Server 2008 R2 VMM: Windows Azure Management Infrastructure: App Fabric 175
The Azure Platform 1. Compute 1. Web role 2. Worker role 2. Storage 1. Table storage 2. Blob storage 3. Queue storage 3. Fabric 1. Services that facilitate VM allocation, fail-over, load balancing 176
Azure App Fabric -Access Control Service - Identify users and grant access -Service Bus - Connection via communication and messaging protocols -Caching - Distributed in-memory cache for Windows and SQL Azure -Integration - Several components of Biztalk -Composite App - API for developing and deploying composite apps. (mashups) 177
Azure App Fabric Azure Enterprise Service Bus 178
3. Multitenancy Definition: - Single instance of software runs on a server serving multiple clients (tenants) - Applications are able to virtually partition tenant data and logic -Multitenancy economies - Cost savings (per-tenant, on-demand, as-you-go) - Harder to develop due to higher complexity - Eased release management -Opposite of multi-instance architecture! - Each tenant runs its own instance 179
4. Cloud Business Models State of the Art: - RAM + CPU: per compute hour - HDD: per Gbyte/month - Network: per Gbyte in or out/month Pay as you go? Cloud Spot Markets: - Procure compute resources in auctions - (e.g., spotcloud.com) 180
Service Level Agreements (SLAs) -Part of a service contract -Measurable details: - MTBF - Availability - Throughput - Response time - etc. 181
Availability Level of Availability Downtime per year 99% 87.6h 99.9% 8.76h 99.99% 52.56m 99.999% 5.26m 99.9999% 31.56s Every additional 9 quadrupels your IT cost! 182
Balancing 9s with cost Industry IT Service Cost/min IT Cost/y Financial Financial Brokerage operations Credit card authorization $107,500 $58,050,000 $43,333 $23,399,820 Retail Home shopping $1,883 $1,016,820 Retail Catalog sales $1,500 $810,000 Transportation Airline reservation $1,483 $800,820 Finance ATM fees $241 $130,140 How to balance? Bachelor/Master Thesis? 183
Literature -http://www.itsmsolutions.com/newsletters/dityvol2iss47.ht m -http://www.cs.rutgers.edu/~rmartin/teaching/spring06/cs55 3/papers/002.pdf -https://dspace.library.uvic.ca:8443/bitstream/handle/1828/2 420/cloud2010.pdf?sequence=1 184