CS计算机代考程序代写 hadoop AWS cache matlab capacity planning flex ECS781P

ECS781P
CLOUD COMPUTING
Introduction to Cloud computing
Lecturer: Dr. Sukhpal Singh Gill and Dr Ignacio Castro School of Electronic Engineering and Computer Science

Contents
• Virtualisation
• Datacentres
• Cloud Computing drivers • Cloud Computing
2

Quiz
• Quiz 1
• Basics of Operating Systems
3

Origins of virtualisation
• Virtualisation began in the 1960s
• Method of logically dividing the system resources provided by mainframe computers between different applications
60s
Adapted from: Ken Birman

Virtualisation
• Virtualisation: creation of a virtual version (instead of actual) of something, abstracting from the real details
• Hardware virtualisation consists of showing an abstract computing platform, hiding the physical characteristics of a computing platform from users.
• The VMM (Virtual Machine Monitor) software controls the virtual machines
and mediates with the real hardware
5

Origins of virtualisation
• Computing is expensive!
• Virtualisation began in the
1960s
• Method of logically dividing the system resources provided by mainframe computers between different applications
Adapted from: Ken Birman
6

Origins of virtualisation
• 1970s: IBM VM/370 – A VMM for IBM mainframe • Multiple users, OS environments on expensive hardware
• Desirable when few machines were around
• Popular research idea in 1960s and 1970s
• Entire conferences on virtual machine monitors • Hardware/VMM/OS designed together
• Interest died out in the 1980s and 1990s • Hardware got cheaper
• Operating systems got more powerful (e.g. multi-user) Adapted from: Ken Birman
7

Virtualisation advantages
• Better resource usage
• Processors, RAM and disk space are partitioned among
multiple VMs
• Performance isolation
• Each VM runs independently • Reduced impact of failures
• Failure in one VM does not affect the remaining elements
8

Virtual Machine images
• VM images are handled as files • Contains OS, applications, data
• Memory and device state
• Enables VM migration and replication
• Preconfigured machines are distributed as virtual appliances
• Simplifies initial provisioning
9

VMM Architecture
• Software Abstraction
• Behaves like hardware
• Encapsulates all OS and application state
• Virtualisation Layer
• Extra level of indirection • Decouples hardware, OS • Enforces isolation
• Multiplexes physical hardware across VMs
10

Virtualisation Performance
• Performance depends on the virtualisation technique
• Emulation mimics as faithfully as possible the hardware
platform of the guest VM
• Required for virtualizing different architectures • Huge performance cost
• Paravirtualisation modifies the guest VM so that it is aware of its virtualisation status
• Hardware-assisted virtualisation provides near-optimum performance to guest VMs of the same physical architecture
• Intel VT-x, VT-d instruction sets
11

Virtual Containers
• Lightweight virtualisation model
• Operating System-level virtualisation
• Images only contain libraries and application code • “User space”
• Allocation of resources to container • Faster start-up
• Easy replication
• Worse isolation
12

Traditional virtualisation vs Virtual Containers
Guest OS
VMM VMM
Host OS
Host infrastructure
Host OS
Host infrastructure
Traditional virtualisation
Virtual containers
App App App App App
App App App App App

Virtual Containers vs virtual machines
• Primary difference:
• VMs: complete operating system including the kernel
• Containers: Runs the user mode portion of an operating system.
Source: https://docs.microsoft.com/en-us/virtualisation/windowscontainers/about/containers-vs-vm
14

Contents
• Virtualisation
• Datacentres
• Cloud Computing drivers • Cloud Computing
15

What’s a Datacentre?
Source: http://www.datacenterknowledge.com/leed-platinum-data-centers
Apple’s 500k square foot “iDataCenter ”.
16

Barcelona Supercomputing Center

Datacentres
The 230,000 square foot Citigroup Frankfurt facility datacenter
Source: http://www.datacenterknowledge.com/leed-platinum-data-centers
18

Datacentres
• Datacentres are buildings where multiple servers and communication equipment are colocated because of their common environmental requirements and physical security needs
• Computing power
• Storage capabilities
• Network connectivity
• WSC (Warehouse-Scale Computing): Datacentre that runs a small number of very large applications or services
• E.g. facebook, Twitter, Google Maps..
19

Datacenter architecture: is it something new?
Similar to IBM mainframes from the 70s but…
• Huge scale (20K switches/routers) • High bandwidth (10/40/100G)
• Very low RTT (1-10 microseconds) • Limited geographic scope
• Limited heterogeneity
• Regular/planned topologies

What if a Datacenter is not enough?
PC Server Cluster Datacenter
More datacenters! a network of datacenters!

Datacenters are geographically distributed
Google Cloud backbone
AWS Amazon backbone
22

Global deployment of Datacentres
23

Datacenter architecture

Datacenter architecture

Datacenter architecture

Datacenter architecture

Datacenter architecture

Datacenter architecture

Datacenter architecture
• theInternet/backbonenetwork interconnected to…
• 100scoreswitches interconnected by…
• 1000s aggregation switches interconnected by…
• 1000s top-of-rack (ToR) switches interconnected by…
• 100.000 servers (placed in racks)
Internet

Datacentre structure (hierarchy)
Server (Blade)
Ethernet Switch (Top of the Rack)
Rack
Source: Datacenter as a Computer, 2nd Ed
31

Datacentre Physical Architecture
Source: Datacenter as a Computer, 3rd Ed
32

Datacentre shared resources
34
Relative latency/bandwidth/capacity of each resource pool

Datacentre Design Requirements
• Datacentres typically run two types of applications • outward facing (e.g., serving web pages to users)
• internal computations (e.g., MapReduce for web indexing)
• Workloads often unpredictable:
• Multiple services run concurrently within a DC
• Demand for new services may unexpectedly spike
• Failures of servers are the norm
• WSC applications (MapReduce, NoSQL, etc.) resort to dynamic re-assignment of
chunks to deal with failures
• Data is often replicated
• “Traffic matrix” between servers constantly changing
35

Datacentre Costs
• Total cost varies
• upwards of $1/4 B for mega data center
• server costs dominate
• network costs significant
• Long provisioning timescales:
• new servers purchased quarterly at best
Amortized Cost*
Component
Sub-Components
~45%
Servers
CPU, memory, disk
~25%
Power infrastructure
UPS, cooling, power distribution
~15%
Power draw
Electrical utility costs
~15%
Network
Switches, links, transit
*3 yr amortization for servers, 15 yr for infrastructure; 5% cost of money
Source: the Cost of a Cloud: Research Problems in Data Center Networks. Sigcomm CCR 2009.
11

Quiz
• Quiz 2
• Virtualisation • Datacentres
37

Contents
• Virtualisation
• Datacentres
• Cloud Computing drivers • Cloud Computing
38

Scalability
• Ability of a system, network, or process, to handle growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth
▪Vertical scaling: Upgrade machine capabilities (RAM, processor,…). Aka scale up
▪Horizontal scaling: Replicate the functions in additional machines spreading the load among them. Aka scale out

Utility Computing
“Computing may someday be organized as a public utility” – John McCarthy, MIT Centennial in 1961
• Instead of purchasing the computing equipment, it is rented to a provider
• A provider hosts large datacenter
• Metered billing (pay for what you use)
• Simple to use interface to access the capability (e.g., plugging into an outlet)
• From fixed costs to variable costs
40

Cloud Computing
• Cloud computing is a model for enabling convenient, on- demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.
NIST, 2011
41

Essential Cloud Characteristics
• Pervasive network access • Location independence
• High availability
• Resource pooling and partitioning
• Extensive use of virtualisation
• Automated management for cloud clients • Rapid elasticity
42

Cloud driver: cost saving, capacity planning
Colocation Managed Cloud
Time
Weeks to Months
Days to Weeks
Minutes
Scalability
Slowest, Rigid & Costly
Slower, somewhat flexible, Costly
Instant, Flexible, Pay-per-usage
Cost
High CapEx
Costly, sometimes month/year contracts, no CapEx
No contracts, usage based, no upfront costs
Pricing model
Buy Servers & Colo costs whether used or not
Rent Servers & Hosting costs whether used or not
Rent based on usage only
43

Cloud driver: agility
• Elasticity consists of changing dynamically the capabilities of an existing cloud resource
• Elasticity allows cloud resources to easily adapt to changes in the requirements / expected load
• supporting a Mobile App, as nr of clients increases • increasing capacity of livescore service on Sundays
• Two main elasticity techniques
• Migration to a different profile of VM
• Replication and load balancing among multiple
44

Elasticity: Shifting the Risk
• Oneofthemaineconomicappealscanbe described as “converting capital expenses to operating expenses” but this can be simplified by think of it as a “pay as you go” model
• HourspurchasedviaCloudComputingcan be distributed non-uniformly in time (e.g. use 100 server-hours today and no server-hours tomorrow and still only pay for what you use)
45

Elasticity: Shifting the Risk
• Inbandwidthtermsthisnowasusage- based pricing
• There is no up-front capital expense
• Elasticity is Cloud Computing’s ability to add or remove resources at a fine grain (usually one server at a time) with a lead time of minutes rather than weeks
46

Elasticity: Shifting the Risk
• Thisallowsthematchingofresourcesto workloads much more closely
• Server utilisation in data centres ranges from 5% to 20%
• Ingeneralpeakworkloadsexceedsthe average by factors of 2 to 10 so this is consistent with utilisation levels
47

Elasticity: Shifting the Risk
• Thekeyadvantageofelasticityisthatit reduces the risk of overprovisioning (underutilisation) and underprovisioning (saturation)
• Mostusersdeliberatelyprovisionforthe expected peak and allow resources to remain idle at non peak times
• Themorepronouncedthevariationthe greater the waste
48

Elasticity: Shifting the Risk
• Consider the following example which shows how elasticity can reduce waste and thus, more than compensate for the potentially higher cost per server-hour of pay as you go vs buying
• Aservicehaspredictabledailydemand where the peak require 500 servers at noon but the trough requires only 100 servers at midnight
49

Elasticity: Shifting the Risk
• If we shift to a cloud service which matches the server number to the demand we can reduce server costs by 40% (7200/12000 * 100 = 60%)
• As long as the pay as you go cost per server hour over the amortization period (3 years is typical) we can save money using cloud computing
50

Elasticity: Shifting the Risk
• These examples actually underestimate the benefits of cloud computing
• Inadditiontodiurnalpatternsmostnontrivial service also experience seasonal or other periodic demands which need to be incorporated into the analysis
51

Elasticity: Shifting the Risk
• ForexampleEbayexperiencesgreater traffic in December
• Additionally, there can be unexpected demand bursts due to external events (news events) which need to be provisioned for when buying hardware
• Itismucheasiertoadjustfortheseevents with cloud computing
52

Transference of Risk
• Itisfrequentlydifficulttopredictpeak utilisation
• While it is more difficult to predict the monetary effects of underprovisioning they are as just serious as the effects of overprovisioning
• Rejectedusergeneratezerorevenueand may not come back due to poor service
53

Transference of Risk
• When Animoto made its service available via Facebook it experienced a demand surge that resulted in growing from 50 servers to 3500 servers in three days
• Noonecouldhaveforeseenthatresource needs would suddenly double every 12 hours for 3 days
• Incasesliketheseelasticityisnotacost optimisation but an operational requirement
54

The cloud is a money maker
• Amazon(2019) ▪Microsoft(2019)
Net SalesOperating profits
Revenue by product
Source: https://www.hl.co.uk/news/articles/how-technology-companies-make-their-money

Cloud Service Models (NIST)
• Depending on the types of resources offered by the cloud: • Software as a Service (SaaS)
• Use provider’s applications over a network • Platform as a Service (PaaS)
• Deploy customer-created applications to a cloud • Infrastructure as a Service (IaaS)
• Rent processing, storage, network capacity, and other fundamental computing resources
56

IaaS vs PaaS
• IaaS is “more powerful” as more tools available and customization possible
• But there is a price
• User responsible for scaling applications (Some tools like Amazon’s Autoscaling can help but configuration required)
• User responsible for updating OS and machine image (Happens automatically on PaaS)
• In general PaaS less complex as many concepts are abstracted from the user
57

Cloud Deployment Models (NIST)
• Public cloud
• Sold to the public, mega-
scale infrastructure • ‘Infinite’ capability • Metered usage
• Private cloud
• Enterprise owned or leased • Tight security control
• Hybrid cloud
• Composition of public and
private clouds
58

Contents
• Virtualisation
• Datacentres
• Cloud Computing drivers • Cloud Computing
59

What is NOW Cloud Computing?
• Ubiquitousservices • “The Cloud”
• Utility computing model
• IaaS, Paas, *aaS
• Computing in the cloud
• Virtualisation
• Elasticity, scalability
• Datacentre 2.0, 3.0: Custom HW • Cloud computing infrastructure
• Scale
• Massively multi user
• Big data challenges, WSC
• Scalability, reliability, resilience • Cloud applications
Process Component
Service Interface
Business Object
60

Cloud-based applications
REST SERVICES REST SERVICES
REST Services
Serverless
Event Processing
Dataflow Languages
Batch Data Processing
61

“Cloud applications” components
• “Services”(REST). Accessed by millions of devices (smartphones, tablets, PCs?)… RPC, mostly consumer-based
• Traffic varies wildly… agile scalability
• Replication, load balancing, caches, state management
• CDNs have similar requirements
• Data acquisition services
• Realtimerequirements
• Scalability,reliabilitychallenges
• Data processing services.
• Huge amounts of data // millions of devices
• Parallelcomputinglanguages
• Dataflowlanguages
• Scalability,reliability
• Data storage
• Scalability -> Partitioning
• Datainteroperability,Merging
62

Mobile Interactive Applications
• MobileServiceswhichrelyonlargedata centres which are most conveniently stored in large data centres
• Additionally, it is desirable to limit the computation carried out on a mobile device to maximise battery life
• Google Maps is a good example of this
63

Parallel batch processing
• Batch processing and analytics jobs can analyse terabytes of data and take hours to finish
• If there is enough parallelism, users can use hundreds of servers to complete the job quickly
• ToolssuchasHadoopcanbeusedto reduce the complexity of implementing these jobs
64

Extension of compute-intensive desktop applications
• Thelatestversionsofmathematicssoftware package Matlab and Mathematica are capable of using Cloud Computing to perform expensive evaluations
• Other applications could benefit from this provided it is quicker to move data to and from the cloud
• 3DS Max supports rendering in the cloud
65

Roadmap for this module
• Network layer: • Networking
• Application layer:
• Client/server, RPC, Web Services • REST
• Performance: • SLA
• Management • Security
• Trends
• Monolithic applications→ microservices
• Serverless: “hide complexity”

Quiz
• Quiz 3
• Cloud Computing Concepts
67

Lab
• There is no lab on Thursday this week.
• Please accept Amazon Educate Invitation to do lab exercises
68

Feedback and Survey
• Google Form
• Link is also in MS Teams Chat
• https://forms.gle/KWfeUsTAjZgtwAVY6
69