Cloud Computing
Pre-Cloud Provisioning
Load Forecast Real Load Provisioned IT Capacity Overbuy Underbuy Fixed Cost for Capacity IT Capacity Investment Hurdle145 Cloud Computing with Azure
Cloud Elasticity
Zeit IT Kapazitäten Load Precast Real Load Provisioned IT Capacity Lower Initial Invest Reduction of Overbuy Elimination of Underbuy Reduction of Capacity with Declining LoadCloud Characteristics
-No up-front investment into capital
-Pay as you go
-Alignment of capacity with demand
1. XaaS 2. Virtuali-zation 3. Multi-tenancy 4. Business Model Cloud
Cloud Components
147 Cloud Computing with Azure
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)
PaaS
Service Provider (SP) responsible for
- Hosting software - Disaster recovery - Fail-over
149 Cloud Computing with Azure
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
PaaS (e.g., Azure, App Engine)
Advantages
- Computing platform/solution stack - Facilitates deployment of applications - (.Net, JVM)
Disadvantages
151 Cloud Computing with Azure
IaaS (e.g., EC2, S3)
Advantages
- Platform virtualization environment - Compute resources as a service - (VMs, Networks, Storage, etc.)
Disadvantages
2. Virtualization
-Goal:
- Enhance utilization of computing resources - Google server utilization ~ 60%
• Partial Virtualization
• Paravirtualization
• Full Virtualization
153 Cloud Computing with Azure
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!
Paravirtualization
Characteristics:
- VM offers special API that can only be used by modified guest OS‘s
- “hypercalls“ to hyerpvisor
155 Cloud Computing with Azure
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
Hypervisors/Virtual Machine Monitor (VMM)
Type1 (Bare metal)
- Run directly on host hardware
Type2 (hosted)
- Run on conventional operatings systems
Products
157 Cloud Computing with Azure
Ring priviliges
Windows XP:
-Kernel Mode (Ring0) -User Mode (Ring3)
Ring privileges
Hypervisors
Guest has no direct Access to hardware
159 Cloud Computing with Azure
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
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
161 Cloud Computing with Azure
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
src: http://www.anandtech.com/ show/2480/10
Translation Lookaside Buffer (TLB)
-Part of the MMU
-Address translation is compute-intensive
-TLB buffers logical to physical address translation
163 Cloud Computing with Azure
Nested Paging (AMD), EPT (Intel)
-Context switch (VMExit/VMEntry) very heavy!
- Flushes TLB
- VM-specific Address Space Identifier (ASID)
src: http://www.anandtech.com/ show/2480/10
TLB caches both:
-Virtual memory (Guest) to physical memory (Guest) -Physical memory (Guest) to Physical memory (Hardware)
Perf. Boost up to 23% (AMD)
I/O device emulation
-Unsupported devices on the guest must be emulated by a
device emulator that runs in the host
165 Cloud Computing with Azure
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
Hardware Assisted Full Virtualization (Hardware Assist)
-Full virtualization using hardware capabilities
- Intel VT-x, AMD V
- Added to X86 in 2006
167 Cloud Computing with Azure
Cloud Scheduling
Cloud Optimization Problem:
1. Avoid wasting resources
Through under-utilization
2. Avoid lengthy response times
Cloud Scheduling
Assumptions:
- PM denotes a physical machine, n: |{PM}| - VM denotes a virtual machine, m: |{VM}| - VMPM: m1
- 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
169 Cloud Computing with Azure
Cloud Scheduling
Cloud Frames
- Number of PMs might change between frames as: - Number of VMs has changed
- Problematic VMs require migration
S: „Schedule“
Requires reallocation of VMs and PMs
S(m, n): mn Sopt
Resource allocation problem: NP-hard! (Vector Bin Packing Problem)
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: tComputeMax
FCOpt: „Feasibility-ComputationalEfficiency Optimization“
FCOpt(tComputeMax, |{Migrations}|Max): SSFCOpt (S(m, n)opt)FCOpt
171 Cloud Computing with Azure
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
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)
173 Cloud Computing with Azure
175 Cloud Computing with Azure
Azure Service Platform
VMs:
Windows Server 2008 R2
VMM:
Windows Azure
The Azure Platform
1. Compute
1. Web role 2. Worker role2. Storage
1. Table storage 2. Blob storage 3. Queue storage3. Fabric
177 Cloud Computing with Azure
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
Azure App Fabric
179 Cloud Computing with Azure
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!
4. Cloud Business Models
State of the Art:
- RAM + CPU: per compute hour - HDD: per Gbyte/month
- Network: per Gbyte in or out/month
Cloud Spot Markets:
- Procure compute resources in auctions - (e.g., spotcloud.com)
181 Cloud Computing with Azure
Service Level Agreements (SLAs)
-Part of a service contract
-Measurable details:
- MTBF - Availability - Throughput - Response time - etc.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
183 Cloud Computing with Azure
Balancing 9s with cost
Industry IT Service Cost/min IT Cost/y
Financial Brokerage operations
$107,500 $58,050,000 Financial Credit card
authorization
$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