Modelling and Simulation of Cloud a Infrastructure with CloudSim
[cloud-computing
simulation
migration
]
This post is an extract of the article “Service State Migration for Elastic Provisioning of Telco Services in Mobile Cloud Networking”, presented at IEEE Transactions on Services Computing, 2018.
CloudSim is an opensource toolkit that provides a generalized and extensible simulation framework that enables modeling, simulation, and experimentation of emerging Cloud computing infrastructures and application services, allowing its users to focus on specific system design issues that they want to investigate, without getting concerned about the low level details related to Cloud-based infrastructures and services. CloudSim simulation framework supports also modelling and creation of infrastructures and application environments for single and internet-worked clouds. Finally, CloudSim is a Java-based tool that also offer the possibility to extend the current tool with new custom and ad-hoc features.
In this example of usage, CloudSim has been used to simulate a migration process of an overloaded service that suffer of performance issues to a newly created service. With a specific focus on the on-premise cloud infrastructure described in this post, CloudSim simulates the Cyclops service and, thus, maps that service within the datacenter.
In particular, the service infrastructure into the simulator is mapped as follows:
- two data centers, used to migrate the VMs
- one host per data center
- two VMs for each host
- one process per VM, which represent the service to watch
The CloudSim output is:
Starting Simulation...
Initialising...
Starting CloudSim version 3.0
Datacenter_0 is starting...
Datacenter_1 is starting...
Broker is starting...
Entities started.
0.0: Broker: Cloud Resource List received with 2 resource(s)
0.0: Broker: Trying to Create VM #0 in Datacenter_0
0.0: Broker: Trying to Create VM #1 in Datacenter_0
0.2: Broker: Sending cloudlet 0 to VM #0
0.2: Broker: Sending cloudlet 1 to VM #1
0,95: VM #0 has been allocated to the host #0
where:
- the broker is the component that acts on behalf of the user, hiding VM management and creating/deleting VMs
- cloudlets are the representation of tasks on the VMs that, in this case, represent the service that is running on the VMs.
When the migration is triggered, CloudSim simulates to create a new VM on the new host and move data to it. The data migration is simulated by the developer with a certain amount of data to transfer and maths custom functions that fits the specific data migration at best. Of course, it is possible to use loops to simulate different amount of data or different functions.
After the migration, the following is the CloudSim output that shows the simulated migration with the time required and the components shutdown.
7,25: Migration of VM #0 to Host #1 is completed
Simulation: No more future events
CloudInformationService: Notify all CloudSim entities for shutting down.
Datacenter_0 is shutting down...
Datacenter_1 is shutting down...
Broker is shutting down...
Simulation completed.
ClouSim has been used to test the efficiency of the elastic on-premise services provisioning within the MCN project. For more details check the project website at github.com/MobileCloudNetworking.