What is Cloudsim?

CloudSim is a powerful simulation toolkit designed to model and simulate core cloud infrastructure and services.

It enables the simulation of key components like job/task scheduling and event processing and the creation of essential cloud entities such as data centers, brokers, and virtual machines.

Additionally, it supports communication between these entities and the implementation of various broker policies.

Also, CloudSim allows users to:

  • Test application services in a repeatable and controllable environment.
  • Tune the system bottlenecks before deploying apps in an actual cloud.
  • Experiment with diverse workloads and resource performance scenarios, aiding the development of adaptive application provisioning techniques under simulated conditions.

The core features of CloudSim:

  • The Support of modeling and simulation of large-scale computing environments as federated cloud data centers, and virtualized server hosts, with customizable policies for provisioning host resources to virtual machines and energy-aware computational resources
  • It is a self-contained platform for modeling cloud service brokers, provisioning, and allocation policies.
  • It supports the simulation of network connections among simulated system elements.
  • Support for simulation of federated cloud environment, that inter-networks resources from both private and public domains.
  • Availability of a virtualization engine that aids in the creation and management of multiple independent and co-hosted virtual services on a data center node.
  • Flexibility to switch between the space-shared and time-shared allocation of processing cores to virtualized services.

Is Cloudsim suitable for my research work?

CloudSim is a simulation toolkit that provides an API for developers and researchers to simulate various server hardware models as software simulations.

This enables analysis of their behaviour under real-world workload conditions.

CloudSim is particularly well-suited for simulating the Infrastructure as a Service (IaaS) layer, allowing for comprehensive studies involving:

  • Software models of data centers, hosts, and storage
  • Virtual machines and cloud data center brokers
  • Virtual machine allocation and scheduling policies for tasks
  • Power management policies, including virtual machine migrations and consolidation across hosts
  • Definition of workload attributes for simulation execution over cloud infrastructures

However, CloudSim is unsuitable for research involving Platform as a Service (PaaS) or Software as a Service (SaaS) layers, such as real-time applications, security algorithms, or platform implementations. Other simulation tools or approaches would be more appropriate for those.

Does Cloudsim setup require a High computing system?

No, not at all. The cloudsim is a software simulation toolkit and is developed using Java programming language, Therefore, any computer system with a dual-core processor, 2 GB RAM, and 1 GB storage is good enough to simulate the cloud-based systems using the cloudsim as this is required to support the JRE working.

Also, the hardware requirements may differ on the basis of which IDE you are using for JAVA development.

How to download Cloudsim?

Cloudsim project source code, as well as compiled jars files, are published through the GitHub project page: https://github.com/Cloudslab/cloudsim.

By default, the project page displays the source code(based on the maven build tool) of the current release, which is currently released version 5.0(beta) and the page displays the basic information about the project along with the publication details.

Now if you are interested in using the previous versions of this project then you have to click on the releases link option available on the project’s main page or otherwise, you may access it directly from the following links:

Every version except 6.0 and 5.0(still under development) contains 4 asset files.

The example description for each asset file is as follows:

  • cloudsim-4.0.tar.gz: This file contains the compiled JAR file that can be directly used in the custom simulation implementation where there is no need to change the source code of the cloudsim simulation engine. This version is Linux-specific.
  • cloudsim-4.0.zip: This is the same as above the only difference is that it is Windows-specific.
  • Source code(zip): This file contains the complete source code of the cloudsim simulation framework project. As cloudsim uses the Maven build tool for its DevOps. Therefore to set up this project you require to use an IDE that supports Maven project imports. How do you identify that its a maven-based project? you will find a “pom.xml” file in the project root folder. This zip is Windows operating system-specific file.
  • Source code(tar.gz): This file contains a similar structure as mentioned above, but it is specific to Linux

How to install Cloudsim?

Cloudsim setup is very easy, and I encourage you to start with version 3.0.3.

For this, you may follow the following link: cloudsim-setup-using-eclipse and a youtube video

This link describes in detail all the steps required to configure the Cloudsim 3.0.3 version successfully and can help you to also understand the core architecture of this cloudsim simulation tool.

The cloudsim 3.0.3 version is best to start with that once you understand the basic working and architecture, then you can move to the latest version.

How does cloudsim work?

As already mentioned that cloudsim allows modeling and simulate the cloud system components, therefore to support its function different set of classes has been developed by its developers:

  • To simulate the regions and datacenters the class named “Datacenter.java” is available in org.cloudbus.cloudsim package.
  • To simulate the workloads for the cloud, the class named “Cloudlet.java” is available in org.cloudbus.cloudsim package.
  • To simulate the load balancing and policy-related implementation the classes named “DatacenterBroker.java”, “CloudletScheduler.java”, “VmAllocationPolicy.java”, etc are available under org.cloudbus.cloudsim package.
  • Now because all the different simulated hardware models are required to communicate with each other to share the simulation work updates this cloudsim has implemented a discrete event simulation engine that keeps track of all the task assignments among the different simulated cloud components.

To read and understand more about the architecture, you should definitely read the article titled “CloudSim Simulation Toolkit: An Introduction” as well as “Beginners Guide to Cloudsim Project Structure

How to run my first cloudsim simulation scenario?

Once you have completed your installation/setup and understand the basic workings of the cloudsim, the next step is to implement your custom scenario.

Any simulation will go through the following steps:

  • Initialize the CloudSim with the current clock time and this will also initialize the core CloudInformationService entity.
  • Create Datacenter(s) as Datacenters are the resource providers in CloudSim. We need to list one of them to run a CloudSim simulation.
  • Create a Broker to simulate the user workload scheduling as well as virtual machine allocation and placements.
  • Create one/more virtual machines and submit them to the broker for further submitting it to the respective DataCenters for placement and execution management during the simulation run.
  • Create one/more Cloudlets and submit the Cloudlet list to the broker for further task scheduling on the active virtual machines for its processing during the simulation run.
  • Starts the simulation, this will initiate all the entities and components created above and put them into execution for supporting various simulation operations.
  • Stop the simulation, concludes the simulation, and flush all the entities & components before the exit of a simulation run.
  • Print results when the simulation is over, where you will be able to display which cloudlet executed on which virtual machine along with how much time it spent in execution, its start time as well as its finish time.

The step-by-step detailed description of each step can be read in the article “Guide to CloudsimExample1.java simulation workflow

What is CloudSim Frequently Used For?

CloudSim is widely utilized in research and development for the following purposes:

  • Load balancing of resources and tasks across cloud infrastructures
  • Task scheduling and handling migrations to optimize system performance
  • Optimizing virtual machine allocation and placement policies for efficient resource usage
  • Energy-aware consolidations and migrations of virtual machines to improve energy efficiency
  • Optimizing schemes for network latencies in various cloud scenarios to enhance data transfer performance
  • and many more.

Other simulators based on cloudsim

The Cloudsim 3.x.x version was a very important release and became the base for many other extensions, which in turn support a very specific type of use cases:

Cloudsim simulation toolkit Learning Resources

Sample Cloudsim Source Codes

There are various researchers who have published their cloudsim project code on their GitHub handles, following are the quick links for your reference:

As a beginner, you may refer to these pieces of code to understand, how other fellow researchers have worked on the cloudsim-based simulation to implement their work.

This will definitely help you accelerate yours by forking these projects and working on your own additions or a complete overhaul of these sets of codes.

Also, To quickly get started with Cloudsim Simulation Toolkit, Feel free to join our ongoing series of webinars for beginners to Cloudsim Simulation Toolkit I am really interested to interact with you.

2 thoughts on “What is Cloudsim?”

  1. Dear Madam/Sir,

    I am a PhD student working on an offloading project rested upon cloud computing infrastructure. For that, I am using the CloudSim as the simulator. I have several questions about how it actually works. For example, I want to know what is the SchalutingIntervals defined at DataCenter class or what is the main purpose of the VM_DATACENTER_EVENT?
    Would you please be so kind as to help me in this regard?

    Best,
    Ali

    Reply

Leave a Comment