week 5_watermark.docx
Document Details
Uploaded by InvincibleNickel
Full Transcript
#### ![](media/image2.png)CLOUD COMPUTING SLA - Tutorial #### What is Service Level Agreement? - ![](media/image2.png)A formal contract between a Service Provider (SP) and a Service Consumer (SC) - SLA: foundation of the consumer's trust in the provider - Purpose : to define a formal...
#### ![](media/image2.png)CLOUD COMPUTING SLA - Tutorial #### What is Service Level Agreement? - ![](media/image2.png)A formal contract between a Service Provider (SP) and a Service Consumer (SC) - SLA: foundation of the consumer's trust in the provider - Purpose : to define a formal basis for performance and availability the SP guarantees to deliver - SLA contains Service Level Objectives (SLOs) - Objectively measurable conditions for the service - SLA & SLO: basis of selection of cloud provider 2 #### ![](media/image2.png)Problem-1 Cloud SLA: Suppose a cloud guarantees service availability for 99% of time. Let a third party application runs in the cloud for 12 hours/day. At the end of one month, it was found that total outage is 10.75 hrs. 3 #### Problem-2 - Availability guarantee: 99.95% time over the service period - Service period: 30 days - Maximum service hours per day: 12 hours - Cost: \$50 per day 4 ![](media/image3.jpeg) 5 ![](media/image1.jpeg) 1 #### Cloud Properties: Economic Viewpoint - ![](media/image2.png)**C**ommon Infrastructure - pooled, standardized resources, with benefits generated by statistical multiplexing. - **L**ocation-independence - ubiquitous availability meeting performance requirements, with benefits deriving from latency reduction and user experience enhancement. - **O**nline connectivity - an enabler of other attributes ensuring service access. Costs and performance impacts of network architectures can be quantified using traditional methods. #### Cloud Properties: Economic Viewpoint *(contd...)* - ![](media/image2.png)**U**tility pricing - usage-sensitive or pay-per-use pricing, with benefits applying in - on-**D**emand Resource**s** - scalable, elastic resources provisioned and de-provisioned without #### Utility Pricing in Detail ![](media/image5.png)CT= ![](media/image3.jpeg) - Because the baseline should - When utility premium is less than ratio of peak demand to Average demand #### Utility Pricing in Real World - ![](media/image2.png)In practice demands are often highly spiky - Often a hybrid model is the best - You own a car for daily commute, and rent a car when traveling or when you need a van to move - Key factor is again the ratio of peak to average demand - But we should also consider other costs - Network cost (both fixed costs and usage costs) - Interoperability overhead - Consider Reliability, accessibility #### Value of on-Demand Services - ![](media/image2.png)Simple Problem: When owning your resources, you will pay a penalty whenever your resources do not match the instantaneous demand I. Either pay for unused resources, or suffer the penalty of missing service delivery D(t) -- Instantaneous Demand at time t R(t) -- Resources at time t - *If demand is flat, penalty = 0* - *If demand is linear periodic provisioning* #### ![](media/image2.png)Penalty Costs for Exponential Demand - Penalty cost 𝖺 ∫ \|𝐷 \ \|𝑑𝑡 - If demand is exponential (*D(t)=e^t^)*, any fixed provisioning interval (*tp*) according to the current demands will fall exponentially behind - *R(t) =* 𝑒^𝑡−𝑡^𝑝 - *D(t) -- R(t) =* 𝑒^𝑡^ − 𝑒^𝑡−𝑡^𝑝 = 𝑒^𝑡^ 1 − 𝑒^𝑡^𝑝 = 𝑘1𝑒^𝑡^ - Penalty cost 𝖺*c.k~1~e^t^* ![](media/image3.jpeg) #### Assignment 1 8 #### ![](media/image3.jpeg)Assignment 2 ![](media/image20.png) #### Assignment 3 -- -- -- -- -- -- - Calculate the price of a core-hour on in-house server and cloud server. - Find the cost/effective-hour for both the options. - Calculate the ratio of the total cost/effective-hour for in-house to cloud deployment. - If the efficiency of in-house server is increased to 70%, which deployment will have now better total cost/effective-hour? ![](media/image3.jpeg) 11 ![](media/image1.jpeg) #### Cloud Computing : 1 ### ![](media/image3.jpeg)Introduction - MapReduce: programming model developed at Google - Objective: - Implement large scale search - Text processing on massively scalable web data stored using BigTable and GFS distributed file system - Designed for processing and generating large volumes of data via massively parallel computations, utilizing tens of thousands of processors at a time - Fault tolerant: ensure progress of computation even if processors and networks fail - Example: - Hadoop: open source implementation of MapReduce (developed at Yahoo!) - Available on pre-packaged AMIs on Amazon EC2 cloud platform 9/11/2017 2 ### ![](media/image3.jpeg)MapReduce Model - Parallel programming abstraction - Used by many different parallel applications which carry out large-scale computation involving thousands of processors - Leverages a common underlying fault-tolerant implementation - Two phases of MapReduce: - Map operation - Reduce operation - A configurable number of M 'mapper' processors and R 'reducer' processors are assigned to work on the problem - The computation is coordinated by a single master process - Map phase: - ![](media/image3.jpeg)Each mapper reads approximately *1/M* of the input from the global file system, using locations given by the master - Map operation consists of transforming one set of key-value pairs to - Each mapper writes computation results in one file per reducer - Files are sorted by a key and stored to the local file system - The master keeps track of the location of these files - ![](media/image2.png)**Reduce phase:** - The master informs the reducers where the partial computations have been stored on local files of respective mappers - Reducers make remote procedure call requests to the mappers to fetch the files - Each reducer groups the results of the map step using the same key and performs a function *f* on the list of values that correspond to these key value: - Final results are written back to the GFS file system ### ![](media/image3.jpeg)MapReduce: Example - ![](media/image2.png)3 mappers; 2 reducers - Map function: - ![](media/image29.png)Reduce function: 9/11/2017 6 Problem-1 --------- ![](media/image2.png)In a MapReduce framework consider the HDFS block size is 64 MB. We have 3 files of size 64K, 65Mb and 127Mb. How many blocks will be created by Hadoop framework? Problem-2 --------- ![](media/image2.png)Write the pseudo-codes (for map and reduce functions) for calculating the average of a set of integers in MapReduce. Problem-3 --------- ![](media/image2.png)Compute total and average salary of organization XYZ and group by based on gender (male or female) using MapReduce. The input is as follows Problem-4 --------- ![](media/image3.jpeg) 11 ![](media/image30.jpeg) #### CLOUD COMPUTING Resource Management - I #### ![](media/image31.jpeg)Different Resources in Computing 2 #### Resources types - ![](media/image2.png)Physical resource - Computer, disk, database, network, scientific instruments. - Logical resource - Execution, monitoring, communicate application. 3 #### Resources Management - ###### ![](media/image2.png)The term ***resource management*** refers to the operations used to control how capabilities provided by Cloud resources and services cane be made available to other entities, whether users, applications, services in an *efficient* manner. 4 #### Data Center Power Consumption - ![](media/image2.png)Currently it is estimated that servers consume 0.5% of the world's total - Server energy demand doubles every 5-6 years. - This results in large amounts of CO~2~ produced by burning fossil fuels. - Need to reduce the energy used with minimal performance impact. 5 ![](media/image2.png)Economic - New data centers run on the Megawatt scale, requiring millions of dollars to operate. - Recently institutions are looking for - Many facilities are at their peak operating stage, and cannot expand without a new power source. - Majority of energy sources are fossil - Huge volume of CO~2~ emitted each year - Sustainable energy sources are not ready. - Need to reduce energy dependence 6 - ###### Advanced scheduling schemas to reduce energy consumption. - Power aware - Thermal aware - ###### Performance/Watt is not following Moore's law. - Data center designs to reduce Power Usage Effectiveness. - Cooling systems - Rack design 7 #### ![](media/image31.jpeg)Research Directions ###### How to conserve energy within a Cloud environment. - Schedule VMs to conserve energy. - Management of both VMs and underlying infrastructure. - Minimize operating inefficiencies for non-essential tasks. - Optimize data center design. 8 #### ![](media/image31.jpeg)Steps towards Energy Efficiency ![](media/image33.png) 9 #### VM scheduling on Multi-core Systems - ![](media/image2.png)There is a nonlinear relationship between the number of processes used and power consumption - We can schedule VMs to take advantage of this relationship in order to conserve power 10 - ![](media/image2.png)Schedule as many VMs at once on - Greedy scheduling algorithm - Keep track of cores on a given - Match VM requirements with node 11 ##### ![](media/image64.png)![](media/image82.png)![](media/image2.png)485 Watts vs. 552 Watts ! 12 #### VM Management - ![](media/image2.png)Monitor Cloud usage and load. - When load decreases: - Live migrate VMs to more utilized nodes. - Shutdown unused nodes. - When load increases: - Use WOL to start up waiting nodes. 13 14 #### ![](media/image31.jpeg)Minimizing VM Instances - Virtual machines are loaded! - Lots of unwanted packages. - Unneeded services. - Are multi-application oriented, not service oriented. - Clouds are based off of a Service Oriented Architecture. - Need a custom lightweight Linux VM for service oriented science. - Need to keep VM image as small as possible to reduce network latency. ![](media/image190.png) 15 - Start with Ubuntu 9.04. - ![](media/image2.png)Remove all packages not - required for base image. - No X11 - No Window Manager - Minimalistic server install - Can load language support on demand (via package - Readahead profiling utility. - Reorder boot sequence - Pre-fetch boot files on disk - Minimize CPU idle time due to I/O delay - Optimize Linux kernel. - Built for Xen DomU - No 3d graphics, no sound, minimalistic kernel 16 ##### ![](media/image31.jpeg)Energy Savings - Reduced boot times from 38 seconds to just **8** seconds. - 30 seconds @ 250Watts is 2.08wh or.002kwh. - In a small Cloud where 100 images are created every hour. - Saves.2kwh of operation @ 15.2c per kwh. - At 15.2c per kwh this saves \$262.65 every year. - In a production Cloud where 1000 images are created every minute. - Saves 120kwh less every hour. - At 15.2c per kwh this saves over 1 million dollars every year. - Image size from 4GB to 635MB. - Reduces time to perform live-migration. - Can do better. ##### ![](media/image31.jpeg)Summary - 1 - Cloud computing is an emerging topic in Distributed Systems. - Need to conserve energy wherever possible! - Green Cloud Framework: - Power-aware scheduling of VMs. - Advanced VM & infrastructure management. - Specialized VM Image. - Small energy savings result in a large impact. - Combining a number of different methods together can have a larger impact then 18 ##### ![](media/image31.jpeg)Summary - 2 - Combine concepts of both Power-aware and Thermal-aware scheduling to - Integrated server, rack, and cooling strategies. - Further improve VM Image minimization. - Designing the next generation of Cloud computing systems to be more efficient. 19 ![](media/image31.jpeg) Thank you! ========== ![](media/image30.jpeg) #### CLOUD COMPUTING Resource Management - II #### ![](media/image31.jpeg)Different Resources in Computing 2 #### Resources types - ![](media/image2.png)Physical resource - Computer, disk, database, network, scientific instruments. - Logical resource - Execution, monitoring, communicate application. 3 #### Resources Management - ###### ![](media/image2.png)The term ***resource management*** refers to the operations used to control how capabilities provided by Cloud resources and services cane be made available to other entities, whether users, applications, services in an *efficient* manner. 4 - Infrastructure-as-a-Service (IaaS) is most popular cloud service - In IaaS, cloud providers offer resources that include computers as virtual machines, raw (block) storage, firewalls, load balancers, and network devices. - One of the major challenges in IaaS is resource management. 5 #### ![](media/image31.jpeg)Resource Management - Objectives - Scalability - Quality of service - Optimal utility - Reduced overheads - Improved throughput - Reduced latency - Specialized environment - Cost effectiveness - Simplified interface 6 - CPU (central processing unit) - Memory - Storage - Workstations - Network elements - Sensors/actuators 7 - ![](media/image2.png)Operating system - Energy - Network throughput/bandwidth - Load balancing mechanisms - Information security - Delays - APIs/(Applications Programming Interfaces) - Protocols 8 #### Resource Management Aspects - ![](media/image2.png)Resource provisioning - Resource allocation - Resource requirement mapping - Resource adaptation - Resource discovery - Resource brokering - Resource estimation - Resource modeling 9 ![](media/image2.png)Resource Management -- -- -- -- 10 ![](media/image2.png)Resource Provisioning Approaches +-----------------------------------+-----------------------------------+ | **Nash equilibrium approach using | Run time management and | | Game** | allocation of IaaS resources | | | considering several criteria such | | **theory** | as the heterogeneous | | | | | | distribution of resources, | | | rational exchange behaviors of | | | cloud users, incomplete common | | | information and dynamic | | | successive allocation | +-----------------------------------+-----------------------------------+ | **Network queuing model** | Presents a model based on a | | | network of queues, where the | | | queues represent different tiers | | | of the application.The model | | | | | | sufficiently captures the | | | behavior of tiers with | | | significantly different | | | performance characteristics and | | | application idiosyncrasies, such | | | as, session-based workloads, | | | concurrency limits, and caching | | | at intermediate tiers | +-----------------------------------+-----------------------------------+ | **Prototype provisioning** | Employs the k-means clustering | | | algorithm to automatically | | | determine the workload mix and a | | | queuing model to predict | | | | | | the server capacity for a given | | | workload mix. | +-----------------------------------+-----------------------------------+ | **Resource (VM) provisioning** | Uses virtual machines (VMs) that | | | run on top of the Xen hypervisor. | | | The system provides a Simple | | | Earliest Deadline First | | | | | | (SEDF) scheduler that implements | | | weighted fair sharing of the CPU | | | capacity among all the VMs | | | | | | The share of CPU cycles for a | | | particular VM can be changed at | | | runtime | +-----------------------------------+-----------------------------------+ | **Adaptive resource | Automatic bottleneck detection | | provisioning** | and resolution under dynamic | | | resource management which has the | | | potential to enable cloud | | | infrastructure providers to | | | provide SLAs for web applications | | | that guarantee specific response | | | time requirements | | | | | | while minimizing resource | | | utilization. | +-----------------------------------+-----------------------------------+ | **SLA oriented methods** | Handling the process of dynamic | | | provisioning to meet user SLAs in | | | autonomic manner. Additional | | | resources are | | | | | | provisioned for applications when | | | required and are removed when | | | they are not necessary | +-----------------------------------+-----------------------------------+ | **Dynamic and automated | A dynamic and automated framework | | framework** | which can adapt the adaptive | | | parameters to meet the specific | | | accuracy goal, and then | | | dynamically converge to | | | near-optimal resource allocation | | | to handle unexpected changes | +-----------------------------------+-----------------------------------+ | **Optimal cloud resource | The demand and price uncertainty | | provisioning** | is considered using optimal cloud | | | resource provisioning (OCRP) | | **(OCRP)** | including deterministic | | | | | | equivalent formulation, | | | sample-average approximation, | | | etc. | +-----------------------------------+-----------------------------------+ 11 ![](media/image2.png)Resource Allocation Approaches -- -- -- -- 12 -- -- -- -- 13 -- -- -- -- 14 Performance Metrics for Resource Management - ![](media/image2.png)Reliability - Ease of deployment - QoS - Delay - Control overhead 15 ![](media/image2.png)Thank you! ===============================