This is geoCloudSim, a geographically distributed cloud simulator written in Python. It is developed and maintained by Mahmoud Momtazpour.
Inspired by CloudSim, geoCloudSim can be considered as a simplified (and a slightly different) version of it that supports simulation of geographically distributed cloud and is written in Python.
-
geoCloudSim is super fast, owing to its discrete-event nature! It uses SimPy as its underlying simulation framework.
-
It models data centers, hosts, and VMs.
-
It defines DC Selection Policies to selects a datacenter for an incoming VM request (in a geographically distributed datacenters setup).
-
It defines VM Allocation Policies to allocate VMs to hosts.
-
It defines Resource Privisioners (MIPS, RAM, BW, Storage) to provision requested resources on hosts to VMs.
-
It models renewable energy to simulate green cloud. It also supports renewable-aware DC selection and allocation policies.
To speedup the simulation, geoCloudSim uses SimPy, a discrete-event simulation framework.
Currently, it only supports IaaS service (VM allocation in a geo-distributed cloud data centers) with limited set of features described above. Cloudlets are not modeled in the current version.
Visit Python's official website and download the latest version of Python 3. Follow the installation instructions for your operating system.
It's recommended to use a virtual environment to manage dependencies. Here's how you can set one up:
# Install virtualenv if it's not installed
pip install virtualenv
# Navigate to your project directory
cd path/to/your/project
# Create a virtual environment
virtualenv venv
# Activate the virtual environment
# On Windows
venv\Scripts\activate
# On macOS and Linux
source venv/bin/activateClone the repository to your local machine using the following command:
git clone https://github.com/AUT-Cloud-Lab/geoCloudSim.gitNavigate to the cloned repository's directory and install the required dependencies:
cd geoCloudSim
pip install -r requirements.txtNow you're ready to run the simulator. But before that, you need a workload!
A vms.csv file has been included as a sample workload, containing a number of VM requests. Each row is a VM request with its predefined characteristics:
- MIPS: CPU demand in terms of million instructions per second
- RAM: memory capacity in GB
- BW: network bandwidth in GB/s
- Storage: storage capacity in GB
- arrival time: arrival time of the request in unit time
- duration: duration of the request in unit time
The starting point is main.py, which sets up the simulation environment and starts the simulator. The result of the simulation is logged in simulation.log.
To run the simulation, execute the following command:
python main.py