Email: akasbe2@uic.edu
The intention of the project is to simulate cloud computing infrastructure, execute and evaluate different cloud models with different VM allocation polices, VM scheduling policies and Cloudlet scheduling policies. The project is created using CloudSim Plus framework. The framework helps mode, simulate and experiment on cloud environments with its rich libraries. This allows the developers to focus on the system design issues, without worrying about the low-level details of the cloud infrastructure.
- CIS stands for Cloud Information Service
- It is a registry that maintains the entries of the resource entities available on the cloud like datacenters, hosts etc.
- Workloads or jobs or tasks that are executed during the simulation of the cloud infrastructure.
- Acts on the behalf of the cloud customer.
- Submits VM requests and cloudlets to Datacenter
- Communicates with CIS to get resource information
Some important project files -
The main method inside the object Simulation
executes all simulations sequentially.
-
Class
DatacenterUtils
creates datacenters, hosts, virtual machines and cloudlets. -
Methods
createDatacenter()
,createHost()
,createVms()
,createCloudlets()
create Datacenter(s), Host(s), Virtual Machine(s) and Cloudlet(s) respectively.
- The class GetDatacenterConfig parses a config file and gets the configuration of datacenter(s) and cost of running a datacenter.
- The class GetHostConfig parses a config file and gets the configuration of host(s).
- The class GetVmConfig parses a config file and gets the configuration of virtual machine(s).
- The class GetCloudConfig parses a config file and gets the configuration of cloudlet(s).
- A class to simulate Time shared and Space shared VM and Cloudlet scheduling policies.
- On the basis of a string
schedulerModel
, TimeShared.conf or SpaceShared.conf file is parsed to get the infrastructural configurations. - Arguments vmScheduler that is a
VmScheduler
instance and cloudletScheduler, aCloudletScheduler
instance, scheduling policies are decided. - The VM Allocation Policy is taken as the default VmAllocationPolicySimple.
- The class
VmAllocatPolicyRoundRobin
shows the simulation of the VM Allocation Policy Round Robin in which VMs are assigned to the hosts in a cyclic manner.
- The class
CloudModelsSimulation
is to simulate three datacenters, each for three different cloud models - Saas, Paas and Iaas arranged in BRITE topology.
- A datacenter with 1 host, 1 VM are created and 4 cloudlets are executed in this system.
- The VM Allocation policy is VmAllocationPolicySimple.
- The VM Scheduling policy is VmSchedulerSpaceShared and the cloudlet scheduling policy is CloudletSchedulerSpaceShared.
- As a result, the cloudlets are executed sequentially.
- The first cloudlet completes its execution in 40 seconds. Till then the next cloudlet waits for the resources to be available.
- All the PE resources are utilized one by one by all the cloudlets.
- A datacenter with 1 host, 1 VM are created and 4 cloudlets are executed in this system.
- The VM Allocation policy is VmAllocationPolicySimple.
- The VM Scheduling policy is VmSchedulerTimeShared and the cloudlet scheduling policy is CloudletSchedulerTimeShared.
- As a result, the cloudlets are executed in such a manner that they are take a fraction time of the host resources.
- All the cloudlets take similar 160 seconds to finish.
- The total time to execute four identical cloudlets are similar i.e. 160 seconds. In Time Shared policy, although, all cloudlets start their execution at nearly same time, it does not mean the execution is finished in the time of one cloudlet.
- Cost of both the executions are similar as shown in the simulation.
- A datacenter with 4 hosts, 8 VMs are created and 8 cloudlets are executed in this system.
- The VM Allocation policy is VmAllocationPolicyRoundRobin.
- The VM Scheduling policy is VmSchedulerSpaceShared and the cloudlet scheduling policy is CloudletSchedulerTimeShared.
- As a result, VMs are allocated to host in a round robin (cyclic) manner. Once one VM is allocated to a host, next one is allocated to the next host and so on. When every host is occupied, the next VM is allocated to the first Host and so on.
- It is a naive approach and it increases the number of active hosts leading to resource wastage.
- On looking at the log, it can be inferred that Virtual Machines are allocated to Hosts cyclically. VM0 to VM7 are allocated to Host0 to Host3 cyclically.
- Three datacenters are created each for the three cloud models - Saas, Paas and Iaas.
- The datacenters and the broker are connected with each other in BRITE topology.
- The configurations for the datacenters are -
- Saas - 2 hosts, 1 VM, 2 cloudlets
- Paas - 2 hosts, 1 VM, 2 cloudlets
- Iaas - 2 hosts, 1 VM, 2 cloudlets
- Cost for each datacenter is different.
Complete configurations can be found in
Saas.conf
,Paas.conf
andIaas.conf
.
- Each of the configuration files are divided into two parts on the basis of who can decide which part of the configuration.
- Configuration handled by the cloud service provider
- Configuration handled by the cloud consumer.
- In Software as a Service model the consumer only has a user level and limited admin level control over the application.
- So, the only configuration a consumer controls in Saas model is number of cloudlets. Rest is controlled by cloud service provider.
- In Platform as a Service model, the consumer is given more control over the infrastructure. The consumer has complete control over the application and has development tools and environment to build applications.
- So, the consumer can control the configuration of the cloudlets and the number of VMs to be requested.
- Faas, being a special case of Paas is not implemented.
- In Infrastructure as a Service model, the consumer can request configuration of the virtual machines as well. The consumer has control over almost all parts of the infrastructure apart from the most priviledged lower levels.
- So, the consumer can control the configuration of the cloudlets, virtual machines and the number of hosts.
- Taking cost under consideration, Iaas is the most expensive cloud model (Datacenter 1) and Saas to be the least expensive option.
- This is due to the fact that it offers more configuration ability to the consumer. It still has Paas and Saas layers on top of it to be functional, making the cost of each of its resource to be higher.
- Similarly, Paas is the next expensive option which makes Saas the least expensive.
- Clone this repository
- Import the project in IntelliJ
- Execute the
runSimulation
main method from the Simulation class.
- Clone this repository
- Ensure necessary dependencies are installed
- Java development kit
- Scala runtime
- SBT
- In terminal, go to path
src/main/scala/
directory - Execute -
$ sbt clean compile run
- Clone this repository
- Import the project in IntelliJ
- Run the
CloudSimulatorTestSuite
class fromCloudSimulatorTestSuite.scala
.
- Clone this repository
- Ensure necessary dependencies are installed
- Java development kit
- Scala runtime
- SBT
- In terminal, go to path
src/main/scala/
directory - Execute -
$ sbt clean compile test
- Dr. Grechanik, Mark, (2020) Cloud Computing: Theory and Practice.
- Rock the JVM
- SuperWits Academy
- Cloudsim Tutorials