0% found this document useful (0 votes)
21 views

INTRODUCTION TO CLOUDSIM

The document discusses CloudSim, an open-source cloud simulation framework developed to model and simulate cloud computing infrastructures. It highlights the benefits of cloud computing, such as scalability and accessibility, and explains the architecture and components of CloudSim, including its ability to simulate various cloud entities like data centers, virtual machines, and cloudlets. The paper aims to assist researchers in understanding CloudSim's functionalities and practical applications through examples of simulated cloud environments.

Uploaded by

riad bouaita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

INTRODUCTION TO CLOUDSIM

The document discusses CloudSim, an open-source cloud simulation framework developed to model and simulate cloud computing infrastructures. It highlights the benefits of cloud computing, such as scalability and accessibility, and explains the architecture and components of CloudSim, including its ability to simulate various cloud entities like data centers, virtual machines, and cloudlets. The paper aims to assist researchers in understanding CloudSim's functionalities and practical applications through examples of simulated cloud environments.

Uploaded by

riad bouaita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

SINTEZA 2019

INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATION TECHNOLOGY AND DATA RELATED RESEARCH

ADVANCED COMPUTING AND CLOUD COMPUTING

INTRODUCTION TO CLOUDSIM

Abstract:
Dejan Bulaja,
Cloud computing is a subscription-based service where networked storage
Kristina Božić, space and other computer resources can be obtained. Due to its high avail-
Nikola Penevski ability, easy accessibility, scalability and adaptability, cloud computing is
highly desirable in the rapidly growing world of computer technology. Be-
Nebojša Bačanin Džakula
cause of this high demand, the Cloud Computing and Distributed Systems
(CLOUDS) Laboratory built the CloudSim framework, which became very
Singidunum University, popular open source cloud simulator among the researchers and students.
Belgrade, Serbia CloudSim is new simulation framework which allows uninterrupted modeling
and simulation of cloud computing infrastructure. It helped open up the
possibility of evaluating the hypothesis in a controlled environment where
experimental results can be reproduced easily. This basic goal of this paper is
helping the researchers to understand CloudSim’s most important functions
and its practical usage, and to take insights on hands-on example of creating
a simulated cloud environment.

Keywords:
CloudSim, Cloud Computing, Job Scheduling, Load Balancing.

1. INTRODUCTION

Cloud computing provides affordable, scalable and ubiquitous com-


puting over distributed networks. It is based on reliable, secure, fault-tol-
erant, sustainable and scalable infrastructure for hosting Internet-based
application services. Cloud computing often experiences problems of
different load and energy performance, while modeling and scheduling
different applications and services for the cloud infrastructure, which
can be solved by using CloudSim. CloudSim is a self-contained platform
that provides an extensible simulation toolkit which enables modeling
and simulation of cloud computing systems and application provisioning
environments. CloudSim has the following basic properties that make it
convenient for simulating cloud:
Correspondence:
1. Provides controlled and a repeatable environment to create and
Nebojša Bačanin Džakula
simulate cloud entities
2. Can be extended to include user defined policies for cloud
e-mail:
[email protected]

189
Sinteza 2019
DOI: 10.15308/Sinteza-2019-189-194
submit your manuscript | sinteza.singidunum.ac.rs
SINTEZA 2019
INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATION TECHNOLOGY AND DATA RELATED RESEARCH

3. Provides changeable infrastructure modeling, Enterprises can deploy application on one of the
changeable network architecture, federated cloud three clouds, and those are Public, Private and Hybrid
support clouds. Public clouds are owned and operated by third
4. Provides VM provisioning, Host provisioning, party. All customers share the same infrastructure pool
network provisioning and application provision- with limited security protection and configuration [4],
ing. but the cost of this service is low and supports “Pay-as-
you-go” model. Private clouds, on the other hand, are
built exclusively for a single enterprise. The aim is to
2. BACKGROUND
address the existing concern of data security and offer
greater control over the infrastructure. Hybrid clouds
Cloud Computing are a combination of both previously addressed cloud
models. By allowing workloads to move between pri-
Cloud computing can be defined as “a type of paral- vate and public clouds as computing needs and costs
lel and distributed system consisting of a collection of change, hybrid cloud gives businesses greater flexibility
interconnected and virtualized computers that are dy- and more data deployment options [5].
namically provisioned and presented as one or more
unified computing resourced based on service-level 3. CLOUDSIM ARCHITECTURE
agreements established through negotiation between
the service provider and consumers” [1].
ClousSim provides an emulation of all the processes
The National Institute of Standards and Technol- that happen in the cloud as shown in figure 1. CloudSim
ogy (NIST) defines cloud computing as: a pay-per-use contains 12 packages that are used to create a simula-
model for enabling available, convenient, on demand tion. The most relevant one is called cloudsim and con-
network access to a shared pool of configurable com- tains the classes for modeling the various cloud entities
puting resources that can be rapidly provisioned and like a Datacenter, a Host, a Cloudlet and VMs.
released with minimal management effort or service
Datacenter is a virtual representation of a real da-
provider interaction [2].
tacenter and contains several computing nodes known
Some examples of popular cloud computing infra- as Hosts that are responsible for providing the services
structures include Amazon Web Services, Microsoft desired by the end user. It is described by the following
Azure, Google Cloud Platform and Heroku [3]. parameters:
1. Total available processing power in MIPS (Mil-
Cloud Computing Models lion Instructions Per Second)
2. Total available RAM in MB (Random Access
Cloud Computing Models can be grouped into three Memory)
categories listed below: 3. Total storage represented in MB
1. Software as a Service (SaaS) - this model offers a 4. Total bandwidth in mbps. Bandwidth is crucial
complete application to the customer. A single in- for delivering burstable stable services [6].
stance of the service is running on the cloud and Datacenter Broker represents a broker acting on
multiple end users can be served simultaneously. behalf of a user. It hides VM management such, as vm
2. Platform as a Service (PaaS) - in this model, a creation, submission of cloudlets to this VMs and de-
layer of software or development environment is struction of VMs.
offered to end users as a service. Utility is that the Host executes actions related to management of vir-
customer can build his own application which tual machines (e.g. creation and destruction). A host has
runs on the provider’s infrastructure freely. a defined policy for provisioning memory and bw, as
3. Infrastructure as a Service (IaaS) - basic stor- well as an allocation policy for Pe’s to virtual machines.
age and computing capabilities as standard- A host is allocated to a datacenter. It can host virtual
ized services over the network are provided by machines.
this model. Servers, storage systems, data center
space are made available to customers to handle
workloads.
190
Sinteza 2019
Advanced Computing and Cloud Computing
submit your manuscript | sinteza.singidunum.ac.rs
SINTEZA 2019
INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATION TECHNOLOGY AND DATA RELATED RESEARCH

Virtual machines are portable, inter-operable, logi- 1. Id of cloudlet that is used by the broker to assign
cally independent. Each VM created is allocated to a them to a virtual machine
Host where all its computational requirements are met. 2. Length of a task that is to be executed represented
VM is described by the following properties: in bytes
1. CPU power represented in MIPS 3. Output file size is the size of the cloudlet after
2. Number of processing cores executing.
3. Amount of RAM memory 4. Number of processors that are required to run
4. Size of the virtual disk image the cloudlet
5. Bandwidth in mbps VmScheduler supports two ways of executing Cloud-
lets: time shared and space shared policies. In the time
6. Name of the virtual machine
shared policy Cloudlets are run simultaneously while
Cloudlet is a representation of a submitted task in
the MIPS of the VMs is divided evenly among them. In
the cloud. Each cloudlet is assigned to a VM. Cloudlet
the space shared policy VMs will execute cloudlets in a
has the following attributes:
chronological order using full capacity for each cloudlet.

Figure 1. CloudSim Diagram

4. USING CLOUDSIM Some of the most used Packages in CloudSim are


listed below:
CloudSim can be run as a standalone simulator to 1. org.cloudbus.cloudsim.core - this package contains
simulate cloud computing scenarios using any popular core functionalities which are required for simulation
java IDEs. CloudSim can be used to research variety of ex- 2. org.cloudbus.cloudsim.distribution - contains
isting policies, but it is also possible to change those poli- variety of mathematical distributions, where
cies for cloud operations, depending on the requirements. Random Number Generator and Exponential
Distribution are most common
191
Sinteza 2019
Advanced Computing and Cloud Computing
submit your manuscript | sinteza.singidunum.ac.rs
SINTEZA 2019
INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATION TECHNOLOGY AND DATA RELATED RESEARCH

3. org.cloudbus.cloudsim.network - where all the All the packages and classes are contained within a
classes required for the network topology are jar (in folder CloudSim3.0.3\jars\CloudSim-3.0.3.jar). If
contained one needs to add new policies to the existing toolkit, it
4. org.cloudbus.cloudsim.network, datacenter - which must be done by overwriting the methods in existing
defines a network within a Datacenter classes. Some of the major classes along with their uses is
shown in the figure 2. The class org.cloudbus.cloudsim.
5. org.cloudbus.cloudsim.util - package contains
vmAllocationPolicy is important because it can be ex-
classes that can provide specific mathematical
tended and used for Host Load Balancing. Load Balanc-
functions
ing is the process of spreading the load across available
6. org.cloudbus.cloudsim.lists - containing the lists
resources so as to decrease the overall response time of
of operations on the list of resources like Hosts,
a task and to simultaneously increase the utilization of
VM, cloudlets and so on
the resources [7].

Cloudlet Host Virutal Machine


getStatus() allocatePesForVm() getBw()
getCloudletId() getAllocatedMipsForVm() getHost()
getCloudletLength() getId() getId()
getCloudletOutputSize() getDatacenter() getMips()
getCostPerSec() getBw() getSize()
getProcessingCost() getAvailableMips() getCurrentAllocatedRam()
getVmId() getNumberofFreePes() getCurrentAllocatedBw()
getWaitingTime() getRam() getCurrentAllocatedMips()
getUserId() getStorage() getCurrentAllocatedSize()
getExecStartTime() getTotalMips() getCloudletScheduler()
getFinishTime() getVmList(0 getVmm()
isFinished() getBwProvisioner() getUserId()
getCloudletFinishedSoFar(0 getRamProvisioner(0 getNumberOfPes()
getSubmissionTime() addMigratingInVm() isInMigration()

Figure 2. CloudSim Classes

Example of a CloudSim simulation ….


0.0: Broker: Trying to Create VM #19 in Datacenter_0
Initialising... 0.1: Broker: VM #0 has been created in Datacenter #2,
Starting CloudSim version 3.0 Host #0
Datacenter_0 is starting... ….
Datacenter_1 is starting... 0.1: Broker: VM #19 has been created in Datacenter
#2, Host #1
Broker is starting...
0.1: Broker: Sending cloudlet 0 to VM #0
Entities started.
0.1: Broker: Sending cloudlet 1 to VM #1
0.0: Broker: Cloud Resource List received with 2
resource(s) 0.1: Broker: Sending cloudlet 2 to VM #2
0.0: Broker: Trying to Create VM #0 in Datacenter_0 ….
192
Sinteza 2019
Advanced Computing and Cloud Computing
submit your manuscript | sinteza.singidunum.ac.rs
SINTEZA 2019
INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATION TECHNOLOGY AND DATA RELATED RESEARCH

0.1: Broker: Sending cloudlet 18 to VM #18 User id Debt


0.1: Broker: Sending cloudlet 19 to VM #19 4 21699.5
0.1: Broker: Sending cloudlet 20 to VM #0 **********************************
0.1: Broker: Sending cloudlet 21 to VM #1
….. Analysis of the simulation
0.1: Broker: Sending cloudlet 37 to VM #17
0.1: Broker: Sending cloudlet 38 to VM #18 In the given example a total of 40 Cloudlets are run
0.1: Broker: Sending cloudlet 39 to VM #19 across 20 VMs in a total of 2 data centers. The process
starts by first creating the data centers and brokers for
2.0980547945205483: Broker: Cloudlet 0 received
them. Brokers try to create the required amount of vir-
2.239450143357758: Broker: Cloudlet 1 received
tual machines in the data centers. In our example all
2.359450143357758: Broker: Cloudlet 2 received VMs are created successfully in Datacenter_0 as it has
enough resources. If some resources become insuffi-
…. cient due to the amount of VMs being created, e.g. not
enough RAM for the creation of n-th VM, the broker
5.098571022478637: Broker: Cloudlet 20 received
will print an error that it’s missing resources to create
5.098571022478637: Broker: Cloudlet 21 received
the given VM and try to create the next one. Even if not
5.098571022478637: Broker: All Cloudlets executed. all VMs are created the simulation would continue with
Finishing... VMs that were successfully created. Broker will then as-
5.098571022478637: Broker: Destroying VM #0 sign each Cloudlet that is to be executed to a VM with
….. a given scheduling algorithm. After receiving all the
Cloudlets VMs would run simultaneously and simulate
5.098571022478637: Broker: Destroying VM #19
the time and resources that were needed to execute the
Broker is shutting down... Cloudlet. In the given example that start time is 0.1 ms
Simulation: No more future events and the finsh time is 5.1 ms. It is worth noting that time
CloudInformationService: Notify all CloudSim enti- in CloudSim is simulated and and is not affected by real
ties for shutting down. time and the speed that the program executes. It may
Datacenter_0 is shutting down... take longer or shorter to finish but the time of finish-
ing will not change when there are no random elements
Datacenter_1 is shutting down...
added to the equation.
Broker is shutting down...
Simulation completed.
Cost of simulation
Simulation completed.

Much like the pay-per-use model CloudSim supports


========== OUTPUT ========== simulation of the cost required to run tasks submitted by
Cloudlet ID STATUS Data center ID VM ID users [8]. Each data center has its attributes that describe
Time Start Time Finish Time the cost of running VMs. The cost is determined by the
0 SUCCESS 2 0 2 VM specifications and the time the VM ran in order
0.1 2.1 to execute the given Cloudlets. Data center has costs
1 SUCCESS 2 1 per amount of memory, storage and processing power.
2.14 0.1 2.24 These costs are multiplied by the VM specifications and
the time the VM ran. In our example there are a total of
……
20 VMs so each of them is subjected to this calculation.
20 SUCCESS 2 0 5 The total cost or debt is the sum of costs of all VMs. It is
0.1 5.1 displayed in an arbitrary unit. For the given example it
21 SUCCESS 2 1 5 is 21699,5. CloudSim is also capable of simulating dif-
0.1 5.1 ferent aspects multi-tenant data centers and calculating
*****Datacenter: Datacenter_0***** cost per user [9].

193
Sinteza 2019
Advanced Computing and Cloud Computing
submit your manuscript | sinteza.singidunum.ac.rs
SINTEZA 2019
INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATION TECHNOLOGY AND DATA RELATED RESEARCH

5. CONCLUSION AND FUTURE WORK REFERENCES

The progress of cloud technologies calls for novel [1] R. Buyya, C.S. Yeo, S. Venugopal, J. Briberg, and
approaches of better understanding processes that hap- I. Brandic, Cloud computing and emerging IT plat-
pen within the cloud infrastructure. CloudSim is a com- forms: vision, hype, and reality for delivering com-
puting as the 5th utility, Future generation comput-
pletely customizable tool that can simulate all parts of
er systems, Vol. 25, 2009, pp. 599-616.
the cloud infrastructure making it suitable for testing
[2] NIST Cloud Computing Reference Architecture, 500-
different setups, algorithms, models and topologies in
292, 2011. [Online]. Available: https://bigdatawg.
order to see the results, compare them and make im- nist.gov/_uploadfiles/M0008_v1_7256814129.pdf
provements. After reading this work we hope that the
[3] Xiao-Li Wang, Ling-di Chen. The Application of
reader has a firmer understanding of processes that hap- Cloud Computing in the Construction of Regional
pen on the cloud and ways to create and test their own. Digital Archives, ARPN Journal of Systems and
Future works include incorporating a job schedul- Software Vol. 5, Issue 2, 2015, pp 44-47.
ing algorithm such as cuckoo search algorithm (CSO) [4] C. Stergiou, K. E. Psannis, B. Kim, B. Gupta, Secure
and particle swarm optimization (PSO) to achieve bet- integration of IoT and Cloud Computing, Future
ter load balancing of Cloudlets that are to be executed Generation Computer Systems, Elsevier, Vol. 78,
on VMs. The utilization of mentioned metaheuristics Part 3, 2018, pp. 964-975.
approaches instead of classical deterministic schedul- [5] H. Talal, H. Noor, S. Zeadally, A. Alfazi, Q. Z. Sheng,
ing algorithms may significantly improve simulation Mobile cloud computing: Challenges and future re-
search directions, Journal of Network and Computer
results. With the current algorithms in CloudSim the
Applications, Elsevier, Vol. 115, 2018, pp. 70-85.
way the Broker schedules Cloudlets is less than ideal.
[6] Li, J. Cao, X. Wang, Y. Sun, Y. Sahni, Enabling Soft-
The time required to run multiple Cloudlets on multiple
ware Defined Networking with QoS Guarantee for
VMs can be decreased by using stochastic methods to Cloud Applications, 2017 IEEE 10th International
find the near optimal order of running Cloudlets. Even Conference on Cloud Computing (CLOUD),
the smallest improvements make a big difference on the Honolulu, CA, 2017, pp. 130-137, doi: 10.1109/
large scale and produce large savings. CLOUD.2017.25.
[7] Suchintan Mishra, Manmath Narayan Sahoo. On
using CloudSim as a Cloud Simulator: The Manual,
2017, doi: 10.13140/RG.2.2.30215.91041.
[8] D. Alsmadi, V. Prybutok, Sharing and storage be-
havior via cloud computing: Security and privacy in
research and practice, Computers in Human Behav-
ior, Elsevier, Vol. 85, 2018, pp. 218-226.
[9] K. Jeong, R. Figueiredo, K. Ichikawa, PARES: Packet
Rewriting on SDNEnabled Edge Switches for Net-
work Virtualization in Multi-Tenant Cloud Data
Centers, 2017 IEEE 10th International Conference
on Cloud Computing (CLOUD), Honolulu, CA,
2017, pp. 9-17. doi: 10.1109/CLOUD.2017.11.

194
Sinteza 2019
Advanced Computing and Cloud Computing
submit your manuscript | sinteza.singidunum.ac.rs

You might also like