Sunteți pe pagina 1din 25

Simulating

Clouds in
CloudSim
Project
● 4 points (up to a maximum of 5)
● select one of the ideas offered by us (or a new one) by November 6 and
decide how you want to implement it
● have a discussion with your assistant (live or by mail) in weeks 6-7 and tell
him about your proposal
● present preliminary work in weeks 10-12 (1 point from the final grade)
● present final project in weeks 13-14
● 1 point can be obtained if you come up with something extra (discuss
with your assistant)
Cloud computing
● delivers infrastructure, platform, and software that are made available as
subscription-based services in a pay-as-you-go model to consumers
● Cloud-based application services:
○ social networking
○ web hosting
○ content delivery
○ real-time instrumented data processing
● a type of parallel and distributed system consisting of a collection of
inter-connected and virtualized computers that are:
○ dynamically provisioned
○ presented as one or more unified computing resources based on SLAs
○ SLAs established through negotiation between the service provider and consumers
Cloud computing (2)
● dynamically adapt (scale-up or scale-down) the amount of resources
provisioned to an application (elasticity)
● types:
○ public - available to any user on a pay-as-you-go model
○ private - only for users of the organization that owns the cloud
○ hybrid
● layered design:
○ cloud applications - applications directly available to end-users
○ user-level middleware - software platforms for creating UIs for browser-based
applications
○ core middleware - platform-level services that provide run-time environment for hosting
and managing User-Level application services
○ system level - physical resources that power the data centers (virtualization)
Cloud architecture [1]
CloudSim
● extensible simulation toolkit that enables modeling and simulation of
Cloud computing systems and application provisioning environments
● supports system and behavior modeling of Cloud system components:
○ data centers
○ virtual machines (VMs)
○ resource provisioning policies
● not possible (or expensive) to perform benchmarking experiments in
repeatable, dependable, and scalable environments using real-world
Cloud environments
Advantages
● time effectiveness: it requires little effort and time to implement a
Cloud-based application provisioning test environment in CloudSim
● flexibility and applicability: developers can model and test the
performance of their application services in heterogeneous Cloud
environments with little programming and deployment effort
Features
● support for modeling and simulation of large-scale Cloud computing
environments on a single physical computing node
● a self-contained platform for modeling Clouds, service brokers,
provisioning, and allocation policies
● support for simulation of network connections among the simulated
system elements
● facility for simulation of federated Cloud environment that inter-networks
resources from both private and public domains
● multi-layered design
Architecture [1]
Basic components
REGISTER Cloud Information
Datacenter Service (CIS)
Host Host
GET DATACENTER
CHARACTERISTICS
PE PE

PE PE Broker
CHOOSE
DATACENTER
VM VM
RUN
Host Host

Cloud- Cloud- Cloud-


let let let

RUN
Basic components (2)
● Datacenter - contains multiple hosts
● Host - can have multiple virtual machines
● Vm - one or more PEs (Processing Elements)
● Cloudlet - task
● DatacenterBroker - selects a Datacenter based on the user’s VMs and
Cloudlets, and forwards the execution to that particular Datacenter; the
default implementation selects the first datacenter that can allocate the
required resources for the VMs
Policies
● VmAllocationPolicy - specifies how hosts are allocated to virtual
machines in a datacenter (i.e. takes a virtual machine received from the
broker and tries to find a host where it can allocate it); default allocation
Policy is VmAllocationPolicySimple
● VmScheduler - policy used by a Virtual Machine Monitor (VMM) to share
processing power among VMs running in a host; default implementations
for space-shared and time-shared scheduling
● CloudletScheduler - the policy of scheduling performed by a virtual
machine to run its Cloudlets; implementations exist for space-shared or
time-shared behavior
Provisioning
● PeProvisioner - provisioning policy used by a host to allocate its PEs to
virtual machines inside it
● BwProvisioner - provisioning policy used by a host to allocate BW to the
VMs inside it; default implementation (BwProvisionerSimple) uses a
best-effort approach
● RamProvisioner - provisioning policy used by a host to allocate memory
to the VMs inside it; default implementation (RamProvisionerSimple) also
uses a best-effort approach
Other components
● UtilizationModel - specifies how a Cloudlet utilizes a VM’s resources
(CPU, RAM, BW)
● PowerModel - model of host power consumption, depending on the
utilization of system components (CPU, RAM, BW); can be used for
implementing allocation policies
● Network - used to specify latencies between cloud members (BRITE
model)
A basic CloudSim application
● initialize the CIS
● create a datacenter
● create a broker
● create virtual machines
● submit virtual machines to data center broker
● create cloudlets by specifying their characteristics
● submit cloudlets to datacenter broker
● start simulation
Running CloudSim in Eclipse (1)
● CloudSim sources: https://github.com/Cloudslab/cloudsim/releases
(select CloudSim 4.0 source code)
● Eclipse: https://eclipse.org/downloads/
● practical presentation
Running CloudSim in Eclipse (2)
Running CloudSim in Eclipse (3)
Running CloudSim in Eclipse (4)
Running CloudSim in Eclipse (5)
Task scheduling
● associate tasks (requirements) to resources (capabilities)
○ optimal scheduling: efficiently exploit capabilities depending on requirements (optimize
certain metrics)
○ metrics:
■ makespan: finalization time for last task
■ flowtime: sum of finalization time for all tasks
● optimal scheduling: NP-complete
Scheduling in CloudSim
● org.cloudbus.cloudsim.DatacenterBroker.submitCloudlets()
● default task scheduling algorithm:
○ iterate over Cloudlet List
○ submit selected Cloudlet to the VMs in a circular order
Custom CloudSim scheduling
1. create a data structure to model Tasks
2. associate the structure with a Cloudlet (using and ID for example)
3. extend DatacenterBroker
a. should be aware of the additional data structure
b. override method submitCloudlets
c. use the new structure to decide the Cloudlets submit priority/select a certain Vm
Project ideas
● implement workflows in CloudSim
● implement and analyze various workload scheduling methods
● run CloudSim simulations and extract various performance metrics
● find some real-life cloud applications and simulate their utilization models
● implement a GUI for CloudSim
● implement a solution for computing/estimating the costs of a Cloud
● implement and analyze custom policies for:
○ VM allocation
○ VM scheduling
○ Cloudlet scheduling
● fault simulation in CloudSim
● evaluate CloudSim performance
References
[1] http://www.buyya.com/papers/CloudSim2010.pdf

[2] http://www.superwits.com/library/cloudsim-simulation-framework

[3] http://www.cloudbus.org/cloudsim/

[4] radu.ioan.ciobanu@gmail.com

S-ar putea să vă placă și