major modifications for v2.0 release
Release notes 1- Cloud server processing was simplified in the initial version, it is handled via cloudsim components now. 2- Cloud server manager, edge server manager, mobile device manager and vm allocation policy are used as abstract class in factory pattern to allow developers to use different business logic without modifying EdgeCloudSim source code. 3- The task and place types are no longer defined as enumeration. They are used as integer value in order to manipulate more place type without modifying enum variable. 4- Two sample applications (one of them is simple and the other one extended application) are added along with the corresponding matlab files to plot statistics. 5- Cloud server properties are added to the simulation settings file 6- New log items are added to simulation result files 7- Code refactoring is applied including the modification of comments
This commit is contained in:
226
CONTRIBUTING.md
226
CONTRIBUTING.md
@ -1,113 +1,113 @@
|
||||
# Our Philosophy
|
||||
|
||||
EdgeCloudSim is an open source project, so every contributor is welcome!
|
||||
EdgeCloudSim has not been fully tested regarding to many different scenarios.
|
||||
There may be some bugs which are waiting to be fixed.
|
||||
You can add new features on EdgeCloudSim as well.
|
||||
Here is the list of needed features:
|
||||
|
||||
## Needed Features
|
||||
|
||||
* Mist computing features (executing tasks on mobile device)
|
||||
* Incorporating cellular access network model into EdgeCloudSim (3G/4G/5G)
|
||||
* Task migration among the Edge or Cloud VMs
|
||||
* Energy consumption model for the mobile and edge devices as well as the cloud datacenters
|
||||
* Adding probabilistic network failure model by considering the congestion or other parameters such as the distance between mobile device and the WiFi access point.
|
||||
* Visual tool for displaying the network topology
|
||||
|
||||
# Reporting Bugs
|
||||
|
||||
Before reporting a bug, please search previously reported bugs to avoid duplication.
|
||||
After you are sure that you found a non-reported bug, please create a new issue under the "Issues" section of the EdgeCloudSim project.
|
||||
Please clearly describe the problem so that we can easily understand it.
|
||||
We kindly request you to use following format while reporting bugs:
|
||||
<pre>
|
||||
<b>Description</b>
|
||||
Clear explanation of the bug. What is the wrong behavior, and what is the expected one.
|
||||
|
||||
<b>Steps to reproduce</b>
|
||||
please indicate the steps to reproduce related bug.
|
||||
|
||||
<b>Frequency</b>
|
||||
Please state the the probability of occurrence of the bug, e.g. rare, random, sometimes, always
|
||||
|
||||
<b>Additional Information</b>
|
||||
If you want to specify more things, add additional notes here
|
||||
</pre>
|
||||
|
||||
# How to Contribute to EdgeCloudSim
|
||||
|
||||
You can simply follow below steps to contribute to EdgeClouldSim:
|
||||
|
||||
1. Create a working copy (fork the project & clone it)
|
||||
2. Specify a new remote upstream repository
|
||||
3. Push your modification to the origin repository
|
||||
4. Create a new pull request
|
||||
|
||||
|
||||
Detailed explanation of the steps are given below:
|
||||
|
||||
|
||||
## Step 1: Create a working copy (fork the project & clone it)
|
||||
Open https://github.com/CagataySonmez/EdgeCloudSim on your browser and press the "fork" button to create a copy of the repository in your own GitHub account.
|
||||
Then find forked EdgeCloudSim project in your GitHub account and copy the url for cloning.
|
||||
Finally clone this project by using 'git clone' command:
|
||||
```
|
||||
$ git clone https://github.com/YOUR_USERNAME/EdgeCloudSim.git
|
||||
```
|
||||
|
||||
## Step 2: Specify a new remote upstream repository
|
||||
In order to sync the a forked repository with the original repository, you need to set up a new remote that points to the original project.
|
||||
Change directory to the forked repository and use 'git add remote' command to specify a new remote upstream repository.
|
||||
```
|
||||
$ cd EdgeCloudSim
|
||||
$ git remote add upstream git remote add upstream https://github.com/CagataySonmez/EdgeCloudSim.git
|
||||
```
|
||||
|
||||
After this step, you will have two remotes on your local:
|
||||
|
||||
- _origin_: points to the forked project with read and write permissions.
|
||||
- _upstream_: points to the main project with read permission only.
|
||||
|
||||
|
||||
## Step 3: Push your modification to the origin repository
|
||||
|
||||
While you are working on your own fork, please use separate and isolated branches for each topic. For new features and improvements, make your pull request to the development branch on the upstream. If you are working on bug fixes or critical updates, make your pull request to the master branch.
|
||||
|
||||
**Please use meaningful branch names and commit messages so that we can easily understand what has been changed.**
|
||||
You can use "bugfix/" prefix if you fix a bug, or use a "feature/" if you add a new feature.
|
||||
|
||||
For example, if you are fixing a bug, firstly sync with the upstream master branch:
|
||||
```
|
||||
$ git checkout master
|
||||
$ git pull upstream master
|
||||
```
|
||||
|
||||
If there are conflicts, resolve them and commit the merge. Then push the merge into your remote.
|
||||
```
|
||||
$ git push origin master
|
||||
```
|
||||
|
||||
Now you are in sync with the upstream. Create a new branch and checkout to start working on the bug, then push your new branch to your remote
|
||||
```
|
||||
$ git checkout -b bugfix/issue#1234
|
||||
$ git push -u origin bugfix/issue#1234
|
||||
```
|
||||
|
||||
Implement your changes and commit them, then finally push them to the remote branch
|
||||
```
|
||||
$ git commit -m "issue#1234: prevent simulation freeze on oom"
|
||||
$ git commit -m "issue#1234: prevent simulation freeze on timeout"
|
||||
$ ...
|
||||
$ git push origin bugfix/issue#1234
|
||||
```
|
||||
|
||||
|
||||
## Step 4: Create a new pull request
|
||||
|
||||
Open your GitHub repositories on your web browser, and find your forked EdgeCloudSim project.
|
||||
Your new branch will be listed at the top and you will see "Compare & pull request" button next to your new branch.
|
||||
Press this button, and create a pull request.
|
||||
Please select select correct repository and branch for the **base fork** and **base** options.
|
||||
According to the example given in step 3; "base fork" should be YOUR_USERNAME/EdgeCloudSim.git and "base" should be master.
|
||||
**Please type sufficient title and description for your pull request.**
|
||||
# Our Philosophy
|
||||
|
||||
EdgeCloudSim is an open source project, so every contributor is welcome!
|
||||
EdgeCloudSim has not been fully tested regarding to many different scenarios.
|
||||
There may be some bugs which are waiting to be fixed.
|
||||
You can add new features on EdgeCloudSim as well.
|
||||
Here is the list of needed features:
|
||||
|
||||
## Needed Features
|
||||
|
||||
* Mist computing features (executing tasks on mobile device)
|
||||
* Incorporating cellular access network model into EdgeCloudSim (3G/4G/5G)
|
||||
* Task migration among the Edge or Cloud VMs
|
||||
* Energy consumption model for the mobile and edge devices as well as the cloud datacenters
|
||||
* Adding probabilistic network failure model by considering the congestion or other parameters such as the distance between mobile device and the WiFi access point.
|
||||
* Visual tool for displaying the network topology
|
||||
|
||||
# Reporting Bugs
|
||||
|
||||
Before reporting a bug, please search previously reported bugs to avoid duplication.
|
||||
After you are sure that you found a non-reported bug, please create a new issue under the "Issues" section of the EdgeCloudSim project.
|
||||
Please clearly describe the problem so that we can easily understand it.
|
||||
We kindly request you to use following format while reporting bugs:
|
||||
<pre>
|
||||
<b>Description</b>
|
||||
Clear explanation of the bug. What is the wrong behavior, and what is the expected one.
|
||||
|
||||
<b>Steps to reproduce</b>
|
||||
please indicate the steps to reproduce related bug.
|
||||
|
||||
<b>Frequency</b>
|
||||
Please state the the probability of occurrence of the bug, e.g. rare, random, sometimes, always
|
||||
|
||||
<b>Additional Information</b>
|
||||
If you want to specify more things, add additional notes here
|
||||
</pre>
|
||||
|
||||
# How to Contribute to EdgeCloudSim
|
||||
|
||||
You can simply follow below steps to contribute to EdgeClouldSim:
|
||||
|
||||
1. Create a working copy (fork the project & clone it)
|
||||
2. Specify a new remote upstream repository
|
||||
3. Push your modification to the origin repository
|
||||
4. Create a new pull request
|
||||
|
||||
|
||||
Detailed explanation of the steps are given below:
|
||||
|
||||
|
||||
## Step 1: Create a working copy (fork the project & clone it)
|
||||
Open https://github.com/CagataySonmez/EdgeCloudSim on your browser and press the "fork" button to create a copy of the repository in your own GitHub account.
|
||||
Then find forked EdgeCloudSim project in your GitHub account and copy the url for cloning.
|
||||
Finally clone this project by using 'git clone' command:
|
||||
```
|
||||
$ git clone https://github.com/YOUR_USERNAME/EdgeCloudSim.git
|
||||
```
|
||||
|
||||
## Step 2: Specify a new remote upstream repository
|
||||
In order to sync the a forked repository with the original repository, you need to set up a new remote that points to the original project.
|
||||
Change directory to the forked repository and use 'git add remote' command to specify a new remote upstream repository.
|
||||
```
|
||||
$ cd EdgeCloudSim
|
||||
$ git remote add upstream git remote add upstream https://github.com/CagataySonmez/EdgeCloudSim.git
|
||||
```
|
||||
|
||||
After this step, you will have two remotes on your local:
|
||||
|
||||
- _origin_: points to the forked project with read and write permissions.
|
||||
- _upstream_: points to the main project with read permission only.
|
||||
|
||||
|
||||
## Step 3: Push your modification to the origin repository
|
||||
|
||||
While you are working on your own fork, please use separate and isolated branches for each topic. For new features and improvements, make your pull request to the development branch on the upstream. If you are working on bug fixes or critical updates, make your pull request to the master branch.
|
||||
|
||||
**Please use meaningful branch names and commit messages so that we can easily understand what has been changed.**
|
||||
You can use "bugfix/" prefix if you fix a bug, or use a "feature/" if you add a new feature.
|
||||
|
||||
For example, if you are fixing a bug, firstly sync with the upstream master branch:
|
||||
```
|
||||
$ git checkout master
|
||||
$ git pull upstream master
|
||||
```
|
||||
|
||||
If there are conflicts, resolve them and commit the merge. Then push the merge into your remote.
|
||||
```
|
||||
$ git push origin master
|
||||
```
|
||||
|
||||
Now you are in sync with the upstream. Create a new branch and checkout to start working on the bug, then push your new branch to your remote
|
||||
```
|
||||
$ git checkout -b bugfix/issue#1234
|
||||
$ git push -u origin bugfix/issue#1234
|
||||
```
|
||||
|
||||
Implement your changes and commit them, then finally push them to the remote branch
|
||||
```
|
||||
$ git commit -m "issue#1234: prevent simulation freeze on oom"
|
||||
$ git commit -m "issue#1234: prevent simulation freeze on timeout"
|
||||
$ ...
|
||||
$ git push origin bugfix/issue#1234
|
||||
```
|
||||
|
||||
|
||||
## Step 4: Create a new pull request
|
||||
|
||||
Open your GitHub repositories on your web browser, and find your forked EdgeCloudSim project.
|
||||
Your new branch will be listed at the top and you will see "Compare & pull request" button next to your new branch.
|
||||
Press this button, and create a pull request.
|
||||
Please select select correct repository and branch for the **base fork** and **base** options.
|
||||
According to the example given in step 3; "base fork" should be YOUR_USERNAME/EdgeCloudSim.git and "base" should be master.
|
||||
**Please type sufficient title and description for your pull request.**
|
||||
|
214
README.md
214
README.md
@ -1,106 +1,108 @@
|
||||
# EdgeCloudSim
|
||||
|
||||
EdgeCloudSim provides a simulation environment specific to Edge Computing scenarios where it is possible to conduct experiments that considers both computational and networking resources. EdgeCloudSim is based on CloudSim but adds considerable functionality so that it can be efficiently used for Edge Computing scenarios. EdgeCloudSim is an open source tool and any contributions are welcome. If you want to contribute EdgeCloudSim please check below feature list and the [contributing guidelines](/CONTRIBUTING.md). If you want to use EdgeCloudSim in your research work, please cite our paper [[1]](http://ieeexplore.ieee.org/document/7946405/).
|
||||
|
||||
## Needed Features
|
||||
|
||||
* Mist computing features (executing tasks on mobile device)
|
||||
* Incorporating cellular access network model into EdgeCloudSim (3G/4G/5G)
|
||||
* Task migration among the Edge or Cloud VMs
|
||||
* Energy consumption model for the mobile and edge devices as well as the cloud datacenters
|
||||
* Adding probabilistic network failure model by considering the congestion or other parameters such as the distance between mobile device and the WiFi access point.
|
||||
* Visual tool for displaying the network topology
|
||||
|
||||
# EdgeCloudSim: An Environment for Performance Evaluation of Edge Computing Systems
|
||||
|
||||
EdgeCloudSim provides a modular architecture to provide support for a variety of crucial functionalities such as network modeling specific to WLAN and WAN, device mobility model, realistic and tunable load generator. As depicted in Figure 2, in the current EdgeCloudSim version there are five main modules available, namely: Core Simulation, Networking, Load Generator, Mobility and Edge Orchestrator. To ease fast prototyping efforts, each module contains a default implementation that can be extended easily.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/edgecloudsim_diagram.png" width="55%">
|
||||
<p align="center">
|
||||
Figure 1: Relationship between EdgeCloudSim modules.
|
||||
</p>
|
||||
</p>
|
||||
|
||||
## Mobility Module
|
||||
The mobility module manages the location of edge devices and clients. Since CloudSim focuses on the conventional cloud computing principles, the mobility is not considered in the framework. In our design, each mobile device has x and y coordinates which are updated according to the dynamically managed hash table. By default, we provide a nomadic mobility model but different mobility models can be implemented by extending abstract MobilityModel class.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/mobility_module.png" width="55%">
|
||||
</p>
|
||||
|
||||
## Load Generator Module
|
||||
The load generator module is responsible for generating tasks for the given configuration. By default, the tasks are generated according to a Poisson distribution via active/idle task generation pattern. If other task generation pattern is required, abstract LoadGeneratorModel class should be extended.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/task_generator_module.png" width="50%">
|
||||
</p>
|
||||
|
||||
## Networking Module
|
||||
The networking module particularly handles the transmission delay in the WLAN and WAN by considering both upload and download data. The default implementation of the networking module is based on a single server queue model. Users o EdgeCloudSim can incorporate their own network behavior models by extending abstract NetworkModel class.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/network_module.png" width="55%">
|
||||
</p>
|
||||
|
||||
## Edge Orchestrator Module
|
||||
The edge orchestrator module is the decision maker of the system. It uses the information collected from the other modules to decide how and where to handle incoming client requests. In the first version, we simply use a probabilistic approach to decide where to handle incoming tasks but more realistic edge orchestrator can be added by extending abstract EdgeOrchestrator class.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/edge_orchestrator_module.png" width="65%">
|
||||
</p>
|
||||
|
||||
## Core Simulation Module
|
||||
The core simulation module is responsible for loading and running the Edge Computing scenarios from the configuration files. In addition, it offers a logging mechanism to save the simulation results into the files. The results are saved in comma-separated value (CSV) data format by default, but it can be changed to any format.
|
||||
|
||||
## Extensibility
|
||||
EdgeCloudSim uses a factory pattern making easier to integrate new models mentioned above. As shown in Figure 2, EdgeCloudsim requires a scenario factory class which knows the creation logic of the abstract modules. If you want to use different mobility, load generator, networking and edge orchestrator module, you can use your own scenario factory which provides the concrete implementation of your custom modules.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/class_diagram.png" width="100%">
|
||||
<p align="center">
|
||||
Figure 2: Class Diagram of Important Modules
|
||||
</p>
|
||||
</p>
|
||||
|
||||
## Ease of Use
|
||||
At the beginning of our study, we observed that too many parameters are used in the simulations and managing these parameters programmatically is very difficult.
|
||||
As a solution, we propose to use configuration files to manage the parameters.
|
||||
EdgeCloudSim reads parameters dynamically from the following files:
|
||||
- **config.properties:** Simulation settings are managed in configuration file
|
||||
- **applications.xml:** Application properties are stored in xml file
|
||||
- **edge_devices.xml:** Edge devices (datacenters, hosts, VMs etc.) are defined in xml file
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/ease_of_use.png" width="60%">
|
||||
</p>
|
||||
|
||||
## Compilation and Running
|
||||
To compile sample application, *compile.sh* script which is located in *scripts/sample_application* folder can be used. You can rewrite similar script for your own application by modifying the arguments of javac command in way to declare the java file which includes your main method. Please note that, this script can run on Linux based systems, including Mac OS. You can also use your favorite IDE (eclipse, netbeans etc.) to compile your project.
|
||||
|
||||
In order to run multiple sample_application scenarios in parallel, you can use *run_scenarios.sh* script which is located in *scripts/sample_application* folder. To run your own application, you need to modify java command in *runner.sh* script in a way to declare the java class which includes your main method. The details of using this script is explained in [this](/wiki/How-to-run-EdgeCloudSim-application-in-parallel) wiki page.
|
||||
|
||||
You can also monitor each process via the output files located under *scripts/sample_application/output/date* folder. For example:
|
||||
```
|
||||
./run_scenarios.sh 8 10
|
||||
tail -f output/date/ite_1.log
|
||||
```
|
||||
|
||||
## Analyzing the Results
|
||||
At the end of each iteration, simulation results will be compressed in the *output/date/ite_n.tgz* files. When you extract these tgz files, you would see lots of log file in csv format. You can find matlab files which can plot graphics by using these files under *scripts/sample_application/matlab* folder. You can also write other scripts (e.g. python scripts) with the same manner of matlab plotter files.
|
||||
|
||||
## Example Output of EdgeCloudSim
|
||||
You can plot lots of graphics by using the result of EdgeCloudSim. Some examples are given below:
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
## Publications
|
||||
**[1]** C. Sonmez, A. Ozgovde and C. Ersoy, "[EdgeCloudSim: An environment for performance evaluation of Edge Computing systems](http://ieeexplore.ieee.org/document/7946405/)," *2017 Second International Conference on Fog and Mobile Edge Computing (FMEC)*, Valencia, 2017, pp. 39-44.
|
||||
|
||||
**[2]** C. Sonmez, A. Ozgovde and C. Ersoy, "[Performance evaluation of single-tier and two-tier cloudlet assisted applications](http://ieeexplore.ieee.org/document/7962674/)," *2017 IEEE International Conference on Communications Workshops (ICC Workshops)*, Paris, 2017, pp. 302-307.
|
||||
# EdgeCloudSim
|
||||
|
||||
EdgeCloudSim provides a simulation environment specific to Edge Computing scenarios where it is possible to conduct experiments that considers both computational and networking resources. EdgeCloudSim is based on CloudSim but adds considerable functionality so that it can be efficiently used for Edge Computing scenarios. EdgeCloudSim is an open source tool and any contributions are welcome. If you want to contribute EdgeCloudSim, please check below feature list and the [contributing guidelines](/CONTRIBUTING.md). If you want to use EdgeCloudSim in your research work, please cite our paper [[3]](https://onlinelibrary.wiley.com/doi/abs/10.1002/ett.3493).
|
||||
|
||||
## Needed Features
|
||||
|
||||
* Mist computing features (executing tasks on mobile device)
|
||||
* Incorporating cellular access network model into EdgeCloudSim (3G/4G/5G)
|
||||
* Task migration among the Edge or Cloud VMs
|
||||
* Energy consumption model for the mobile and edge devices as well as the cloud datacenters
|
||||
* Adding probabilistic network failure model by considering the congestion or other parameters such as the distance between mobile device and the WiFi access point.
|
||||
* Visual tool for displaying the network topology
|
||||
|
||||
# EdgeCloudSim: An Environment for Performance Evaluation of Edge Computing Systems
|
||||
|
||||
EdgeCloudSim provides a modular architecture to provide support for a variety of crucial functionalities such as network modeling specific to WLAN and WAN, device mobility model, realistic and tunable load generator. As depicted in Figure 2, the current EdgeCloudSim version has five main modules available: Core Simulation, Networking, Load Generator, Mobility and Edge Orchestrator. To ease fast prototyping efforts, each module contains a default implementation that can be easily extended.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/edgecloudsim_diagram.png" width="55%">
|
||||
<p align="center">
|
||||
Figure 1: Relationship between EdgeCloudSim modules.
|
||||
</p>
|
||||
</p>
|
||||
|
||||
## Mobility Module
|
||||
The mobility module manages the location of edge devices and clients. Since CloudSim focuses on the conventional cloud computing principles, the mobility is not considered in the framework. In our design, each mobile device has x and y coordinates which are updated according to the dynamically managed hash table. By default, we provide a nomadic mobility model, but different mobility models can be implemented by extending abstract MobilityModel class.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/mobility_module.png" width="55%">
|
||||
</p>
|
||||
|
||||
## Load Generator Module
|
||||
The load generator module is responsible for generating tasks for the given configuration. By default, the tasks are generated according to a Poisson distribution via active/idle task generation pattern. If other task generation patterns are required, abstract LoadGeneratorModel class should be extended.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/task_generator_module.png" width="50%">
|
||||
</p>
|
||||
|
||||
## Networking Module
|
||||
The networking module particularly handles the transmission delay in the WLAN and WAN by considering both upload and download data. The default implementation of the networking module is based on a single server queue model. Users of EdgeCloudSim can incorporate their own network behavior models by extending abstract NetworkModel class.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/network_module.png" width="55%">
|
||||
</p>
|
||||
|
||||
## Edge Orchestrator Module
|
||||
The edge orchestrator module is the decision maker of the system. It uses the information collected from the other modules to decide how and where to handle incoming client requests. In the first version, we simply use a probabilistic approach to decide where to handle incoming tasks, but more realistic edge orchestrator can be added by extending abstract EdgeOrchestrator class.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/edge_orchestrator_module.png" width="65%">
|
||||
</p>
|
||||
|
||||
## Core Simulation Module
|
||||
The core simulation module is responsible for loading and running the Edge Computing scenarios from the configuration files. In addition, it offers a logging mechanism to save the simulation results into the files. The results are saved in comma-separated value (CSV) data format by default, but it can be changed to any format.
|
||||
|
||||
## Extensibility
|
||||
EdgeCloudSim uses a factory pattern making easier to integrate new models mentioned above. As shown in Figure 2, EdgeCloudsim requires a scenario factory class which knows the creation logic of the abstract modules. If you want to use different mobility, load generator, networking and edge orchestrator module, you can use your own scenario factory which provides the concrete implementation of your custom modules.
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/class_diagram.png" width="100%">
|
||||
<p align="center">
|
||||
Figure 2: Class Diagram of Important Modules
|
||||
</p>
|
||||
</p>
|
||||
|
||||
## Ease of Use
|
||||
At the beginning of our study, we observed that too many parameters are used in the simulations and managing these parameters programmatically is difficult.
|
||||
As a solution, we propose to use configuration files to manage the parameters.
|
||||
EdgeCloudSim reads parameters dynamically from the following files:
|
||||
- **config.properties:** Simulation settings are managed in configuration file
|
||||
- **applications.xml:** Application properties are stored in xml file
|
||||
- **edge_devices.xml:** Edge devices (datacenters, hosts, VMs etc.) are defined in xml file
|
||||
|
||||
<p align="center">
|
||||
<img src="/doc/images/ease_of_use.png" width="60%">
|
||||
</p>
|
||||
|
||||
## Compilation and Running
|
||||
To compile sample application, *compile.sh* script which is located in *scripts/sample_application* folder can be used. You can rewrite similar script for your own application by modifying the arguments of javac command in way to declare the java file which includes your main method. Please note that this script can run on Linux based systems, including Mac OS. You can also use your favorite IDE (eclipse, netbeans etc.) to compile your project.
|
||||
|
||||
In order to run multiple sample_application scenarios in parallel, you can use *run_scenarios.sh* script which is located in *scripts/sample_application* folder. To run your own application, modify the java command in *runner.sh* script in a way to declare the java class which includes your main method. The details of using this script is explained in [this](/wiki/How-to-run-EdgeCloudSim-application-in-parallel) wiki page.
|
||||
|
||||
You can also monitor each process via the output files located under *scripts/sample_application/output/date* folder. For example:
|
||||
```
|
||||
./run_scenarios.sh 8 10
|
||||
tail -f output/date/ite_1.log
|
||||
```
|
||||
|
||||
## Analyzing the Results
|
||||
At the end of each iteration, simulation results will be compressed in the *output/date/ite_n.tgz* files. When you extract these tgz files, you will see lots of log file in csv format. You can find matlab files which can plot graphics by using these files under *scripts/sample_application/matlab* folder. You can also write other scripts (e.g. python scripts) with the same manner of matlab plotter files.
|
||||
|
||||
## Example Output of EdgeCloudSim
|
||||
You can plot lots of graphics by using the result of EdgeCloudSim. Some examples are given below:
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
## Publications
|
||||
**[1]** C. Sonmez, A. Ozgovde and C. Ersoy, "[EdgeCloudSim: An environment for performance evaluation of Edge Computing systems](http://ieeexplore.ieee.org/document/7946405/)," *2017 Second International Conference on Fog and Mobile Edge Computing (FMEC)*, Valencia, 2017, pp. 39-44.
|
||||
|
||||
**[2]** C. Sonmez, A. Ozgovde and C. Ersoy, "[Performance evaluation of single-tier and two-tier cloudlet assisted applications](http://ieeexplore.ieee.org/document/7962674/)," *2017 IEEE International Conference on Communications Workshops (ICC Workshops)*, Paris, 2017, pp. 302-307.
|
||||
|
||||
**[3]** Sonmez C, Ozgovde A, Ersoy C. "[EdgeCloudSim: An environment for performance evaluation of Edge Computing systems](https://onlinelibrary.wiley.com/doi/abs/10.1002/ett.3493)," *Transactions on Emerging Telecommunications Technologies*, 2018;e3493.
|
||||
|
BIN
doc/images/class_diagram.png
Normal file → Executable file
BIN
doc/images/class_diagram.png
Normal file → Executable file
Binary file not shown.
Before Width: | Height: | Size: 417 KiB After Width: | Height: | Size: 104 KiB |
2
scripts/sample_application/compile.sh → scripts/sample_app1/compile.sh
Normal file → Executable file
2
scripts/sample_application/compile.sh → scripts/sample_app1/compile.sh
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
rm -rf ../../bin
|
||||
mkdir ../../bin
|
||||
javac -classpath "../../lib/cloudsim-4.0.jar:../../lib/commons-math3-3.6.1.jar:../../lib/colt.jar" -sourcepath ../../src ../../src/edu/boun/edgecloudsim/sample_application/mainApp.java -d ../../bin
|
||||
javac -classpath "../../lib/cloudsim-4.0.jar:../../lib/commons-math3-3.6.1.jar:../../lib/colt.jar" -sourcepath ../../src ../../src/edu/boun/edgecloudsim/applications/sample_app1/MainApp.java -d ../../bin
|
@ -4,52 +4,52 @@
|
||||
<usage_percentage>30</usage_percentage>
|
||||
<prob_cloud_selection>20</prob_cloud_selection>
|
||||
<poisson_interarrival>5</poisson_interarrival>
|
||||
<delay_sensitivity>0.90</delay_sensitivity>
|
||||
<active_period>45</active_period>
|
||||
<idle_period>15</idle_period>
|
||||
<data_upload>1500</data_upload>
|
||||
<data_download>25</data_download>
|
||||
<task_length>2000</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization>20</vm_utilization>
|
||||
<vm_utilization_on_edge>20</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>2</vm_utilization_on_cloud>
|
||||
</application>
|
||||
<application name="HEALTH_APP">
|
||||
<usage_percentage>20</usage_percentage>
|
||||
<prob_cloud_selection>20</prob_cloud_selection>
|
||||
<poisson_interarrival>30</poisson_interarrival>
|
||||
<delay_sensitivity>0.05</delay_sensitivity>
|
||||
<active_period>10</active_period>
|
||||
<idle_period>20</idle_period>
|
||||
<data_upload>1250</data_upload>
|
||||
<data_download>20</data_download>
|
||||
<task_length>400</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization>5</vm_utilization>
|
||||
<vm_utilization_on_edge>5</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>0.5</vm_utilization_on_cloud>
|
||||
</application>
|
||||
<application name="HEAVY_COMP_APP">
|
||||
<usage_percentage>20</usage_percentage>
|
||||
<prob_cloud_selection>40</prob_cloud_selection>
|
||||
<poisson_interarrival>60</poisson_interarrival>
|
||||
<delay_sensitivity>0.15</delay_sensitivity>
|
||||
<active_period>60</active_period>
|
||||
<idle_period>60</idle_period>
|
||||
<data_upload>2500</data_upload>
|
||||
<data_download>250</data_download>
|
||||
<task_length>3000</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization>30</vm_utilization>
|
||||
<vm_utilization_on_edge>30</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>3</vm_utilization_on_cloud>
|
||||
</application>
|
||||
<application name="INFOTAINMENT_APP">
|
||||
<usage_percentage>30</usage_percentage>
|
||||
<prob_cloud_selection>15</prob_cloud_selection>
|
||||
<poisson_interarrival>7</poisson_interarrival>
|
||||
<delay_sensitivity>0.5</delay_sensitivity>
|
||||
<active_period>15</active_period>
|
||||
<idle_period>45</idle_period>
|
||||
<data_upload>25</data_upload>
|
||||
<data_download>2000</data_download>
|
||||
<task_length>750</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization>10</vm_utilization>
|
||||
<vm_utilization_on_edge>10</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>1</vm_utilization_on_cloud>
|
||||
</application>
|
||||
</applications>
|
@ -1,5 +1,5 @@
|
||||
#default config file
|
||||
simulation_time=20
|
||||
simulation_time=30
|
||||
warm_up_period=3
|
||||
vm_load_check_interval=0.1
|
||||
vm_location_check_interval=0.1
|
||||
@ -14,9 +14,15 @@ wan_propogation_delay=0.1
|
||||
lan_internal_delay=0.005
|
||||
wlan_bandwidth=200
|
||||
wan_bandwidth=15
|
||||
gsm_bandwidth=10
|
||||
gsm_bandwidth=0
|
||||
|
||||
mips_for_cloud=20000
|
||||
#all the host on cloud runs on a single datacenter
|
||||
number_of_host_on_cloud_datacenter=1
|
||||
number_of_vm_on_cloud_host=4
|
||||
core_for_cloud_vm=4
|
||||
mips_for_cloud_vm=10000
|
||||
ram_for_cloud_vm=32000
|
||||
storage_for_cloud_vm=1000000
|
||||
|
||||
#use ',' for multiple values
|
||||
orchestrator_policies=NEXT_FIT
|
@ -9,7 +9,7 @@
|
||||
<x_pos>1</x_pos>
|
||||
<y_pos>1</y_pos>
|
||||
<wlan_id>0</wlan_id>
|
||||
<attractiveness>1</attractiveness>
|
||||
<attractiveness>0</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -43,7 +43,7 @@
|
||||
<x_pos>2</x_pos>
|
||||
<y_pos>2</y_pos>
|
||||
<wlan_id>1</wlan_id>
|
||||
<attractiveness>1</attractiveness>
|
||||
<attractiveness>0</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -77,7 +77,7 @@
|
||||
<x_pos>3</x_pos>
|
||||
<y_pos>3</y_pos>
|
||||
<wlan_id>2</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -111,7 +111,7 @@
|
||||
<x_pos>4</x_pos>
|
||||
<y_pos>4</y_pos>
|
||||
<wlan_id>3</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -145,7 +145,7 @@
|
||||
<x_pos>5</x_pos>
|
||||
<y_pos>5</y_pos>
|
||||
<wlan_id>4</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -179,7 +179,7 @@
|
||||
<x_pos>6</x_pos>
|
||||
<y_pos>6</y_pos>
|
||||
<wlan_id>5</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -213,7 +213,7 @@
|
||||
<x_pos>7</x_pos>
|
||||
<y_pos>7</y_pos>
|
||||
<wlan_id>6</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -247,7 +247,7 @@
|
||||
<x_pos>8</x_pos>
|
||||
<y_pos>8</y_pos>
|
||||
<wlan_id>7</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -281,7 +281,7 @@
|
||||
<x_pos>9</x_pos>
|
||||
<y_pos>9</y_pos>
|
||||
<wlan_id>8</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -315,7 +315,7 @@
|
||||
<x_pos>10</x_pos>
|
||||
<y_pos>10</y_pos>
|
||||
<wlan_id>9</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -349,7 +349,7 @@
|
||||
<x_pos>11</x_pos>
|
||||
<y_pos>11</y_pos>
|
||||
<wlan_id>10</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -383,7 +383,7 @@
|
||||
<x_pos>12</x_pos>
|
||||
<y_pos>12</y_pos>
|
||||
<wlan_id>11</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -417,7 +417,7 @@
|
||||
<x_pos>13</x_pos>
|
||||
<y_pos>13</y_pos>
|
||||
<wlan_id>12</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
@ -451,7 +451,7 @@
|
||||
<x_pos>14</x_pos>
|
||||
<y_pos>14</y_pos>
|
||||
<wlan_id>13</wlan_id>
|
||||
<attractiveness>3</attractiveness>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
@ -1,55 +1,53 @@
|
||||
%--------------------------------------------------------------
|
||||
%description
|
||||
% returns a value according to the given arguments
|
||||
%--------------------------------------------------------------
|
||||
function [ret_val] = getConfiguration(argType)
|
||||
if(argType == 1)
|
||||
ret_val = 'D:\output\20-06-2017_00-31\default_config';
|
||||
elseif(argType == 2)
|
||||
ret_val = 60 * 125; %simulation time (in seconds)
|
||||
elseif(argType == 3)
|
||||
ret_val = 1; %Number of iterations
|
||||
elseif(argType == 4)
|
||||
ret_val = 1; %x tick interval for number of mobile devices
|
||||
elseif(argType == 5)
|
||||
ret_val = {'SINGLE_TIER','TWO_TIER'};
|
||||
elseif(argType == 6)
|
||||
ret_val = {'1-tier','2-tier'};
|
||||
elseif(argType == 7)
|
||||
ret_val=[350 60 450 450]; %position of figure
|
||||
elseif(argType == 8)
|
||||
ret_val = 20; %server load log interval (in seconds)
|
||||
elseif(argType == 9)
|
||||
ret_val = 'Number of Mobile Devices'; %Common text for s axis
|
||||
elseif(argType == 10)
|
||||
ret_val = 100; %min number of mobile device
|
||||
elseif(argType == 11)
|
||||
ret_val = 100; %step size of mobile device count
|
||||
elseif(argType == 12)
|
||||
ret_val =1000; %max number of mobile device
|
||||
elseif(argType == 19)
|
||||
ret_val = 1; %return 1 if you want to plot errors
|
||||
elseif(argType == 20)
|
||||
ret_val=1; %return 1 if graph is plotted colerful
|
||||
elseif(argType == 21)
|
||||
ret_val=[0.55 0 0]; %color of first line
|
||||
elseif(argType == 22)
|
||||
ret_val=[0 0.15 0.6]; %color of second line
|
||||
elseif(argType == 23)
|
||||
ret_val=[0 0.23 0]; %color of third line
|
||||
elseif(argType == 24)
|
||||
ret_val=[0.6 0 0.6]; %color of fourth line
|
||||
elseif(argType == 25)
|
||||
ret_val=[0.08 0.08 0.08]; %color of fifth line
|
||||
elseif(argType == 26)
|
||||
ret_val=[0 0.8 0.8]; %color of sixth line
|
||||
elseif(argType == 27)
|
||||
ret_val=[0.8 0.4 0]; %color of seventh line
|
||||
elseif(argType == 28)
|
||||
ret_val=[0.8 0.8 0]; %color of eighth line
|
||||
elseif(argType == 40)
|
||||
ret_val={'-k*','-ko','-ks','-kv','-kp','-kd','-kx','-kh'}; %line style (marker) of the colerless line
|
||||
elseif(argType == 50)
|
||||
ret_val={':k*',':ko',':ks',':kv',':kp',':kd',':kx',':kh'}; %line style (marker) of the colerfull line
|
||||
end
|
||||
%--------------------------------------------------------------
|
||||
%description
|
||||
% returns a value according to the given argumentssss
|
||||
%--------------------------------------------------------------
|
||||
function [ret_val] = getConfiguration(argType)
|
||||
if(argType == 1)
|
||||
ret_val = 'D:\sim_results';
|
||||
elseif(argType == 2)
|
||||
ret_val = 1; %Number of iterations
|
||||
elseif(argType == 3)
|
||||
ret_val = 100; %min number of mobile device
|
||||
elseif(argType == 4)
|
||||
ret_val = 100; %step size of mobile device count
|
||||
elseif(argType == 5)
|
||||
ret_val =1000; %max number of mobile device
|
||||
elseif(argType == 6)
|
||||
ret_val = 1; %xTickLabelCoefficient
|
||||
elseif(argType == 7)
|
||||
ret_val = {'SINGLE_TIER','TWO_TIER','TWO_TIER_WITH_EO'};
|
||||
elseif(argType == 8)
|
||||
ret_val = {'1-tier','2-tier','2-tier with EO'};
|
||||
elseif(argType == 9)
|
||||
ret_val=[10 3 12 12]; %position of figure
|
||||
elseif(argType == 10)
|
||||
ret_val = 'Number of Mobile Devices'; %Common text for x axis
|
||||
elseif(argType == 11)
|
||||
ret_val = 1; %return 1 if you want to save figure as pdf
|
||||
elseif(argType == 12)
|
||||
ret_val = 0; %return 1 if you want to plot errors
|
||||
elseif(argType == 20)
|
||||
ret_val=1; %return 1 if graph is plotted colerful
|
||||
elseif(argType == 21)
|
||||
ret_val=[0.55 0 0]; %color of first line
|
||||
elseif(argType == 22)
|
||||
ret_val=[0 0.15 0.6]; %color of second line
|
||||
elseif(argType == 23)
|
||||
ret_val=[0 0.23 0]; %color of third line
|
||||
elseif(argType == 24)
|
||||
ret_val=[0.6 0 0.6]; %color of fourth line
|
||||
elseif(argType == 25)
|
||||
ret_val=[0.08 0.08 0.08]; %color of fifth line
|
||||
elseif(argType == 26)
|
||||
ret_val=[0 0.8 0.8]; %color of sixth line
|
||||
elseif(argType == 27)
|
||||
ret_val=[0.8 0.4 0]; %color of seventh line
|
||||
elseif(argType == 28)
|
||||
ret_val=[0.8 0.8 0]; %color of eighth line
|
||||
elseif(argType == 40)
|
||||
ret_val={'-k*','-ko','-ks','-kv','-kp','-kd','-kx','-kh'}; %line style (marker) of the colerless line
|
||||
elseif(argType == 50)
|
||||
ret_val={':k*',':ko',':ks',':kv',':kp',':kd',':kx',':kh'}; %line style (marker) of the colerfull line
|
||||
end
|
||||
end
|
21
scripts/sample_app1/matlab/plotAvgFailedTask.m
Normal file
21
scripts/sample_app1/matlab/plotAvgFailedTask.m
Normal file
@ -0,0 +1,21 @@
|
||||
function [] = plotAvgFailedTask()
|
||||
|
||||
plotGenericResult(1, 2, 'Failed Tasks (%)', 'ALL_APPS', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, {'Failed Tasks for';'Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, 'Failed Tasks for Health App (%)', 'HEALTH_APP', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, {'Failed Tasks for';'Infotainment App (%)'}, 'INFOTAINMENT_APP', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, 'Failed Tasks for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 'percentage_for_all');
|
||||
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge (%)', 'ALL_APPS', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, {'Failed Tasks on Edge';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge for Health App (%)', 'HEALTH_APP', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge for Infotainment App (%)', 'INFOTAINMENT_APP', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 'percentage_for_all');
|
||||
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud (%)', 'ALL_APPS', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, {'Failed Tasks on Cloud for';'Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Health App (%)', 'HEALTH_APP', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Infotainment App (%)', 'INFOTAINMENT_APP', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 'percentage_for_all');
|
||||
|
||||
end
|
21
scripts/sample_app1/matlab/plotAvgNetworkDelay.m
Normal file
21
scripts/sample_app1/matlab/plotAvgNetworkDelay.m
Normal file
@ -0,0 +1,21 @@
|
||||
function [] = plotAvgNetworkDelay()
|
||||
|
||||
plotGenericResult(1, 7, 'Average Network Delay (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(1, 7, 'Average Network Delay for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(5, 1, 'Average WLAN Delay (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(5, 1, {'Average WLAN Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(5, 1, 'Average WLAN Delay for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(5, 1, {'Average WLAN Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(5, 1, {'Average WLAN Delay';'for Heavy Comp. App %(sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(5, 3, 'Average WAN Delay (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(5, 3, {'Average WAN Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(5, 3, 'Average WAN Delay for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(5, 3, {'Average WAN Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(5, 3, {'Average WAN Delay';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
21
scripts/sample_app1/matlab/plotAvgProcessingTime.m
Normal file
21
scripts/sample_app1/matlab/plotAvgProcessingTime.m
Normal file
@ -0,0 +1,21 @@
|
||||
function [] = plotAvgProcessingTime()
|
||||
|
||||
plotGenericResult(1, 6, 'Processing Time (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Augmented Reality App (sec)', 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Infotainment App (sec)', 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Heavy Comp. App (sec)', 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(2, 6, 'Processing Time on Edge (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Health App (sec)'}, 'HEALTH_APP', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Heavy Computation App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(3, 6, 'Processing Time on Cloud (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Health App (sec)'}, 'HEALTH_APP', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Heavy Computation App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
21
scripts/sample_app1/matlab/plotAvgServiceTime.m
Normal file
21
scripts/sample_app1/matlab/plotAvgServiceTime.m
Normal file
@ -0,0 +1,21 @@
|
||||
function [] = plotAvgServiceTime()
|
||||
|
||||
plotGenericResult(1, 5, 'Service Time (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(1, 5, {'Service Time for';'Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(1, 5, 'Service Time for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(1, 5, 'Service Time for Infotainment App (sec)', 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(1, 5, {'Service Time for';'Compute Intensive App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(2, 5, 'Service Time on Edge (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(2, 5, {'Service Time on Edge';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(2, 5, 'Service Time on Edge for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(2, 5, {'Service Time on Edge';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(2, 5, {'Service Time on Edge';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(3, 5, 'Service Time on Cloud (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(3, 5, 'Service Time on Cloud for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
9
scripts/sample_app1/matlab/plotAvgVmUtilization.m
Normal file
9
scripts/sample_app1/matlab/plotAvgVmUtilization.m
Normal file
@ -0,0 +1,9 @@
|
||||
function [] = plotAvgVmUtilization()
|
||||
|
||||
plotGenericResult(2, 8, 'Average VM Utilization (%)', 'ALL_APPS', '');
|
||||
plotGenericResult(2, 8, {'Average VM Utilization';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(2, 8, 'Average VM Utilization for Health App (%)', 'HEALTH_APP', '');
|
||||
plotGenericResult(2, 8, 'Average VM Utilization for Infotainment App (%)', 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(2, 8, 'Average VM Utilization for Heavy Comp. App (%)', 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
@ -1,129 +1,149 @@
|
||||
function [] = plotGenericResult(rowOfset, columnOfset, yLabel, appType, calculatePercentage)
|
||||
folderPath = getConfiguration(1);
|
||||
numOfSimulations = getConfiguration(3);
|
||||
stepOfxAxis = getConfiguration(4);
|
||||
scenarioType = getConfiguration(5);
|
||||
startOfMobileDeviceLoop = getConfiguration(10);
|
||||
stepOfMobileDeviceLoop = getConfiguration(11);
|
||||
endOfMobileDeviceLoop = getConfiguration(12);
|
||||
numOfMobileDevices = (endOfMobileDeviceLoop - startOfMobileDeviceLoop)/stepOfMobileDeviceLoop + 1;
|
||||
|
||||
all_results = zeros(numOfSimulations, size(scenarioType,2), numOfMobileDevices);
|
||||
min_max_results = zeros(2, size(scenarioType,2), numOfMobileDevices);
|
||||
|
||||
if ~exist('appType','var')
|
||||
appType = 'ALL_APPS';
|
||||
end
|
||||
|
||||
for s=1:numOfSimulations
|
||||
for i=1:size(scenarioType,2)
|
||||
for j=1:numOfMobileDevices
|
||||
try
|
||||
mobileDeviceNumber = startOfMobileDeviceLoop + stepOfMobileDeviceLoop * (j-1);
|
||||
filePath = strcat(folderPath,'\ite',int2str(s),'\SIMRESULT_',char(scenarioType(i)),'_NEXT_FIT_',int2str(mobileDeviceNumber),'DEVICES_',appType,'_GENERIC.log')
|
||||
|
||||
readData = dlmread(filePath,';',rowOfset,0);
|
||||
value = readData(1,columnOfset);
|
||||
if(calculatePercentage==1)
|
||||
totalTask = readData(1,1)+readData(1,2);
|
||||
value = (100 * value) / totalTask;
|
||||
end
|
||||
|
||||
all_results(s,i,j) = value;
|
||||
catch err
|
||||
error(err)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if(numOfSimulations == 1)
|
||||
results = all_results;
|
||||
else
|
||||
results = mean(all_results); %still 3d matrix but 1xMxN format
|
||||
end
|
||||
|
||||
results = squeeze(results); %remove singleton dimensions
|
||||
|
||||
for i=1:size(scenarioType,2)
|
||||
for j=1:numOfMobileDevices
|
||||
x=all_results(:,i,j); % Create Data
|
||||
SEM = std(x)/sqrt(length(x)); % Standard Error
|
||||
ts = tinv([0.05 0.95],length(x)-1); % T-Score
|
||||
CI = mean(x) + ts*SEM; % Confidence Intervals
|
||||
|
||||
if(CI(1) < 0)
|
||||
CI(1) = 0;
|
||||
end
|
||||
|
||||
if(CI(2) < 0)
|
||||
CI(2) = 0;
|
||||
end
|
||||
|
||||
min_max_results(1,i,j) = results(i,j) - CI(1);
|
||||
min_max_results(2,i,j) = CI(2) - results(i,j);
|
||||
end
|
||||
end
|
||||
|
||||
types = zeros(1,numOfMobileDevices);
|
||||
for i=1:numOfMobileDevices
|
||||
types(i)=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
end
|
||||
|
||||
|
||||
hFig = figure;
|
||||
set(hFig, 'Position',getConfiguration(7));
|
||||
set(0,'DefaultAxesFontName','Times New Roman');
|
||||
set(0,'DefaultTextFontName','Times New Roman');
|
||||
set(0,'DefaultAxesFontSize',12);
|
||||
set(0,'DefaultTextFontSize',12);
|
||||
if(getConfiguration(20) == 1)
|
||||
for i=stepOfxAxis:stepOfxAxis:numOfMobileDevices
|
||||
xIndex=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
|
||||
markers = getConfiguration(50);
|
||||
for j=1:size(scenarioType,2)
|
||||
plot(xIndex, results(j,i),char(markers(j)),'MarkerFaceColor',getConfiguration(20+j),'color',getConfiguration(20+j));
|
||||
hold on;
|
||||
end
|
||||
end
|
||||
|
||||
for j=1:size(scenarioType,2)
|
||||
if(getConfiguration(19) == 1)
|
||||
errorbar(types, results(j,:), min_max_results(1,j,:),min_max_results(2,j,:),':k','color',getConfiguration(20+j),'LineWidth',1.5);
|
||||
else
|
||||
plot(types, results(j,:),':k','color',getConfiguration(20+j),'LineWidth',1.5);
|
||||
end
|
||||
hold on;
|
||||
end
|
||||
|
||||
set(gca,'color','none');
|
||||
else
|
||||
markers = getConfiguration(40);
|
||||
for j=1:size(scenarioType,2)
|
||||
if(getConfiguration(19) == 1)
|
||||
errorbar(types, results(j,:),min_max_results(1,j,:),min_max_results(2,j,:),char(markers(j)),'MarkerFaceColor','w','LineWidth',1.4);
|
||||
else
|
||||
plot(types, results(j,:),char(markers(j)),'MarkerFaceColor','w','LineWidth',1.4);
|
||||
end
|
||||
hold on;
|
||||
end
|
||||
|
||||
%set(gcf, 'Position',getConfiguration(28));
|
||||
end
|
||||
lgnd = legend(getConfiguration(6),'Location','NorthWest');
|
||||
if(getConfiguration(20) == 1)
|
||||
set(lgnd,'color','none');
|
||||
end
|
||||
|
||||
hold off;
|
||||
axis square
|
||||
xlabel(getConfiguration(9));
|
||||
set(gca,'XTick', (stepOfxAxis*stepOfMobileDeviceLoop):(stepOfxAxis*stepOfMobileDeviceLoop):endOfMobileDeviceLoop);
|
||||
ylabel(yLabel);
|
||||
set(gca,'XLim',[startOfMobileDeviceLoop-5 endOfMobileDeviceLoop+5]);
|
||||
|
||||
set(get(gca,'Xlabel'),'FontSize',12)
|
||||
set(get(gca,'Ylabel'),'FontSize',12)
|
||||
set(lgnd,'FontSize',12)
|
||||
function [] = plotGenericResult(rowOfset, columnOfset, yLabel, appType, calculatePercentage)
|
||||
folderPath = getConfiguration(1);
|
||||
numOfSimulations = getConfiguration(2);
|
||||
startOfMobileDeviceLoop = getConfiguration(3);
|
||||
stepOfMobileDeviceLoop = getConfiguration(4);
|
||||
endOfMobileDeviceLoop = getConfiguration(5);
|
||||
xTickLabelCoefficient = getConfiguration(6);
|
||||
|
||||
scenarioType = getConfiguration(7);
|
||||
legends = getConfiguration(8);
|
||||
numOfMobileDevices = (endOfMobileDeviceLoop - startOfMobileDeviceLoop)/stepOfMobileDeviceLoop + 1;
|
||||
|
||||
pos=getConfiguration(9);
|
||||
|
||||
all_results = zeros(numOfSimulations, size(scenarioType,2), numOfMobileDevices);
|
||||
min_results = zeros(size(scenarioType,2), numOfMobileDevices);
|
||||
max_results = zeros(size(scenarioType,2), numOfMobileDevices);
|
||||
|
||||
for s=1:numOfSimulations
|
||||
for i=1:size(scenarioType,2)
|
||||
for j=1:numOfMobileDevices
|
||||
try
|
||||
mobileDeviceNumber = startOfMobileDeviceLoop + stepOfMobileDeviceLoop * (j-1);
|
||||
filePath = strcat(folderPath,'\ite',int2str(s),'\SIMRESULT_',char(scenarioType(i)),'_NEXT_FIT_',int2str(mobileDeviceNumber),'DEVICES_',appType,'_GENERIC.log')
|
||||
|
||||
readData = dlmread(filePath,';',rowOfset,0);
|
||||
value = readData(1,columnOfset);
|
||||
if(strcmp(calculatePercentage,'percentage_for_all'))
|
||||
readData = dlmread(filePath,';',1,0);
|
||||
totalTask = readData(1,1)+readData(1,2);
|
||||
value = (100 * value) / totalTask;
|
||||
elseif(strcmp(calculatePercentage,'percentage_for_completed'))
|
||||
readData = dlmread(filePath,';',1,0);
|
||||
totalTask = readData(1,1);
|
||||
value = (100 * value) / totalTask;
|
||||
elseif(strcmp(calculatePercentage,'percentage_for_failed'))
|
||||
readData = dlmread(filePath,';',1,0);
|
||||
totalTask = readData(1,2);
|
||||
value = (100 * value) / totalTask;
|
||||
end
|
||||
|
||||
all_results(s,i,j) = value;
|
||||
catch err
|
||||
error(err)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if(numOfSimulations == 1)
|
||||
results = all_results;
|
||||
else
|
||||
results = mean(all_results); %still 3d matrix but 1xMxN format
|
||||
end
|
||||
|
||||
results = squeeze(results); %remove singleton dimensions
|
||||
|
||||
for i=1:size(scenarioType,2)
|
||||
for j=1:numOfMobileDevices
|
||||
x=all_results(:,i,j); % Create Data
|
||||
SEM = std(x)/sqrt(length(x)); % Standard Error
|
||||
ts = tinv([0.05 0.95],length(x)-1); % T-Score
|
||||
CI = mean(x) + ts*SEM; % Confidence Intervals
|
||||
|
||||
if(CI(1) < 0)
|
||||
CI(1) = 0;
|
||||
end
|
||||
|
||||
if(CI(2) < 0)
|
||||
CI(2) = 0;
|
||||
end
|
||||
|
||||
min_results(i,j) = results(i,j) - CI(1);
|
||||
max_results(i,j) = CI(2) - results(i,j);
|
||||
end
|
||||
end
|
||||
|
||||
types = zeros(1,numOfMobileDevices);
|
||||
for i=1:numOfMobileDevices
|
||||
types(i)=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
end
|
||||
|
||||
hFig = figure;
|
||||
set(hFig, 'Units','centimeters');
|
||||
set(hFig, 'Position',pos);
|
||||
set(0,'DefaultAxesFontName','Times New Roman');
|
||||
set(0,'DefaultTextFontName','Times New Roman');
|
||||
set(0,'DefaultAxesFontSize',10);
|
||||
set(0,'DefaultTextFontSize',12);
|
||||
if(getConfiguration(20) == 1)
|
||||
for i=1:1:numOfMobileDevices
|
||||
xIndex=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
|
||||
markers = getConfiguration(50);
|
||||
for j=1:size(scenarioType,2)
|
||||
plot(xIndex, results(j,i),char(markers(j)),'MarkerFaceColor',getConfiguration(20+j),'color',getConfiguration(20+j));
|
||||
hold on;
|
||||
end
|
||||
end
|
||||
|
||||
for j=1:size(scenarioType,2)
|
||||
if(getConfiguration(12) == 1)
|
||||
errorbar(types, results(j,:), min_results(j,:),max_results(j,:),':k','color',getConfiguration(20+j),'LineWidth',1.5);
|
||||
else
|
||||
plot(types, results(j,:),':k','color',getConfiguration(20+j),'LineWidth',1.5);
|
||||
end
|
||||
hold on;
|
||||
end
|
||||
|
||||
set(gca,'color','none');
|
||||
else
|
||||
markers = getConfiguration(40);
|
||||
for j=1:size(scenarioType,2)
|
||||
if(getConfiguration(12) == 1)
|
||||
errorbar(types, results(j,:),min_results(j,:),max_results(j,:),char(markers(j)),'MarkerFaceColor','w','LineWidth',1.2);
|
||||
else
|
||||
plot(types, results(j,:),char(markers(j)),'MarkerFaceColor','w','LineWidth',1.2);
|
||||
end
|
||||
hold on;
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
lgnd = legend(legends,'Location','NorthWest');
|
||||
if(getConfiguration(20) == 1)
|
||||
set(lgnd,'color','none');
|
||||
end
|
||||
|
||||
hold off;
|
||||
axis square
|
||||
xlabel(getConfiguration(10));
|
||||
set(gca,'XTick', (startOfMobileDeviceLoop*xTickLabelCoefficient):(stepOfMobileDeviceLoop*xTickLabelCoefficient):endOfMobileDeviceLoop);
|
||||
set(gca,'XTickLabel', (startOfMobileDeviceLoop*xTickLabelCoefficient):(stepOfMobileDeviceLoop*xTickLabelCoefficient):endOfMobileDeviceLoop);
|
||||
ylabel(yLabel);
|
||||
set(gca,'XLim',[startOfMobileDeviceLoop-5 endOfMobileDeviceLoop+5]);
|
||||
|
||||
set(get(gca,'Xlabel'),'FontSize',12)
|
||||
set(get(gca,'Ylabel'),'FontSize',12)
|
||||
set(lgnd,'FontSize',11)
|
||||
|
||||
if(getConfiguration(11) == 1)
|
||||
set(hFig, 'PaperUnits', 'centimeters');
|
||||
set(hFig, 'PaperPositionMode', 'manual');
|
||||
set(hFig, 'PaperPosition',[0 0 pos(3) pos(4)]);
|
||||
set(gcf, 'PaperSize', [pos(3) pos(4)]); %Keep the same paper size
|
||||
filename = strcat(folderPath,'\',int2str(rowOfset),'_',int2str(columnOfset),'_',appType);
|
||||
saveas(gcf, filename, 'pdf');
|
||||
end
|
||||
end
|
27
scripts/sample_app1/matlab/plotTaskFailureReason.m
Normal file
27
scripts/sample_app1/matlab/plotTaskFailureReason.m
Normal file
@ -0,0 +1,27 @@
|
||||
function [] = plotTaskFailureReason()
|
||||
|
||||
plotGenericResult(1, 10, 'Failed Task due to VM Capacity (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Heavy Computation App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
plotGenericResult(1, 11, 'Failed Task due to Mobility (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Heavy Computation App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
plotGenericResult(5, 4, 'Failed Tasks due to WLAN failure (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Heavy Comp. App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
plotGenericResult(5, 6, 'Failed Tasks due to WAN failure (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Heavy Comp. App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
end
|
@ -0,0 +1,633 @@
|
||||
Simulation started at 30/08/2018 15:27:26
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:26
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 100
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 9744(9744/0)
|
||||
# of failed tasks (Edge/Cloud): 111(111/0)
|
||||
# of completed tasks (Edge/Cloud): 9633(9633/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 17(17/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 14(14/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 97/0(0/0/0)
|
||||
percentage of failed tasks: 1.139163%
|
||||
average service time: 1.894226 seconds. (on Edge: 1.894226, on Cloud: NaN)
|
||||
average processing time: 1.875163 seconds. (on Edge: 1.875163, on Cloud: NaN)
|
||||
average network delay: 0.019063 seconds. (LAN delay: 0.019063, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 7.883421/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:28. It took 2 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:28
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 100
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 9160(7334/1826)
|
||||
# of failed tasks (Edge/Cloud): 77(69/8)
|
||||
# of completed tasks (Edge/Cloud): 9083(7265/1818)
|
||||
# of uncompleted tasks (Edge/Cloud): 13(13/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 5(5/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 72/0(0/0/0)
|
||||
percentage of failed tasks: 0.840611%
|
||||
average service time: 1.549063 seconds. (on Edge: 1.760382, on Cloud: 0.704599)
|
||||
average processing time: 1.438888 seconds. (on Edge: 1.741308, on Cloud: 0.230373)
|
||||
average network delay: 0.110175 seconds. (LAN delay: 0.019074, MAN delay: NaN, WAN delay: 0.474227)
|
||||
average server utilization Edge/Cloud: 5.247253/0.107023
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:30. It took 1 Second
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:30
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 100
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 8412(6670/1742)
|
||||
# of failed tasks (Edge/Cloud): 67(59/8)
|
||||
# of completed tasks (Edge/Cloud): 8345(6611/1734)
|
||||
# of uncompleted tasks (Edge/Cloud): 12(12/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 67/0(0/0/0)
|
||||
percentage of failed tasks: 0.796481%
|
||||
average service time: 1.519185 seconds. (on Edge: 1.729428, on Cloud: 0.717617)
|
||||
average processing time: 1.398358 seconds. (on Edge: 1.701111, on Cloud: 0.244093)
|
||||
average network delay: 0.120826 seconds. (LAN delay: 0.028317, MAN delay: NaN, WAN delay: 0.473524)
|
||||
average server utilization Edge/Cloud: 4.838748/0.116639
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:32. It took 1 Second
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:32
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 20582(20582/0)
|
||||
# of failed tasks (Edge/Cloud): 1415(1415/0)
|
||||
# of completed tasks (Edge/Cloud): 19167(19167/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 32(32/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 1214(1214/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 201/0(0/0/0)
|
||||
percentage of failed tasks: 6.874939%
|
||||
average service time: 2.329965 seconds. (on Edge: 2.329965, on Cloud: NaN)
|
||||
average processing time: 2.310554 seconds. (on Edge: 2.310554, on Cloud: NaN)
|
||||
average network delay: 0.019411 seconds. (LAN delay: 0.019411, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 19.481605/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:35. It took 3 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:35
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 19047(15053/3994)
|
||||
# of failed tasks (Edge/Cloud): 306(298/8)
|
||||
# of completed tasks (Edge/Cloud): 18741(14755/3986)
|
||||
# of uncompleted tasks (Edge/Cloud): 22(21/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 146(146/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 160/0(0/0/0)
|
||||
percentage of failed tasks: 1.606552%
|
||||
average service time: 1.778477 seconds. (on Edge: 2.073153, on Cloud: 0.687676)
|
||||
average processing time: 1.660990 seconds. (on Edge: 2.053713, on Cloud: 0.207246)
|
||||
average network delay: 0.117487 seconds. (LAN delay: 0.019440, MAN delay: NaN, WAN delay: 0.480430)
|
||||
average server utilization Edge/Cloud: 12.975991/0.217809
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:38. It took 3 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:38
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 20282(16122/4160)
|
||||
# of failed tasks (Edge/Cloud): 165(155/10)
|
||||
# of completed tasks (Edge/Cloud): 20117(15967/4150)
|
||||
# of uncompleted tasks (Edge/Cloud): 15(14/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 165/0(0/0/0)
|
||||
percentage of failed tasks: 0.813529%
|
||||
average service time: 1.550418 seconds. (on Edge: 1.777338, on Cloud: 0.677349)
|
||||
average processing time: 1.428568 seconds. (on Edge: 1.748622, on Cloud: 0.197167)
|
||||
average network delay: 0.121850 seconds. (LAN delay: 0.028716, MAN delay: NaN, WAN delay: 0.480181)
|
||||
average server utilization Edge/Cloud: 11.869326/0.241221
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:43. It took 5 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:43
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 300
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 31588(31588/0)
|
||||
# of failed tasks (Edge/Cloud): 4223(4223/0)
|
||||
# of completed tasks (Edge/Cloud): 27365(27365/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 53(53/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 3942(3942/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 281/0(0/0/0)
|
||||
percentage of failed tasks: 13.369001%
|
||||
average service time: 2.819168 seconds. (on Edge: 2.819168, on Cloud: NaN)
|
||||
average processing time: 2.799437 seconds. (on Edge: 2.799437, on Cloud: NaN)
|
||||
average network delay: 0.019731 seconds. (LAN delay: 0.019731, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 32.894768/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:52. It took 8 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:52
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 300
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 27767(22007/5760)
|
||||
# of failed tasks (Edge/Cloud): 1246(1225/21)
|
||||
# of completed tasks (Edge/Cloud): 26521(20782/5739)
|
||||
# of uncompleted tasks (Edge/Cloud): 42(42/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 1027(1027/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 219/0(0/0/0)
|
||||
percentage of failed tasks: 4.487341%
|
||||
average service time: 1.942640 seconds. (on Edge: 2.290136, on Cloud: 0.684291)
|
||||
average processing time: 1.821822 seconds. (on Edge: 2.270339, on Cloud: 0.197656)
|
||||
average network delay: 0.120818 seconds. (LAN delay: 0.019797, MAN delay: NaN, WAN delay: 0.486635)
|
||||
average server utilization Edge/Cloud: 19.931916/0.309365
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:01. It took 9 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:01
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 300
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 27391(21870/5521)
|
||||
# of failed tasks (Edge/Cloud): 199(177/22)
|
||||
# of completed tasks (Edge/Cloud): 27192(21693/5499)
|
||||
# of uncompleted tasks (Edge/Cloud): 30(30/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 199/0(0/0/0)
|
||||
percentage of failed tasks: 0.726516%
|
||||
average service time: 1.518735 seconds. (on Edge: 1.732473, on Cloud: 0.675556)
|
||||
average processing time: 1.397512 seconds. (on Edge: 1.703488, on Cloud: 0.190465)
|
||||
average network delay: 0.121223 seconds. (LAN delay: 0.028985, MAN delay: NaN, WAN delay: 0.485091)
|
||||
average server utilization Edge/Cloud: 15.657549/0.309365
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:10. It took 9 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:10
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 38980(38980/0)
|
||||
# of failed tasks (Edge/Cloud): 7667(7667/0)
|
||||
# of completed tasks (Edge/Cloud): 31313(31313/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 62(62/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 7275(7275/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 392/0(0/0/0)
|
||||
percentage of failed tasks: 19.669061%
|
||||
average service time: 2.859370 seconds. (on Edge: 2.859370, on Cloud: NaN)
|
||||
average processing time: 2.839280 seconds. (on Edge: 2.839280, on Cloud: NaN)
|
||||
average network delay: 0.020089 seconds. (LAN delay: 0.020089, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 38.879001/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:24. It took 13 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:24
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 39128(31017/8111)
|
||||
# of failed tasks (Edge/Cloud): 3075(3050/25)
|
||||
# of completed tasks (Edge/Cloud): 36053(27967/8086)
|
||||
# of uncompleted tasks (Edge/Cloud): 56(54/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 2711(2711/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 364/0(0/0/0)
|
||||
percentage of failed tasks: 7.858822%
|
||||
average service time: 2.165025 seconds. (on Edge: 2.593167, on Cloud: 0.684211)
|
||||
average processing time: 2.039043 seconds. (on Edge: 2.573087, on Cloud: 0.191949)
|
||||
average network delay: 0.125981 seconds. (LAN delay: 0.020080, MAN delay: NaN, WAN delay: 0.492262)
|
||||
average server utilization Edge/Cloud: 31.109651/0.478261
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:38. It took 14 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:38
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 37643(30008/7635)
|
||||
# of failed tasks (Edge/Cloud): 322(298/24)
|
||||
# of completed tasks (Edge/Cloud): 37321(29710/7611)
|
||||
# of uncompleted tasks (Edge/Cloud): 51(48/3)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 322/0(0/0/0)
|
||||
percentage of failed tasks: 0.855405%
|
||||
average service time: 1.735730 seconds. (on Edge: 2.004333, on Cloud: 0.687222)
|
||||
average processing time: 1.612197 seconds. (on Edge: 1.974968, on Cloud: 0.196100)
|
||||
average network delay: 0.123533 seconds. (LAN delay: 0.029365, MAN delay: NaN, WAN delay: 0.491123)
|
||||
average server utilization Edge/Cloud: 25.848662/0.508361
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:56. It took 17 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:56
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 500
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 48943(48943/0)
|
||||
# of failed tasks (Edge/Cloud): 12151(12151/0)
|
||||
# of completed tasks (Edge/Cloud): 36792(36792/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 72(72/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 11654(11654/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 497/0(0/0/0)
|
||||
percentage of failed tasks: 24.826839%
|
||||
average service time: 3.021387 seconds. (on Edge: 3.021387, on Cloud: NaN)
|
||||
average processing time: 3.001062 seconds. (on Edge: 3.001062, on Cloud: NaN)
|
||||
average network delay: 0.020324 seconds. (LAN delay: 0.020324, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 48.122910/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:29:14. It took 18 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:29:14
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 500
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 46907(37484/9423)
|
||||
# of failed tasks (Edge/Cloud): 5486(5457/29)
|
||||
# of completed tasks (Edge/Cloud): 41421(32027/9394)
|
||||
# of uncompleted tasks (Edge/Cloud): 62(59/3)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 5109(5109/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 377/0(0/0/0)
|
||||
percentage of failed tasks: 11.695483%
|
||||
average service time: 2.239804 seconds. (on Edge: 2.695709, on Cloud: 0.685485)
|
||||
average processing time: 2.110792 seconds. (on Edge: 2.675268, on Cloud: 0.186322)
|
||||
average network delay: 0.129012 seconds. (LAN delay: 0.020441, MAN delay: NaN, WAN delay: 0.499163)
|
||||
average server utilization Edge/Cloud: 36.375418/0.487876
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:29:43. It took 28 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:29:43
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 500
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 48005(38053/9952)
|
||||
# of failed tasks (Edge/Cloud): 436(400/36)
|
||||
# of completed tasks (Edge/Cloud): 47569(37653/9916)
|
||||
# of uncompleted tasks (Edge/Cloud): 83(82/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 436/0(0/0/0)
|
||||
percentage of failed tasks: 0.908239%
|
||||
average service time: 1.977924 seconds. (on Edge: 2.317429, on Cloud: 0.688756)
|
||||
average processing time: 1.850193 seconds. (on Edge: 2.287576, on Cloud: 0.189367)
|
||||
average network delay: 0.127731 seconds. (LAN delay: 0.029854, MAN delay: NaN, WAN delay: 0.499389)
|
||||
average server utilization Edge/Cloud: 37.673196/0.577759
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:30:39. It took 56 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:30:39
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 52450(52450/0)
|
||||
# of failed tasks (Edge/Cloud): 12981(12981/0)
|
||||
# of completed tasks (Edge/Cloud): 39469(39469/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 75(75/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 12485(12485/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 496/0(0/0/0)
|
||||
percentage of failed tasks: 24.749285%
|
||||
average service time: 2.970507 seconds. (on Edge: 2.970507, on Cloud: NaN)
|
||||
average processing time: 2.949778 seconds. (on Edge: 2.949778, on Cloud: NaN)
|
||||
average network delay: 0.020728 seconds. (LAN delay: 0.020728, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 49.608815/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:31:35. It took 56 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:31:35
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 57013(45217/11796)
|
||||
# of failed tasks (Edge/Cloud): 9316(9278/38)
|
||||
# of completed tasks (Edge/Cloud): 47697(35939/11758)
|
||||
# of uncompleted tasks (Edge/Cloud): 62(61/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 8807(8807/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 509/0(0/0/0)
|
||||
percentage of failed tasks: 16.340133%
|
||||
average service time: 2.315465 seconds. (on Edge: 2.846571, on Cloud: 0.692106)
|
||||
average processing time: 2.174666 seconds. (on Edge: 2.825747, on Cloud: 0.184599)
|
||||
average network delay: 0.140799 seconds. (LAN delay: 0.020824, MAN delay: NaN, WAN delay: 0.507507)
|
||||
average server utilization Edge/Cloud: 43.084687/0.677676
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:32:50. It took 1 Minute 15 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:32:50
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 55033(43936/11097)
|
||||
# of failed tasks (Edge/Cloud): 581(545/36)
|
||||
# of completed tasks (Edge/Cloud): 54452(43391/11061)
|
||||
# of uncompleted tasks (Edge/Cloud): 95(93/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 581/0(0/0/0)
|
||||
percentage of failed tasks: 1.055730%
|
||||
average service time: 2.327678 seconds. (on Edge: 2.744177, on Cloud: 0.693798)
|
||||
average processing time: 2.200332 seconds. (on Edge: 2.713820, on Cloud: 0.185981)
|
||||
average network delay: 0.127346 seconds. (LAN delay: 0.030358, MAN delay: NaN, WAN delay: 0.507818)
|
||||
average server utilization Edge/Cloud: 50.904802/0.625418
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:34:09. It took 1 Minute 18 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:34:09
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 700
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 69629(69629/0)
|
||||
# of failed tasks (Edge/Cloud): 26542(26542/0)
|
||||
# of completed tasks (Edge/Cloud): 43087(43087/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 97(97/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 25826(25826/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 716/0(0/0/0)
|
||||
percentage of failed tasks: 38.119174%
|
||||
average service time: 3.203409 seconds. (on Edge: 3.203409, on Cloud: NaN)
|
||||
average processing time: 3.182394 seconds. (on Edge: 3.182394, on Cloud: NaN)
|
||||
average network delay: 0.021015 seconds. (LAN delay: 0.021015, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 59.743789/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:35:26. It took 1 Minute 17 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:35:26
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 700
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 67093(53456/13637)
|
||||
# of failed tasks (Edge/Cloud): 15841(15786/55)
|
||||
# of completed tasks (Edge/Cloud): 51252(37670/13582)
|
||||
# of uncompleted tasks (Edge/Cloud): 74(72/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 15267(15267/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 574/0(0/0/0)
|
||||
percentage of failed tasks: 23.610511%
|
||||
average service time: 2.404199 seconds. (on Edge: 3.016760, on Cloud: 0.705248)
|
||||
average processing time: 2.251764 seconds. (on Edge: 2.995567, on Cloud: 0.188811)
|
||||
average network delay: 0.152435 seconds. (LAN delay: 0.021193, MAN delay: NaN, WAN delay: 0.516437)
|
||||
average server utilization Edge/Cloud: 48.764931/0.783027
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:36:59. It took 1 Minute 33 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:36:59
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 700
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 67204(53549/13655)
|
||||
# of failed tasks (Edge/Cloud): 2804(2760/44)
|
||||
# of completed tasks (Edge/Cloud): 64400(50789/13611)
|
||||
# of uncompleted tasks (Edge/Cloud): 120(119/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 1903(1903/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 901/0(0/0/0)
|
||||
percentage of failed tasks: 4.172371%
|
||||
average service time: 3.056693 seconds. (on Edge: 3.687844, on Cloud: 0.701572)
|
||||
average processing time: 2.923022 seconds. (on Edge: 3.656914, on Cloud: 0.184526)
|
||||
average network delay: 0.133671 seconds. (LAN delay: 0.030930, MAN delay: NaN, WAN delay: 0.517045)
|
||||
average server utilization Edge/Cloud: 80.104515/0.770903
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:38:59. It took 1 Minute 59 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:38:59
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 78099(78099/0)
|
||||
# of failed tasks (Edge/Cloud): 32838(32838/0)
|
||||
# of completed tasks (Edge/Cloud): 45261(45261/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 89(89/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 32062(32062/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 776/0(0/0/0)
|
||||
percentage of failed tasks: 42.046633%
|
||||
average service time: 3.294763 seconds. (on Edge: 3.294763, on Cloud: NaN)
|
||||
average processing time: 3.273343 seconds. (on Edge: 3.273343, on Cloud: NaN)
|
||||
average network delay: 0.021420 seconds. (LAN delay: 0.021420, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 64.457119/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:40:10. It took 1 Minute 11 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:40:10
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 74992(59396/15596)
|
||||
# of failed tasks (Edge/Cloud): 18844(18796/48)
|
||||
# of completed tasks (Edge/Cloud): 56148(40600/15548)
|
||||
# of uncompleted tasks (Edge/Cloud): 78(74/4)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 18198(18198/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 646/0(0/0/0)
|
||||
percentage of failed tasks: 25.128014%
|
||||
average service time: 2.420172 seconds. (on Edge: 3.074358, on Cloud: 0.711915)
|
||||
average processing time: 2.259818 seconds. (on Edge: 3.052875, on Cloud: 0.188935)
|
||||
average network delay: 0.160353 seconds. (LAN delay: 0.021483, MAN delay: NaN, WAN delay: 0.522980)
|
||||
average server utilization Edge/Cloud: 53.857501/0.956940
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:41:49. It took 1 Minute 38 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:41:49
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 71458(56822/14636)
|
||||
# of failed tasks (Edge/Cloud): 4311(4252/59)
|
||||
# of completed tasks (Edge/Cloud): 67147(52570/14577)
|
||||
# of uncompleted tasks (Edge/Cloud): 135(133/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 3354(3354/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 957/0(0/0/0)
|
||||
percentage of failed tasks: 6.032914%
|
||||
average service time: 3.103915 seconds. (on Edge: 3.768588, on Cloud: 0.706861)
|
||||
average processing time: 2.966123 seconds. (on Edge: 3.737375, on Cloud: 0.184707)
|
||||
average network delay: 0.137792 seconds. (LAN delay: 0.031213, MAN delay: NaN, WAN delay: 0.522154)
|
||||
average server utilization Edge/Cloud: 83.877210/0.759615
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:43:28. It took 1 Minute 39 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:43:28
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 900
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 86591(86591/0)
|
||||
# of failed tasks (Edge/Cloud): 38309(38309/0)
|
||||
# of completed tasks (Edge/Cloud): 48282(48282/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 97(97/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 37464(37464/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 845/0(0/0/0)
|
||||
percentage of failed tasks: 44.241318%
|
||||
average service time: 3.404546 seconds. (on Edge: 3.404546, on Cloud: NaN)
|
||||
average processing time: 3.382845 seconds. (on Edge: 3.382845, on Cloud: NaN)
|
||||
average network delay: 0.021701 seconds. (LAN delay: 0.021701, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 70.060320/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:44:45. It took 1 Minute 17 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:44:45
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 900
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 92770(73759/19011)
|
||||
# of failed tasks (Edge/Cloud): 29921(29866/55)
|
||||
# of completed tasks (Edge/Cloud): 62849(43893/18956)
|
||||
# of uncompleted tasks (Edge/Cloud): 109(102/7)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 29170(29170/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 751/0(0/0/0)
|
||||
percentage of failed tasks: 32.252883%
|
||||
average service time: 2.506834 seconds. (on Edge: 3.276532, on Cloud: 0.724583)
|
||||
average processing time: 2.329891 seconds. (on Edge: 3.254706, on Cloud: 0.188463)
|
||||
average network delay: 0.176943 seconds. (LAN delay: 0.021826, MAN delay: NaN, WAN delay: 0.536119)
|
||||
average server utilization Edge/Cloud: 61.998328/1.083194
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:46:25. It took 1 Minute 39 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:46:25
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 900
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 83054(66063/16991)
|
||||
# of failed tasks (Edge/Cloud): 12302(12257/45)
|
||||
# of completed tasks (Edge/Cloud): 70752(53806/16946)
|
||||
# of uncompleted tasks (Edge/Cloud): 143(141/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 11291(11291/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1011/0(0/0/0)
|
||||
percentage of failed tasks: 14.812050%
|
||||
average service time: 3.278302 seconds. (on Edge: 4.084576, on Cloud: 0.718264)
|
||||
average processing time: 3.126418 seconds. (on Edge: 4.052783, on Cloud: 0.185075)
|
||||
average network delay: 0.151883 seconds. (LAN delay: 0.031793, MAN delay: NaN, WAN delay: 0.533189)
|
||||
average server utilization Edge/Cloud: 92.689322/0.984532
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:48:37. It took 2 Minutes 12 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:48:37
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 95672(95672/0)
|
||||
# of failed tasks (Edge/Cloud): 46459(46459/0)
|
||||
# of completed tasks (Edge/Cloud): 49213(49213/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 92(92/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 45560(45560/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 899/0(0/0/0)
|
||||
percentage of failed tasks: 48.560707%
|
||||
average service time: 3.445419 seconds. (on Edge: 3.445419, on Cloud: NaN)
|
||||
average processing time: 3.423328 seconds. (on Edge: 3.423328, on Cloud: NaN)
|
||||
average network delay: 0.022091 seconds. (LAN delay: 0.022091, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 72.883421/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:50:01. It took 1 Minute 24 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:50:01
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 99828(79479/20349)
|
||||
# of failed tasks (Edge/Cloud): 32912(32858/54)
|
||||
# of completed tasks (Edge/Cloud): 66916(46621/20295)
|
||||
# of uncompleted tasks (Edge/Cloud): 107(101/6)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 32095(32095/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 817/0(0/0/0)
|
||||
percentage of failed tasks: 32.968706%
|
||||
average service time: 2.570496 seconds. (on Edge: 3.372683, on Cloud: 0.727740)
|
||||
average processing time: 2.391113 seconds. (on Edge: 3.350530, on Cloud: 0.187172)
|
||||
average network delay: 0.179384 seconds. (LAN delay: 0.022153, MAN delay: NaN, WAN delay: 0.540569)
|
||||
average server utilization Edge/Cloud: 67.738294/1.236204
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:52:27. It took 2 Minutes 25 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:52:27
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 1
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 98868(78602/20266)
|
||||
# of failed tasks (Edge/Cloud): 24284(24220/64)
|
||||
# of completed tasks (Edge/Cloud): 74584(54382/20202)
|
||||
# of uncompleted tasks (Edge/Cloud): 155(146/9)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 23210(23210/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1074/0(0/0/0)
|
||||
percentage of failed tasks: 24.562042%
|
||||
average service time: 3.264589 seconds. (on Edge: 4.205547, on Cloud: 0.731614)
|
||||
average processing time: 3.094171 seconds. (on Edge: 4.173248, on Cloud: 0.189391)
|
||||
average network delay: 0.170418 seconds. (LAN delay: 0.032299, MAN delay: NaN, WAN delay: 0.542223)
|
||||
average server utilization Edge/Cloud: 95.796106/1.204013
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:54:43. It took 2 Minutes 16 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Simulation finished at 30/08/2018 15:54:43. It took 27 Minutes 17 Seconds
|
Binary file not shown.
@ -0,0 +1,633 @@
|
||||
Simulation started at 30/08/2018 15:27:26
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:26
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 100
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 9170(9170/0)
|
||||
# of failed tasks (Edge/Cloud): 83(83/0)
|
||||
# of completed tasks (Edge/Cloud): 9087(9087/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 13(13/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 8(8/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 75/0(0/0/0)
|
||||
percentage of failed tasks: 0.905125%
|
||||
average service time: 1.805445 seconds. (on Edge: 1.805445, on Cloud: NaN)
|
||||
average processing time: 1.786389 seconds. (on Edge: 1.786389, on Cloud: NaN)
|
||||
average network delay: 0.019056 seconds. (LAN delay: 0.019056, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 7.112398/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:28. It took 2 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:28
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 100
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 9961(7987/1974)
|
||||
# of failed tasks (Edge/Cloud): 69(62/7)
|
||||
# of completed tasks (Edge/Cloud): 9892(7925/1967)
|
||||
# of uncompleted tasks (Edge/Cloud): 20(20/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 69/0(0/0/0)
|
||||
percentage of failed tasks: 0.692702%
|
||||
average service time: 1.470259 seconds. (on Edge: 1.666082, on Cloud: 0.681293)
|
||||
average processing time: 1.360702 seconds. (on Edge: 1.647019, on Cloud: 0.207138)
|
||||
average network delay: 0.109557 seconds. (LAN delay: 0.019063, MAN delay: NaN, WAN delay: 0.474155)
|
||||
average server utilization Edge/Cloud: 5.414477/0.132525
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:30. It took 1 Second
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:30
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 100
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 9051(7172/1879)
|
||||
# of failed tasks (Edge/Cloud): 80(75/5)
|
||||
# of completed tasks (Edge/Cloud): 8971(7097/1874)
|
||||
# of uncompleted tasks (Edge/Cloud): 11(11/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 80/0(0/0/0)
|
||||
percentage of failed tasks: 0.883880%
|
||||
average service time: 1.471366 seconds. (on Edge: 1.677839, on Cloud: 0.689436)
|
||||
average processing time: 1.349996 seconds. (on Edge: 1.649520, on Cloud: 0.215670)
|
||||
average network delay: 0.121371 seconds. (LAN delay: 0.028319, MAN delay: NaN, WAN delay: 0.473765)
|
||||
average server utilization Edge/Cloud: 5.077640/0.130435
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:31. It took 1 Second
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:31
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 19207(19207/0)
|
||||
# of failed tasks (Edge/Cloud): 831(831/0)
|
||||
# of completed tasks (Edge/Cloud): 18376(18376/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 26(26/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 670(670/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 161/0(0/0/0)
|
||||
percentage of failed tasks: 4.326548%
|
||||
average service time: 2.282277 seconds. (on Edge: 2.282277, on Cloud: NaN)
|
||||
average processing time: 2.262848 seconds. (on Edge: 2.262848, on Cloud: NaN)
|
||||
average network delay: 0.019429 seconds. (LAN delay: 0.019429, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 17.973602/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:34. It took 2 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:34
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 18761(14923/3838)
|
||||
# of failed tasks (Edge/Cloud): 226(217/9)
|
||||
# of completed tasks (Edge/Cloud): 18535(14706/3829)
|
||||
# of uncompleted tasks (Edge/Cloud): 20(20/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 98(98/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 128/0(0/0/0)
|
||||
percentage of failed tasks: 1.204627%
|
||||
average service time: 1.702445 seconds. (on Edge: 1.968395, on Cloud: 0.681010)
|
||||
average processing time: 1.588019 seconds. (on Edge: 1.949005, on Cloud: 0.201584)
|
||||
average network delay: 0.114426 seconds. (LAN delay: 0.019391, MAN delay: NaN, WAN delay: 0.479426)
|
||||
average server utilization Edge/Cloud: 12.052078/0.257943
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:36. It took 2 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:36
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 20525(16297/4228)
|
||||
# of failed tasks (Edge/Cloud): 156(143/13)
|
||||
# of completed tasks (Edge/Cloud): 20369(16154/4215)
|
||||
# of uncompleted tasks (Edge/Cloud): 32(31/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 156/0(0/0/0)
|
||||
percentage of failed tasks: 0.760049%
|
||||
average service time: 1.557475 seconds. (on Edge: 1.785970, on Cloud: 0.681764)
|
||||
average processing time: 1.435677 seconds. (on Edge: 1.757321, on Cloud: 0.202976)
|
||||
average network delay: 0.121798 seconds. (LAN delay: 0.028650, MAN delay: NaN, WAN delay: 0.478788)
|
||||
average server utilization Edge/Cloud: 12.373387/0.250836
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:39. It took 2 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:39
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 300
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 30836(30836/0)
|
||||
# of failed tasks (Edge/Cloud): 3220(3220/0)
|
||||
# of completed tasks (Edge/Cloud): 27616(27616/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 45(45/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 2879(2879/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 341/0(0/0/0)
|
||||
percentage of failed tasks: 10.442340%
|
||||
average service time: 2.648969 seconds. (on Edge: 2.648969, on Cloud: NaN)
|
||||
average processing time: 2.629243 seconds. (on Edge: 2.629243, on Cloud: NaN)
|
||||
average network delay: 0.019726 seconds. (LAN delay: 0.019726, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 31.385571/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:47. It took 8 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:47
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 300
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 29350(23335/6015)
|
||||
# of failed tasks (Edge/Cloud): 1740(1722/18)
|
||||
# of completed tasks (Edge/Cloud): 27610(21613/5997)
|
||||
# of uncompleted tasks (Edge/Cloud): 36(35/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 1524(1524/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 216/0(0/0/0)
|
||||
percentage of failed tasks: 5.928450%
|
||||
average service time: 2.039876 seconds. (on Edge: 2.417560, on Cloud: 0.678715)
|
||||
average processing time: 1.918593 seconds. (on Edge: 2.397770, on Cloud: 0.191656)
|
||||
average network delay: 0.121283 seconds. (LAN delay: 0.019790, MAN delay: NaN, WAN delay: 0.487059)
|
||||
average server utilization Edge/Cloud: 22.148232/0.331940
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:27:56. It took 8 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:27:56
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 300
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 29314(23289/6025)
|
||||
# of failed tasks (Edge/Cloud): 199(187/12)
|
||||
# of completed tasks (Edge/Cloud): 29115(23102/6013)
|
||||
# of uncompleted tasks (Edge/Cloud): 32(30/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 199/0(0/0/0)
|
||||
percentage of failed tasks: 0.678857%
|
||||
average service time: 1.597955 seconds. (on Edge: 1.836291, on Cloud: 0.682265)
|
||||
average processing time: 1.474473 seconds. (on Edge: 1.807215, on Cloud: 0.196076)
|
||||
average network delay: 0.123482 seconds. (LAN delay: 0.029076, MAN delay: NaN, WAN delay: 0.486189)
|
||||
average server utilization Edge/Cloud: 18.090062/0.408027
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:08. It took 12 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:08
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 35612(35612/0)
|
||||
# of failed tasks (Edge/Cloud): 4307(4307/0)
|
||||
# of completed tasks (Edge/Cloud): 31305(31305/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 54(54/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 3969(3969/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 338/0(0/0/0)
|
||||
percentage of failed tasks: 12.094238%
|
||||
average service time: 2.617284 seconds. (on Edge: 2.617284, on Cloud: NaN)
|
||||
average processing time: 2.597240 seconds. (on Edge: 2.597240, on Cloud: NaN)
|
||||
average network delay: 0.020043 seconds. (LAN delay: 0.020043, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 34.899068/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:22. It took 13 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:22
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 42653(33859/8794)
|
||||
# of failed tasks (Edge/Cloud): 4301(4277/24)
|
||||
# of completed tasks (Edge/Cloud): 38352(29582/8770)
|
||||
# of uncompleted tasks (Edge/Cloud): 54(50/4)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 3965(3965/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 336/0(0/0/0)
|
||||
percentage of failed tasks: 10.083699%
|
||||
average service time: 2.235105 seconds. (on Edge: 2.694778, on Cloud: 0.684585)
|
||||
average processing time: 2.106859 seconds. (on Edge: 2.674685, on Cloud: 0.191531)
|
||||
average network delay: 0.128246 seconds. (LAN delay: 0.020093, MAN delay: NaN, WAN delay: 0.493054)
|
||||
average server utilization Edge/Cloud: 33.628165/0.529264
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:28:44. It took 22 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:28:44
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 39217(31177/8040)
|
||||
# of failed tasks (Edge/Cloud): 310(279/31)
|
||||
# of completed tasks (Edge/Cloud): 38907(30898/8009)
|
||||
# of uncompleted tasks (Edge/Cloud): 42(40/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 310/0(0/0/0)
|
||||
percentage of failed tasks: 0.790474%
|
||||
average service time: 1.771259 seconds. (on Edge: 2.053145, on Cloud: 0.683767)
|
||||
average processing time: 1.646373 seconds. (on Edge: 2.023648, on Cloud: 0.190883)
|
||||
average network delay: 0.124885 seconds. (LAN delay: 0.029497, MAN delay: NaN, WAN delay: 0.492884)
|
||||
average server utilization Edge/Cloud: 27.273650/0.453177
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:29:03. It took 18 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:29:03
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 500
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 49083(49083/0)
|
||||
# of failed tasks (Edge/Cloud): 12554(12554/0)
|
||||
# of completed tasks (Edge/Cloud): 36529(36529/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 73(73/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 12017(12017/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 537/0(0/0/0)
|
||||
percentage of failed tasks: 25.577084%
|
||||
average service time: 2.985287 seconds. (on Edge: 2.985287, on Cloud: NaN)
|
||||
average processing time: 2.964927 seconds. (on Edge: 2.964927, on Cloud: NaN)
|
||||
average network delay: 0.020360 seconds. (LAN delay: 0.020360, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 46.954730/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:29:24. It took 21 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:29:24
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 500
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 48677(38794/9883)
|
||||
# of failed tasks (Edge/Cloud): 6831(6799/32)
|
||||
# of completed tasks (Edge/Cloud): 41846(31995/9851)
|
||||
# of uncompleted tasks (Edge/Cloud): 58(53/5)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 6434(6434/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 397/0(0/0/0)
|
||||
percentage of failed tasks: 14.033322%
|
||||
average service time: 2.251793 seconds. (on Edge: 2.732887, on Cloud: 0.689251)
|
||||
average processing time: 2.118043 seconds. (on Edge: 2.712387, on Cloud: 0.187679)
|
||||
average network delay: 0.133750 seconds. (LAN delay: 0.020501, MAN delay: NaN, WAN delay: 0.501573)
|
||||
average server utilization Edge/Cloud: 37.426541/0.570234
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:30:08. It took 44 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:30:08
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 500
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 43022(34240/8782)
|
||||
# of failed tasks (Edge/Cloud): 359(333/26)
|
||||
# of completed tasks (Edge/Cloud): 42663(33907/8756)
|
||||
# of uncompleted tasks (Edge/Cloud): 53(51/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 359/0(0/0/0)
|
||||
percentage of failed tasks: 0.834457%
|
||||
average service time: 1.800891 seconds. (on Edge: 2.087878, on Cloud: 0.689551)
|
||||
average processing time: 1.674191 seconds. (on Edge: 2.057892, on Cloud: 0.188336)
|
||||
average network delay: 0.126699 seconds. (LAN delay: 0.029986, MAN delay: NaN, WAN delay: 0.501215)
|
||||
average server utilization Edge/Cloud: 30.151696/0.508361
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:31:09. It took 1 Minute 0 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:31:09
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 59244(59244/0)
|
||||
# of failed tasks (Edge/Cloud): 18288(18288/0)
|
||||
# of completed tasks (Edge/Cloud): 40956(40956/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 94(94/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 17694(17694/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 594/0(0/0/0)
|
||||
percentage of failed tasks: 30.868949%
|
||||
average service time: 3.109607 seconds. (on Edge: 3.109607, on Cloud: NaN)
|
||||
average processing time: 3.088915 seconds. (on Edge: 3.088915, on Cloud: NaN)
|
||||
average network delay: 0.020692 seconds. (LAN delay: 0.020692, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 54.586718/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:32:25. It took 1 Minute 16 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:32:25
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 56528(44978/11550)
|
||||
# of failed tasks (Edge/Cloud): 10215(10186/29)
|
||||
# of completed tasks (Edge/Cloud): 46313(34792/11521)
|
||||
# of uncompleted tasks (Edge/Cloud): 85(80/5)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 9739(9739/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 476/0(0/0/0)
|
||||
percentage of failed tasks: 18.070691%
|
||||
average service time: 2.327657 seconds. (on Edge: 2.868043, on Cloud: 0.695759)
|
||||
average processing time: 2.185497 seconds. (on Edge: 2.847217, on Cloud: 0.187184)
|
||||
average network delay: 0.142160 seconds. (LAN delay: 0.020826, MAN delay: NaN, WAN delay: 0.508575)
|
||||
average server utilization Edge/Cloud: 42.612279/0.675585
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:33:34. It took 1 Minute 8 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:33:34
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 58921(46783/12138)
|
||||
# of failed tasks (Edge/Cloud): 829(792/37)
|
||||
# of completed tasks (Edge/Cloud): 58092(45991/12101)
|
||||
# of uncompleted tasks (Edge/Cloud): 103(101/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 137(137/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 692/0(0/0/0)
|
||||
percentage of failed tasks: 1.406969%
|
||||
average service time: 2.591590 seconds. (on Edge: 3.091040, on Cloud: 0.693387)
|
||||
average processing time: 2.462014 seconds. (on Edge: 3.060726, on Cloud: 0.186552)
|
||||
average network delay: 0.129576 seconds. (LAN delay: 0.030313, MAN delay: NaN, WAN delay: 0.506835)
|
||||
average server utilization Edge/Cloud: 60.224558/0.640050
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:35:19. It took 1 Minute 44 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:35:19
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 700
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 67283(67283/0)
|
||||
# of failed tasks (Edge/Cloud): 23738(23738/0)
|
||||
# of completed tasks (Edge/Cloud): 43545(43545/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 89(89/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 23029(23029/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 709/0(0/0/0)
|
||||
percentage of failed tasks: 35.280829%
|
||||
average service time: 3.230328 seconds. (on Edge: 3.230328, on Cloud: NaN)
|
||||
average processing time: 3.209319 seconds. (on Edge: 3.209319, on Cloud: NaN)
|
||||
average network delay: 0.021009 seconds. (LAN delay: 0.021009, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 60.376254/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:36:31. It took 1 Minute 11 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:36:31
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 700
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 64857(51553/13304)
|
||||
# of failed tasks (Edge/Cloud): 13358(13312/46)
|
||||
# of completed tasks (Edge/Cloud): 51499(38241/13258)
|
||||
# of uncompleted tasks (Edge/Cloud): 79(77/2)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 12803(12803/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 555/0(0/0/0)
|
||||
percentage of failed tasks: 20.596081%
|
||||
average service time: 2.400110 seconds. (on Edge: 2.988797, on Cloud: 0.702117)
|
||||
average processing time: 2.251869 seconds. (on Edge: 2.967627, on Cloud: 0.187356)
|
||||
average network delay: 0.148241 seconds. (LAN delay: 0.021170, MAN delay: NaN, WAN delay: 0.514761)
|
||||
average server utilization Edge/Cloud: 48.738653/0.836538
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:38:11. It took 1 Minute 40 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:38:11
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 700
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 65500(52098/13402)
|
||||
# of failed tasks (Edge/Cloud): 1656(1619/37)
|
||||
# of completed tasks (Edge/Cloud): 63844(50479/13365)
|
||||
# of uncompleted tasks (Edge/Cloud): 129(128/1)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 866(866/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 790/0(0/0/0)
|
||||
percentage of failed tasks: 2.528244%
|
||||
average service time: 2.870859 seconds. (on Edge: 3.445548, on Cloud: 0.700285)
|
||||
average processing time: 2.738297 seconds. (on Edge: 3.414685, on Cloud: 0.183609)
|
||||
average network delay: 0.132562 seconds. (LAN delay: 0.030863, MAN delay: NaN, WAN delay: 0.516677)
|
||||
average server utilization Edge/Cloud: 73.924988/0.748328
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:40:39. It took 2 Minutes 28 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:40:39
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 78287(78287/0)
|
||||
# of failed tasks (Edge/Cloud): 32285(32285/0)
|
||||
# of completed tasks (Edge/Cloud): 46002(46002/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 81(81/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 31541(31541/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 744/0(0/0/0)
|
||||
percentage of failed tasks: 41.239286%
|
||||
average service time: 3.287363 seconds. (on Edge: 3.287363, on Cloud: NaN)
|
||||
average processing time: 3.265970 seconds. (on Edge: 3.265970, on Cloud: NaN)
|
||||
average network delay: 0.021393 seconds. (LAN delay: 0.021393, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 64.845318/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:42:08. It took 1 Minute 28 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:42:08
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 75109(59804/15305)
|
||||
# of failed tasks (Edge/Cloud): 19314(19260/54)
|
||||
# of completed tasks (Edge/Cloud): 55795(40544/15251)
|
||||
# of uncompleted tasks (Edge/Cloud): 75(71/4)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 18675(18675/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 639/0(0/0/0)
|
||||
percentage of failed tasks: 25.714628%
|
||||
average service time: 2.448903 seconds. (on Edge: 3.103406, on Cloud: 0.708941)
|
||||
average processing time: 2.289573 seconds. (on Edge: 3.081864, on Cloud: 0.183310)
|
||||
average network delay: 0.159330 seconds. (LAN delay: 0.021543, MAN delay: NaN, WAN delay: 0.525631)
|
||||
average server utilization Edge/Cloud: 53.500956/0.829431
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:43:30. It took 1 Minute 21 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:43:30
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 79076(62768/16308)
|
||||
# of failed tasks (Edge/Cloud): 10034(9976/58)
|
||||
# of completed tasks (Edge/Cloud): 69042(52792/16250)
|
||||
# of uncompleted tasks (Edge/Cloud): 137(134/3)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 8989(8989/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1045/0(0/0/0)
|
||||
percentage of failed tasks: 12.689059%
|
||||
average service time: 3.282831 seconds. (on Edge: 4.074761, on Cloud: 0.710057)
|
||||
average processing time: 3.135541 seconds. (on Edge: 4.043438, on Cloud: 0.186020)
|
||||
average network delay: 0.147290 seconds. (LAN delay: 0.031323, MAN delay: NaN, WAN delay: 0.524037)
|
||||
average server utilization Edge/Cloud: 91.517559/0.914298
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:45:26. It took 1 Minute 56 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:45:26
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 900
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 85705(85705/0)
|
||||
# of failed tasks (Edge/Cloud): 38641(38641/0)
|
||||
# of completed tasks (Edge/Cloud): 47064(47064/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 88(88/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 37837(37837/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 804/0(0/0/0)
|
||||
percentage of failed tasks: 45.086051%
|
||||
average service time: 3.367897 seconds. (on Edge: 3.367897, on Cloud: NaN)
|
||||
average processing time: 3.346119 seconds. (on Edge: 3.346119, on Cloud: NaN)
|
||||
average network delay: 0.021778 seconds. (LAN delay: 0.021778, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 68.518872/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:46:56. It took 1 Minute 29 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:46:56
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 900
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 89192(70731/18461)
|
||||
# of failed tasks (Edge/Cloud): 27345(27281/64)
|
||||
# of completed tasks (Edge/Cloud): 61847(43450/18397)
|
||||
# of uncompleted tasks (Edge/Cloud): 98(92/6)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 26531(26531/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 814/0(0/0/0)
|
||||
percentage of failed tasks: 30.658579%
|
||||
average service time: 2.485208 seconds. (on Edge: 3.230742, on Cloud: 0.724406)
|
||||
average processing time: 2.310735 seconds. (on Edge: 3.208918, on Cloud: 0.189407)
|
||||
average network delay: 0.174473 seconds. (LAN delay: 0.021824, MAN delay: NaN, WAN delay: 0.534998)
|
||||
average server utilization Edge/Cloud: 60.870760/1.091973
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:48:37. It took 1 Minute 41 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:48:37
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 900
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 86726(68925/17801)
|
||||
# of failed tasks (Edge/Cloud): 14713(14659/54)
|
||||
# of completed tasks (Edge/Cloud): 72013(54266/17747)
|
||||
# of uncompleted tasks (Edge/Cloud): 143(140/3)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 13616(13616/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1097/0(0/0/0)
|
||||
percentage of failed tasks: 16.964924%
|
||||
average service time: 3.284205 seconds. (on Edge: 4.123089, on Cloud: 0.719105)
|
||||
average processing time: 3.128438 seconds. (on Edge: 4.091166, on Cloud: 0.184650)
|
||||
average network delay: 0.155768 seconds. (LAN delay: 0.031923, MAN delay: NaN, WAN delay: 0.534455)
|
||||
average server utilization Edge/Cloud: 94.234353/0.905936
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:50:47. It took 2 Minutes 10 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:50:47
|
||||
Scenario: SINGLE_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 100163(100163/0)
|
||||
# of failed tasks (Edge/Cloud): 50451(50451/0)
|
||||
# of completed tasks (Edge/Cloud): 49712(49712/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 108(108/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 49510(49510/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 941/0(0/0/0)
|
||||
percentage of failed tasks: 50.368899%
|
||||
average service time: 3.536686 seconds. (on Edge: 3.536686, on Cloud: NaN)
|
||||
average processing time: 3.514615 seconds. (on Edge: 3.514615, on Cloud: NaN)
|
||||
average network delay: 0.022071 seconds. (LAN delay: 0.022071, MAN delay: NaN, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 75.495700/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:52:34. It took 1 Minute 47 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:52:34
|
||||
Scenario: TWO_TIER - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 89434(71160/18274)
|
||||
# of failed tasks (Edge/Cloud): 26025(25972/53)
|
||||
# of completed tasks (Edge/Cloud): 63409(45188/18221)
|
||||
# of uncompleted tasks (Edge/Cloud): 110(105/5)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 25287(25287/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 738/0(0/0/0)
|
||||
percentage of failed tasks: 29.099671%
|
||||
average service time: 2.476858 seconds. (on Edge: 3.183565, on Cloud: 0.724227)
|
||||
average processing time: 2.305956 seconds. (on Edge: 3.161327, on Cloud: 0.184642)
|
||||
average network delay: 0.170901 seconds. (LAN delay: 0.022238, MAN delay: NaN, WAN delay: 0.539585)
|
||||
average server utilization Edge/Cloud: 61.185499/1.030518
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:54:37. It took 2 Minutes 3 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:54:37
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NEXT_FIT - #iteration: 2
|
||||
Duration: 0.5 hour(s) - Poisson: 5.0 - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 97953(77805/20148)
|
||||
# of failed tasks (Edge/Cloud): 23382(23306/76)
|
||||
# of completed tasks (Edge/Cloud): 74571(54499/20072)
|
||||
# of uncompleted tasks (Edge/Cloud): 150(144/6)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 22242(22242/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1140/0(0/0/0)
|
||||
percentage of failed tasks: 23.870632%
|
||||
average service time: 3.248170 seconds. (on Edge: 4.176229, on Cloud: 0.728327)
|
||||
average processing time: 3.078638 seconds. (on Edge: 4.143883, on Cloud: 0.186309)
|
||||
average network delay: 0.169532 seconds. (LAN delay: 0.032345, MAN delay: NaN, WAN delay: 0.542017)
|
||||
average server utilization Edge/Cloud: 95.974080/1.056856
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:57:19. It took 2 Minutes 41 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Simulation finished at 30/08/2018 15:57:19. It took 29 Minutes 53 Seconds
|
Binary file not shown.
1
scripts/sample_app1/output/30-08-2018_15-27/tmp_runner0.sh
Executable file
1
scripts/sample_app1/output/30-08-2018_15-27/tmp_runner0.sh
Executable file
@ -0,0 +1 @@
|
||||
/home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app1/runner.sh /home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app1/output/30-08-2018_15-27 default_config edge_devices.xml applications.xml 1
|
1
scripts/sample_app1/output/30-08-2018_15-27/tmp_runner1.sh
Executable file
1
scripts/sample_app1/output/30-08-2018_15-27/tmp_runner1.sh
Executable file
@ -0,0 +1 @@
|
||||
/home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app1/runner.sh /home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app1/output/30-08-2018_15-27 default_config edge_devices.xml applications.xml 2
|
0
scripts/sample_application/run_scenarios.sh → scripts/sample_app1/run_scenarios.sh
Normal file → Executable file
0
scripts/sample_application/run_scenarios.sh → scripts/sample_app1/run_scenarios.sh
Normal file → Executable file
4
scripts/sample_application/runner.sh → scripts/sample_app1/runner.sh
Normal file → Executable file
4
scripts/sample_application/runner.sh → scripts/sample_app1/runner.sh
Normal file → Executable file
@ -13,6 +13,6 @@ scenario_edge_devices_file=${script_root_path}/config/${edge_devices_file}
|
||||
scenario_applications_file=${script_root_path}/config/${applications_file}
|
||||
|
||||
mkdir -p $scenario_out_folder
|
||||
java -classpath '../../bin:../../lib/cloudsim-4.0.jar:../../lib/commons-math3-3.6.1.jar:../../lib/colt.jar' edu.boun.edgecloudsim.sample_application.mainApp $scenario_conf_file $scenario_edge_devices_file $scenario_applications_file $scenario_out_folder $iteration_number > ${scenario_out_folder}.log
|
||||
java -classpath '../../bin:../../lib/cloudsim-4.0.jar:../../lib/commons-math3-3.6.1.jar:../../lib/colt.jar' edu.boun.edgecloudsim.applications.sample_app1.MainApp $scenario_conf_file $scenario_edge_devices_file $scenario_applications_file $scenario_out_folder $iteration_number > ${scenario_out_folder}.log
|
||||
tar -czf ${scenario_out_folder}.tar.gz -C $simulation_out_folder/${scenario_name} ite${iteration_number}
|
||||
rm -rf $scenario_out_folder
|
||||
rm -rf $scenario_out_folder
|
4
scripts/sample_app2/compile.sh
Executable file
4
scripts/sample_app2/compile.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
rm -rf ../../bin
|
||||
mkdir ../../bin
|
||||
javac -classpath "../../lib/cloudsim-4.0.jar:../../lib/commons-math3-3.6.1.jar:../../lib/colt.jar" -sourcepath ../../src ../../src/edu/boun/edgecloudsim/applications/sample_app2/MainApp.java -d ../../bin
|
63
scripts/sample_app2/config/applications.xml
Normal file
63
scripts/sample_app2/config/applications.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0"?>
|
||||
<applications>
|
||||
<application name="AUGMENTED_REALITY">
|
||||
<usage_percentage>30</usage_percentage>
|
||||
<prob_cloud_selection>20</prob_cloud_selection>
|
||||
<poisson_interarrival>2</poisson_interarrival>
|
||||
<delay_sensitivity>0.9</delay_sensitivity>
|
||||
<active_period>40</active_period>
|
||||
<idle_period>20</idle_period>
|
||||
<data_upload>1500</data_upload>
|
||||
<data_download>25</data_download>
|
||||
<task_length>9000</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization_on_edge>6</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>0.6</vm_utilization_on_cloud>
|
||||
<vm_utilization_on_mobile>0</vm_utilization_on_mobile>
|
||||
</application>
|
||||
<application name="HEALTH_APP">
|
||||
<usage_percentage>20</usage_percentage>
|
||||
<prob_cloud_selection>20</prob_cloud_selection>
|
||||
<poisson_interarrival>3</poisson_interarrival>
|
||||
<delay_sensitivity>0.7</delay_sensitivity>
|
||||
<active_period>45</active_period>
|
||||
<idle_period>90</idle_period>
|
||||
<data_upload>20</data_upload>
|
||||
<data_download>1250</data_download>
|
||||
<task_length>3000</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization_on_edge>2</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>0.2</vm_utilization_on_cloud>
|
||||
<vm_utilization_on_mobile>0</vm_utilization_on_mobile>
|
||||
</application>
|
||||
<application name="HEAVY_COMP_APP">
|
||||
<usage_percentage>20</usage_percentage>
|
||||
<prob_cloud_selection>40</prob_cloud_selection>
|
||||
<poisson_interarrival>20</poisson_interarrival>
|
||||
<delay_sensitivity>0.1</delay_sensitivity>
|
||||
<active_period>60</active_period>
|
||||
<idle_period>120</idle_period>
|
||||
<data_upload>2500</data_upload>
|
||||
<data_download>200</data_download>
|
||||
<task_length>45000</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization_on_edge>30</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>3</vm_utilization_on_cloud>
|
||||
<vm_utilization_on_mobile>0</vm_utilization_on_mobile>
|
||||
</application>
|
||||
<application name="INFOTAINMENT_APP">
|
||||
<usage_percentage>30</usage_percentage>
|
||||
<prob_cloud_selection>10</prob_cloud_selection>
|
||||
<poisson_interarrival>7</poisson_interarrival>
|
||||
<delay_sensitivity>0.3</delay_sensitivity>
|
||||
<active_period>30</active_period>
|
||||
<idle_period>45</idle_period>
|
||||
<data_upload>25</data_upload>
|
||||
<data_download>1000</data_download>
|
||||
<task_length>15000</task_length>
|
||||
<required_core>1</required_core>
|
||||
<vm_utilization_on_edge>10</vm_utilization_on_edge>
|
||||
<vm_utilization_on_cloud>1</vm_utilization_on_cloud>
|
||||
<vm_utilization_on_mobile>0</vm_utilization_on_mobile>
|
||||
</application>
|
||||
</applications>
|
36
scripts/sample_app2/config/default_config.properties
Normal file
36
scripts/sample_app2/config/default_config.properties
Normal file
@ -0,0 +1,36 @@
|
||||
#default config file
|
||||
simulation_time=30
|
||||
warm_up_period=3
|
||||
vm_load_check_interval=0.1
|
||||
vm_location_check_interval=0.1
|
||||
file_log_enabled=true
|
||||
deep_file_log_enabled=false
|
||||
|
||||
min_number_of_mobile_devices=200
|
||||
max_number_of_mobile_devices=2000
|
||||
mobile_device_counter_size=200
|
||||
|
||||
wan_propogation_delay=0.1
|
||||
lan_internal_delay=0.005
|
||||
wlan_bandwidth=0
|
||||
wan_bandwidth=0
|
||||
gsm_bandwidth=0
|
||||
|
||||
#all the host on cloud runs on a single datacenter
|
||||
number_of_host_on_cloud_datacenter=1
|
||||
number_of_vm_on_cloud_host=4
|
||||
core_for_cloud_vm=4
|
||||
mips_for_cloud_vm=100000
|
||||
ram_for_cloud_vm=32000
|
||||
storage_for_cloud_vm=1000000
|
||||
|
||||
#use ',' for multiple values
|
||||
orchestrator_policies=NETWORK_BASED,UTILIZATION_BASED,HYBRID
|
||||
|
||||
#use ',' for multiple values
|
||||
simulation_scenarios=TWO_TIER_WITH_EO
|
||||
|
||||
#mean waiting time in seconds
|
||||
attractiveness_L1_mean_waiting_time=480
|
||||
attractiveness_L2_mean_waiting_time=300
|
||||
attractiveness_L3_mean_waiting_time=120
|
983
scripts/sample_app2/config/edge_devices.xml
Normal file
983
scripts/sample_app2/config/edge_devices.xml
Normal file
@ -0,0 +1,983 @@
|
||||
<?xml version="1.0"?>
|
||||
<edge_devices>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>1</x_pos>
|
||||
<y_pos>1</y_pos>
|
||||
<wlan_id>0</wlan_id>
|
||||
<attractiveness>0</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>2</x_pos>
|
||||
<y_pos>2</y_pos>
|
||||
<wlan_id>1</wlan_id>
|
||||
<attractiveness>0</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>3</x_pos>
|
||||
<y_pos>3</y_pos>
|
||||
<wlan_id>2</wlan_id>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>4</x_pos>
|
||||
<y_pos>4</y_pos>
|
||||
<wlan_id>3</wlan_id>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>5</x_pos>
|
||||
<y_pos>5</y_pos>
|
||||
<wlan_id>4</wlan_id>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>6</x_pos>
|
||||
<y_pos>6</y_pos>
|
||||
<wlan_id>5</wlan_id>
|
||||
<attractiveness>1</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>7</x_pos>
|
||||
<y_pos>7</y_pos>
|
||||
<wlan_id>6</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>8</x_pos>
|
||||
<y_pos>8</y_pos>
|
||||
<wlan_id>7</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>9</x_pos>
|
||||
<y_pos>9</y_pos>
|
||||
<wlan_id>8</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>10</x_pos>
|
||||
<y_pos>10</y_pos>
|
||||
<wlan_id>9</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>11</x_pos>
|
||||
<y_pos>11</y_pos>
|
||||
<wlan_id>10</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>12</x_pos>
|
||||
<y_pos>12</y_pos>
|
||||
<wlan_id>11</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>13</x_pos>
|
||||
<y_pos>13</y_pos>
|
||||
<wlan_id>12</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
<datacenter arch="x86" os="Linux" vmm="Xen">
|
||||
<costPerBw>0.1</costPerBw>
|
||||
<costPerSec>3.0</costPerSec>
|
||||
<costPerMem>0.05</costPerMem>
|
||||
<costPerStorage>0.1</costPerStorage>
|
||||
<location>
|
||||
<x_pos>14</x_pos>
|
||||
<y_pos>14</y_pos>
|
||||
<wlan_id>13</wlan_id>
|
||||
<attractiveness>2</attractiveness>
|
||||
</location>
|
||||
<hosts>
|
||||
<host>
|
||||
<core>16</core>
|
||||
<mips>80000</mips>
|
||||
<ram>16000</ram>
|
||||
<storage>400000</storage>
|
||||
<VMs>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
<VM vmm="Xen">
|
||||
<core>2</core>
|
||||
<mips>10000</mips>
|
||||
<ram>2000</ram>
|
||||
<storage>50000</storage>
|
||||
</VM>
|
||||
</VMs>
|
||||
</host>
|
||||
</hosts>
|
||||
</datacenter>
|
||||
</edge_devices>
|
53
scripts/sample_app2/matlab/getConfiguration.m
Normal file
53
scripts/sample_app2/matlab/getConfiguration.m
Normal file
@ -0,0 +1,53 @@
|
||||
%--------------------------------------------------------------
|
||||
%description
|
||||
% returns a value according to the given argumentssss
|
||||
%--------------------------------------------------------------
|
||||
function [ret_val] = getConfiguration(argType)
|
||||
if(argType == 1)
|
||||
ret_val = 'D:\sim_results';
|
||||
elseif(argType == 2)
|
||||
ret_val = 1; %Number of iterations
|
||||
elseif(argType == 3)
|
||||
ret_val = 200; %min number of mobile device
|
||||
elseif(argType == 4)
|
||||
ret_val = 200; %step size of mobile device count
|
||||
elseif(argType == 5)
|
||||
ret_val =2000; %max number of mobile device
|
||||
elseif(argType == 6)
|
||||
ret_val = 1; %xTickLabelCoefficient
|
||||
elseif(argType == 7)
|
||||
ret_val = {'UTILIZATION_BASED','NETWORK_BASED','HYBRID'};
|
||||
elseif(argType == 8)
|
||||
ret_val = {'utilization','bw','hybrid'};
|
||||
elseif(argType == 9)
|
||||
ret_val=[10 3 12 12]; %position of figure
|
||||
elseif(argType == 10)
|
||||
ret_val = 'Number of Mobile Devices'; %Common text for x axis
|
||||
elseif(argType == 11)
|
||||
ret_val = 1; %return 1 if you want to save figure as pdf
|
||||
elseif(argType == 12)
|
||||
ret_val = 0; %return 1 if you want to plot errors
|
||||
elseif(argType == 20)
|
||||
ret_val=1; %return 1 if graph is plotted colerful
|
||||
elseif(argType == 21)
|
||||
ret_val=[0.55 0 0]; %color of first line
|
||||
elseif(argType == 22)
|
||||
ret_val=[0 0.15 0.6]; %color of second line
|
||||
elseif(argType == 23)
|
||||
ret_val=[0 0.23 0]; %color of third line
|
||||
elseif(argType == 24)
|
||||
ret_val=[0.6 0 0.6]; %color of fourth line
|
||||
elseif(argType == 25)
|
||||
ret_val=[0.08 0.08 0.08]; %color of fifth line
|
||||
elseif(argType == 26)
|
||||
ret_val=[0 0.8 0.8]; %color of sixth line
|
||||
elseif(argType == 27)
|
||||
ret_val=[0.8 0.4 0]; %color of seventh line
|
||||
elseif(argType == 28)
|
||||
ret_val=[0.8 0.8 0]; %color of eighth line
|
||||
elseif(argType == 40)
|
||||
ret_val={'-k*','-ko','-ks','-kv','-kp','-kd','-kx','-kh'}; %line style (marker) of the colerless line
|
||||
elseif(argType == 50)
|
||||
ret_val={':k*',':ko',':ks',':kv',':kp',':kd',':kx',':kh'}; %line style (marker) of the colerfull line
|
||||
end
|
||||
end
|
21
scripts/sample_app2/matlab/plotAvgFailedTask.m
Normal file
21
scripts/sample_app2/matlab/plotAvgFailedTask.m
Normal file
@ -0,0 +1,21 @@
|
||||
function [] = plotAvgFailedTask()
|
||||
|
||||
plotGenericResult(1, 2, 'Failed Tasks (%)', 'ALL_APPS', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, {'Failed Tasks for';'Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, 'Failed Tasks for Health App (%)', 'HEALTH_APP', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, {'Failed Tasks for';'Infotainment App (%)'}, 'INFOTAINMENT_APP', 'percentage_for_all');
|
||||
plotGenericResult(1, 2, 'Failed Tasks for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 'percentage_for_all');
|
||||
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge (%)', 'ALL_APPS', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, {'Failed Tasks on Edge';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge for Health App (%)', 'HEALTH_APP', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge for Infotainment App (%)', 'INFOTAINMENT_APP', 'percentage_for_all');
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Edge for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 'percentage_for_all');
|
||||
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud (%)', 'ALL_APPS', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, {'Failed Tasks on Cloud for';'Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Health App (%)', 'HEALTH_APP', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Infotainment App (%)', 'INFOTAINMENT_APP', 'percentage_for_all');
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 'percentage_for_all');
|
||||
|
||||
end
|
27
scripts/sample_app2/matlab/plotAvgNetworkDelay.m
Normal file
27
scripts/sample_app2/matlab/plotAvgNetworkDelay.m
Normal file
@ -0,0 +1,27 @@
|
||||
function [] = plotAvgNetworkDelay()
|
||||
|
||||
plotGenericResult(1, 7, 'Average Network Delay (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(1, 7, 'Average Network Delay for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(5, 1, 'Average WLAN Delay (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(5, 1, {'Average WLAN Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(5, 1, 'Average WLAN Delay for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(5, 1, {'Average WLAN Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(5, 1, {'Average WLAN Delay';'for Heavy Comp. App %(sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(5, 2, 'Average MAN Delay (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(5, 2, {'Average MAN Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(5, 2, 'Average MAN Delay for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(5, 2, {'Average MAN Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(5, 2, {'Average MAN Delay';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(5, 3, 'Average WAN Delay (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(5, 3, {'Average WAN Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(5, 3, 'Average WAN Delay for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(5, 3, {'Average WAN Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(5, 3, {'Average WAN Delay';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
21
scripts/sample_app2/matlab/plotAvgProcessingTime.m
Normal file
21
scripts/sample_app2/matlab/plotAvgProcessingTime.m
Normal file
@ -0,0 +1,21 @@
|
||||
function [] = plotAvgProcessingTime()
|
||||
|
||||
plotGenericResult(1, 6, 'Processing Time (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Augmented Reality App (sec)', 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Infotainment App (sec)', 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(1, 6, 'Processing Time for Heavy Comp. App (sec)', 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(2, 6, 'Processing Time on Edge (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Health App (sec)'}, 'HEALTH_APP', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(2, 6, {'Processing Time on Edge';'for Heavy Computation App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(3, 6, 'Processing Time on Cloud (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Health App (sec)'}, 'HEALTH_APP', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Heavy Computation App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
21
scripts/sample_app2/matlab/plotAvgServiceTime.m
Normal file
21
scripts/sample_app2/matlab/plotAvgServiceTime.m
Normal file
@ -0,0 +1,21 @@
|
||||
function [] = plotAvgServiceTime()
|
||||
|
||||
plotGenericResult(1, 5, 'Service Time (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(1, 5, {'Service Time for';'Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(1, 5, 'Service Time for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(1, 5, 'Service Time for Infotainment App (sec)', 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(1, 5, {'Service Time for';'Compute Intensive App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(2, 5, 'Service Time on Edge (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(2, 5, {'Service Time on Edge';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(2, 5, 'Service Time on Edge for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(2, 5, {'Service Time on Edge';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(2, 5, {'Service Time on Edge';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
plotGenericResult(3, 5, 'Service Time on Cloud (sec)', 'ALL_APPS', '');
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(3, 5, 'Service Time on Cloud for Health App (sec)', 'HEALTH_APP', '');
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
9
scripts/sample_app2/matlab/plotAvgVmUtilization.m
Normal file
9
scripts/sample_app2/matlab/plotAvgVmUtilization.m
Normal file
@ -0,0 +1,9 @@
|
||||
function [] = plotAvgVmUtilization()
|
||||
|
||||
plotGenericResult(2, 8, 'Average VM Utilization (%)', 'ALL_APPS', '');
|
||||
plotGenericResult(2, 8, {'Average VM Utilization';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', '');
|
||||
plotGenericResult(2, 8, 'Average VM Utilization for Health App (%)', 'HEALTH_APP', '');
|
||||
plotGenericResult(2, 8, 'Average VM Utilization for Infotainment App (%)', 'INFOTAINMENT_APP', '');
|
||||
plotGenericResult(2, 8, 'Average VM Utilization for Heavy Comp. App (%)', 'HEAVY_COMP_APP', '');
|
||||
|
||||
end
|
149
scripts/sample_app2/matlab/plotGenericResult.m
Normal file
149
scripts/sample_app2/matlab/plotGenericResult.m
Normal file
@ -0,0 +1,149 @@
|
||||
function [] = plotGenericResult(rowOfset, columnOfset, yLabel, appType, calculatePercentage)
|
||||
folderPath = getConfiguration(1);
|
||||
numOfSimulations = getConfiguration(2);
|
||||
startOfMobileDeviceLoop = getConfiguration(3);
|
||||
stepOfMobileDeviceLoop = getConfiguration(4);
|
||||
endOfMobileDeviceLoop = getConfiguration(5);
|
||||
xTickLabelCoefficient = getConfiguration(6);
|
||||
|
||||
scenarioType = getConfiguration(7);
|
||||
legends = getConfiguration(8);
|
||||
numOfMobileDevices = (endOfMobileDeviceLoop - startOfMobileDeviceLoop)/stepOfMobileDeviceLoop + 1;
|
||||
|
||||
pos=getConfiguration(9);
|
||||
|
||||
all_results = zeros(numOfSimulations, size(scenarioType,2), numOfMobileDevices);
|
||||
min_results = zeros(size(scenarioType,2), numOfMobileDevices);
|
||||
max_results = zeros(size(scenarioType,2), numOfMobileDevices);
|
||||
|
||||
for s=1:numOfSimulations
|
||||
for i=1:size(scenarioType,2)
|
||||
for j=1:numOfMobileDevices
|
||||
try
|
||||
mobileDeviceNumber = startOfMobileDeviceLoop + stepOfMobileDeviceLoop * (j-1);
|
||||
filePath = strcat(folderPath,'\ite',int2str(s),'\SIMRESULT_TWO_TIER_WITH_EO_',char(scenarioType(i)),'_',int2str(mobileDeviceNumber),'DEVICES_',appType,'_GENERIC.log');
|
||||
|
||||
readData = dlmread(filePath,';',rowOfset,0);
|
||||
value = readData(1,columnOfset);
|
||||
if(strcmp(calculatePercentage,'percentage_for_all'))
|
||||
readData = dlmread(filePath,';',1,0);
|
||||
totalTask = readData(1,1)+readData(1,2);
|
||||
value = (100 * value) / totalTask;
|
||||
elseif(strcmp(calculatePercentage,'percentage_for_completed'))
|
||||
readData = dlmread(filePath,';',1,0);
|
||||
totalTask = readData(1,1);
|
||||
value = (100 * value) / totalTask;
|
||||
elseif(strcmp(calculatePercentage,'percentage_for_failed'))
|
||||
readData = dlmread(filePath,';',1,0);
|
||||
totalTask = readData(1,2);
|
||||
value = (100 * value) / totalTask;
|
||||
end
|
||||
|
||||
all_results(s,i,j) = value;
|
||||
catch err
|
||||
error(err)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if(numOfSimulations == 1)
|
||||
results = all_results;
|
||||
else
|
||||
results = mean(all_results); %still 3d matrix but 1xMxN format
|
||||
end
|
||||
|
||||
results = squeeze(results); %remove singleton dimensions
|
||||
|
||||
for i=1:size(scenarioType,2)
|
||||
for j=1:numOfMobileDevices
|
||||
x=all_results(:,i,j); % Create Data
|
||||
SEM = std(x)/sqrt(length(x)); % Standard Error
|
||||
ts = tinv([0.05 0.95],length(x)-1); % T-Score
|
||||
CI = mean(x) + ts*SEM; % Confidence Intervals
|
||||
|
||||
if(CI(1) < 0)
|
||||
CI(1) = 0;
|
||||
end
|
||||
|
||||
if(CI(2) < 0)
|
||||
CI(2) = 0;
|
||||
end
|
||||
|
||||
min_results(i,j) = results(i,j) - CI(1);
|
||||
max_results(i,j) = CI(2) - results(i,j);
|
||||
end
|
||||
end
|
||||
|
||||
types = zeros(1,numOfMobileDevices);
|
||||
for i=1:numOfMobileDevices
|
||||
types(i)=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
end
|
||||
|
||||
hFig = figure;
|
||||
set(hFig, 'Units','centimeters');
|
||||
set(hFig, 'Position',pos);
|
||||
set(0,'DefaultAxesFontName','Times New Roman');
|
||||
set(0,'DefaultTextFontName','Times New Roman');
|
||||
set(0,'DefaultAxesFontSize',10);
|
||||
set(0,'DefaultTextFontSize',12);
|
||||
if(getConfiguration(20) == 1)
|
||||
for i=1:1:numOfMobileDevices
|
||||
xIndex=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
|
||||
markers = getConfiguration(50);
|
||||
for j=1:size(scenarioType,2)
|
||||
plot(xIndex, results(j,i),char(markers(j)),'MarkerFaceColor',getConfiguration(20+j),'color',getConfiguration(20+j));
|
||||
hold on;
|
||||
end
|
||||
end
|
||||
|
||||
for j=1:size(scenarioType,2)
|
||||
if(getConfiguration(12) == 1)
|
||||
errorbar(types, results(j,:), min_results(j,:),max_results(j,:),':k','color',getConfiguration(20+j),'LineWidth',1.5);
|
||||
else
|
||||
plot(types, results(j,:),':k','color',getConfiguration(20+j),'LineWidth',1.5);
|
||||
end
|
||||
hold on;
|
||||
end
|
||||
|
||||
set(gca,'color','none');
|
||||
else
|
||||
markers = getConfiguration(40);
|
||||
for j=1:size(scenarioType,2)
|
||||
if(getConfiguration(12) == 1)
|
||||
errorbar(types, results(j,:),min_results(j,:),max_results(j,:),char(markers(j)),'MarkerFaceColor','w','LineWidth',1.2);
|
||||
else
|
||||
plot(types, results(j,:),char(markers(j)),'MarkerFaceColor','w','LineWidth',1.2);
|
||||
end
|
||||
hold on;
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
lgnd = legend(legends,'Location','NorthWest');
|
||||
if(getConfiguration(20) == 1)
|
||||
set(lgnd,'color','none');
|
||||
end
|
||||
|
||||
hold off;
|
||||
axis square
|
||||
xlabel(getConfiguration(10));
|
||||
set(gca,'XTick', (startOfMobileDeviceLoop*xTickLabelCoefficient):(stepOfMobileDeviceLoop*xTickLabelCoefficient):endOfMobileDeviceLoop);
|
||||
set(gca,'XTickLabel', (startOfMobileDeviceLoop*xTickLabelCoefficient):(stepOfMobileDeviceLoop*xTickLabelCoefficient):endOfMobileDeviceLoop);
|
||||
ylabel(yLabel);
|
||||
set(gca,'XLim',[startOfMobileDeviceLoop-5 endOfMobileDeviceLoop+5]);
|
||||
|
||||
set(get(gca,'Xlabel'),'FontSize',12)
|
||||
set(get(gca,'Ylabel'),'FontSize',12)
|
||||
set(lgnd,'FontSize',11)
|
||||
|
||||
if(getConfiguration(11) == 1)
|
||||
set(hFig, 'PaperUnits', 'centimeters');
|
||||
set(hFig, 'PaperPositionMode', 'manual');
|
||||
set(hFig, 'PaperPosition',[0 0 pos(3) pos(4)]);
|
||||
set(gcf, 'PaperSize', [pos(3) pos(4)]); %Keep the same paper size
|
||||
filename = strcat(folderPath,'\',int2str(rowOfset),'_',int2str(columnOfset),'_',appType);
|
||||
saveas(gcf, filename, 'pdf');
|
||||
end
|
||||
end
|
33
scripts/sample_app2/matlab/plotTaskFailureReason.m
Normal file
33
scripts/sample_app2/matlab/plotTaskFailureReason.m
Normal file
@ -0,0 +1,33 @@
|
||||
function [] = plotTaskFailureReason()
|
||||
|
||||
plotGenericResult(1, 10, 'Failed Task due to VM Capacity (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Heavy Computation App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
plotGenericResult(1, 11, 'Failed Task due to Mobility (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(1, 11, {'Failed Task due to Mobility';'for Heavy Computation App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
plotGenericResult(5, 4, 'Failed Tasks due to WLAN failure (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(5, 4, {'Failed Tasks due to WLAN failure';'for Heavy Comp. App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
plotGenericResult(5, 5, 'Failed Tasks due to MAN failure (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(5, 5, {'Failed Tasks due to MAN failure';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(5, 5, {'Failed Tasks due to MAN failure';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(5, 5, {'Failed Tasks due to MAN failure';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(5, 5, {'Failed Tasks due to MAN failure';'for Heavy Comp. App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
plotGenericResult(5, 6, 'Failed Tasks due to WAN failure (%)', 'ALL_APPS', 'percentage_for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 'for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Health App (%)'}, 'HEALTH_APP', 'for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 'for_failed');
|
||||
plotGenericResult(5, 6, {'Failed Tasks due to WAN failure';'for Heavy Comp. App (%)'}, 'HEAVY_COMP_APP', 'for_failed');
|
||||
|
||||
end
|
@ -0,0 +1,633 @@
|
||||
Simulation started at 30/08/2018 15:29:30
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:29:30
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 50668(2255/48413)
|
||||
# of failed tasks (Edge/Cloud): 283(4/279)
|
||||
# of completed tasks (Edge/Cloud): 50385(2251/48134)
|
||||
# of uncompleted tasks (Edge/Cloud): 47(31/16)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 283/0(0/0/0)
|
||||
percentage of failed tasks: 0.558538%
|
||||
average service time: 1.419752 seconds. (on Edge: 0.965294, on Cloud: 1.441005)
|
||||
average processing time: 0.136200 seconds. (on Edge: 0.906446, on Cloud: 0.100179)
|
||||
average network delay: 1.283552 seconds. (LAN delay: 0.052858, MAN delay: 0.012347, WAN delay: 1.340825)
|
||||
average server utilization Edge/Cloud: 0.083970/0.656522
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:30:11. It took 41 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:30:11
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 46435(46435/0)
|
||||
# of failed tasks (Edge/Cloud): 225(225/0)
|
||||
# of completed tasks (Edge/Cloud): 46210(46210/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 26(26/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 225/0(0/0/0)
|
||||
percentage of failed tasks: 0.484548%
|
||||
average service time: 1.031613 seconds. (on Edge: 1.031613, on Cloud: NaN)
|
||||
average processing time: 0.969767 seconds. (on Edge: 0.969767, on Cloud: NaN)
|
||||
average network delay: 0.061846 seconds. (LAN delay: 0.051165, MAN delay: 0.012421, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 2.155578/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:30:49. It took 37 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:30:49
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 52003(52003/0)
|
||||
# of failed tasks (Edge/Cloud): 286(286/0)
|
||||
# of completed tasks (Edge/Cloud): 51717(51717/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 36(36/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 286/0(0/0/0)
|
||||
percentage of failed tasks: 0.549968%
|
||||
average service time: 1.127338 seconds. (on Edge: 1.127338, on Cloud: NaN)
|
||||
average processing time: 1.064582 seconds. (on Edge: 1.064582, on Cloud: NaN)
|
||||
average network delay: 0.062755 seconds. (LAN delay: 0.051817, MAN delay: 0.012431, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 2.553153/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:31:38. It took 49 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:31:38
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 87471(15334/72137)
|
||||
# of failed tasks (Edge/Cloud): 595(45/550)
|
||||
# of completed tasks (Edge/Cloud): 86876(15289/71587)
|
||||
# of uncompleted tasks (Edge/Cloud): 75(54/21)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 595/0(0/0/0)
|
||||
percentage of failed tasks: 0.680225%
|
||||
average service time: 1.460612 seconds. (on Edge: 1.020456, on Cloud: 1.554617)
|
||||
average processing time: 0.250274 seconds. (on Edge: 0.951547, on Cloud: 0.100501)
|
||||
average network delay: 1.210338 seconds. (LAN delay: 0.060075, MAN delay: 0.012370, WAN delay: 1.454116)
|
||||
average server utilization Edge/Cloud: 0.723364/1.060870
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:33:47. It took 2 Minutes 8 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:33:47
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 96053(96053/0)
|
||||
# of failed tasks (Edge/Cloud): 553(553/0)
|
||||
# of completed tasks (Edge/Cloud): 95500(95500/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 69(69/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 553/0(0/0/0)
|
||||
percentage of failed tasks: 0.575724%
|
||||
average service time: 1.181897 seconds. (on Edge: 1.181897, on Cloud: NaN)
|
||||
average processing time: 1.112073 seconds. (on Edge: 1.112073, on Cloud: NaN)
|
||||
average network delay: 0.069824 seconds. (LAN delay: 0.058646, MAN delay: 0.012518, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 4.970796/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:36:42. It took 2 Minutes 54 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:36:42
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 96835(96835/0)
|
||||
# of failed tasks (Edge/Cloud): 512(512/0)
|
||||
# of completed tasks (Edge/Cloud): 96323(96323/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 61(61/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 512/0(0/0/0)
|
||||
percentage of failed tasks: 0.528734%
|
||||
average service time: 1.201837 seconds. (on Edge: 1.201837, on Cloud: NaN)
|
||||
average processing time: 1.130058 seconds. (on Edge: 1.130058, on Cloud: NaN)
|
||||
average network delay: 0.071779 seconds. (LAN delay: 0.060611, MAN delay: 0.012519, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 5.166149/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:39:37. It took 2 Minutes 55 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:39:37
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 145592(45712/99880)
|
||||
# of failed tasks (Edge/Cloud): 1073(156/917)
|
||||
# of completed tasks (Edge/Cloud): 144519(45556/98963)
|
||||
# of uncompleted tasks (Edge/Cloud): 150(128/22)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1073/0(0/0/0)
|
||||
percentage of failed tasks: 0.736991%
|
||||
average service time: 1.513352 seconds. (on Edge: 1.125531, on Cloud: 1.691880)
|
||||
average processing time: 0.401126 seconds. (on Edge: 1.048029, on Cloud: 0.103334)
|
||||
average network delay: 1.112227 seconds. (LAN delay: 0.067588, MAN delay: 0.012428, WAN delay: 1.588546)
|
||||
average server utilization Edge/Cloud: 2.212195/1.424415
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:45:01. It took 5 Minutes 24 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:45:01
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 137566(137566/0)
|
||||
# of failed tasks (Edge/Cloud): 757(757/0)
|
||||
# of completed tasks (Edge/Cloud): 136809(136809/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 102(102/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 757/0(0/0/0)
|
||||
percentage of failed tasks: 0.550281%
|
||||
average service time: 1.276863 seconds. (on Edge: 1.276863, on Cloud: NaN)
|
||||
average processing time: 1.197057 seconds. (on Edge: 1.197057, on Cloud: NaN)
|
||||
average network delay: 0.079806 seconds. (LAN delay: 0.068406, MAN delay: 0.012608, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 8.145007/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:49:45. It took 4 Minutes 44 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:49:45
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 139422(139422/0)
|
||||
# of failed tasks (Edge/Cloud): 760(760/0)
|
||||
# of completed tasks (Edge/Cloud): 138662(138662/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 105(105/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 760/0(0/0/0)
|
||||
percentage of failed tasks: 0.545108%
|
||||
average service time: 1.283804 seconds. (on Edge: 1.283804, on Cloud: NaN)
|
||||
average processing time: 1.200145 seconds. (on Edge: 1.200145, on Cloud: NaN)
|
||||
average network delay: 0.083659 seconds. (LAN delay: 0.072271, MAN delay: 0.012611, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 8.217989/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:54:36. It took 4 Minutes 51 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:54:36
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 187073(78264/108809)
|
||||
# of failed tasks (Edge/Cloud): 1338(315/1023)
|
||||
# of completed tasks (Edge/Cloud): 185735(77949/107786)
|
||||
# of uncompleted tasks (Edge/Cloud): 179(149/30)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1338/0(0/0/0)
|
||||
percentage of failed tasks: 0.715229%
|
||||
average service time: 1.512123 seconds. (on Edge: 1.199524, on Cloud: 1.738189)
|
||||
average processing time: 0.527353 seconds. (on Edge: 1.111204, on Cloud: 0.105122)
|
||||
average network delay: 0.984770 seconds. (LAN delay: 0.077756, MAN delay: 0.012496, WAN delay: 1.633067)
|
||||
average server utilization Edge/Cloud: 4.144888/1.537124
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:00:24. It took 5 Minutes 47 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:00:24
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 194291(194291/0)
|
||||
# of failed tasks (Edge/Cloud): 1259(1259/0)
|
||||
# of completed tasks (Edge/Cloud): 193032(193032/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 135(135/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1259/0(0/0/0)
|
||||
percentage of failed tasks: 0.647997%
|
||||
average service time: 1.456162 seconds. (on Edge: 1.456162, on Cloud: NaN)
|
||||
average processing time: 1.358439 seconds. (on Edge: 1.358439, on Cloud: NaN)
|
||||
average network delay: 0.097722 seconds. (LAN delay: 0.086057, MAN delay: 0.012742, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 12.653966/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:05:26. It took 5 Minutes 2 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:05:26
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 180736(180736/0)
|
||||
# of failed tasks (Edge/Cloud): 1123(1123/0)
|
||||
# of completed tasks (Edge/Cloud): 179613(179613/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 131(131/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1123/0(0/0/0)
|
||||
percentage of failed tasks: 0.621348%
|
||||
average service time: 1.372713 seconds. (on Edge: 1.372713, on Cloud: NaN)
|
||||
average processing time: 1.281489 seconds. (on Edge: 1.281489, on Cloud: NaN)
|
||||
average network delay: 0.091223 seconds. (LAN delay: 0.079605, MAN delay: 0.012711, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 11.376075/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:09:47. It took 4 Minutes 20 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:09:47
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 232163(112631/119532)
|
||||
# of failed tasks (Edge/Cloud): 1639(451/1188)
|
||||
# of completed tasks (Edge/Cloud): 230524(112180/118344)
|
||||
# of uncompleted tasks (Edge/Cloud): 208(170/38)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1639/0(0/0/0)
|
||||
percentage of failed tasks: 0.705970%
|
||||
average service time: 1.498911 seconds. (on Edge: 1.248581, on Cloud: 1.736202)
|
||||
average processing time: 0.612178 seconds. (on Edge: 1.148560, on Cloud: 0.103734)
|
||||
average network delay: 0.886733 seconds. (LAN delay: 0.089059, MAN delay: 0.012579, WAN delay: 1.632468)
|
||||
average server utilization Edge/Cloud: 5.924451/1.679097
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:17:55. It took 8 Minutes 7 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:17:55
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 232192(232192/0)
|
||||
# of failed tasks (Edge/Cloud): 1585(1585/0)
|
||||
# of completed tasks (Edge/Cloud): 230607(230607/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 195(195/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1585/0(0/0/0)
|
||||
percentage of failed tasks: 0.682625%
|
||||
average service time: 1.513141 seconds. (on Edge: 1.513141, on Cloud: NaN)
|
||||
average processing time: 1.405719 seconds. (on Edge: 1.405719, on Cloud: NaN)
|
||||
average network delay: 0.107423 seconds. (LAN delay: 0.095590, MAN delay: 0.012847, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 15.228858/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:25:18. It took 7 Minutes 23 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:25:18
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 238287(238287/0)
|
||||
# of failed tasks (Edge/Cloud): 1767(1767/0)
|
||||
# of completed tasks (Edge/Cloud): 236520(236520/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 201(201/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1767/0(0/0/0)
|
||||
percentage of failed tasks: 0.741543%
|
||||
average service time: 1.592304 seconds. (on Edge: 1.592304, on Cloud: NaN)
|
||||
average processing time: 1.486028 seconds. (on Edge: 1.486028, on Cloud: NaN)
|
||||
average network delay: 0.106276 seconds. (LAN delay: 0.094417, MAN delay: 0.012858, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 16.702580/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:33:22. It took 8 Minutes 3 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:33:22
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 270710(147183/123527)
|
||||
# of failed tasks (Edge/Cloud): 1920(705/1215)
|
||||
# of completed tasks (Edge/Cloud): 268790(146478/122312)
|
||||
# of uncompleted tasks (Edge/Cloud): 275(243/32)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1920/0(0/0/0)
|
||||
percentage of failed tasks: 0.709246%
|
||||
average service time: 1.563511 seconds. (on Edge: 1.393491, on Cloud: 1.767122)
|
||||
average processing time: 0.749587 seconds. (on Edge: 1.283889, on Cloud: 0.109718)
|
||||
average network delay: 0.813924 seconds. (LAN delay: 0.098282, MAN delay: 0.012664, WAN delay: 1.657404)
|
||||
average server utilization Edge/Cloud: 9.225036/1.967893
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:43:32. It took 10 Minutes 10 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:43:32
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 272405(272405/0)
|
||||
# of failed tasks (Edge/Cloud): 2195(2195/0)
|
||||
# of completed tasks (Edge/Cloud): 270210(270210/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 209(209/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2195/0(0/0/0)
|
||||
percentage of failed tasks: 0.805786%
|
||||
average service time: 1.797444 seconds. (on Edge: 1.797444, on Cloud: NaN)
|
||||
average processing time: 1.677236 seconds. (on Edge: 1.677236, on Cloud: NaN)
|
||||
average network delay: 0.120208 seconds. (LAN delay: 0.108228, MAN delay: 0.012968, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 21.228798/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:54:12. It took 10 Minutes 39 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:54:12
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 273473(273473/0)
|
||||
# of failed tasks (Edge/Cloud): 2296(2296/0)
|
||||
# of completed tasks (Edge/Cloud): 271177(271177/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 219(219/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2296/0(0/0/0)
|
||||
percentage of failed tasks: 0.839571%
|
||||
average service time: 1.880113 seconds. (on Edge: 1.880113, on Cloud: NaN)
|
||||
average processing time: 1.761356 seconds. (on Edge: 1.761356, on Cloud: NaN)
|
||||
average network delay: 0.118756 seconds. (LAN delay: 0.106766, MAN delay: 0.012964, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 22.834030/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:05:11. It took 10 Minutes 58 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:05:11
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 314201(185128/129073)
|
||||
# of failed tasks (Edge/Cloud): 2392(1073/1319)
|
||||
# of completed tasks (Edge/Cloud): 311809(184055/127754)
|
||||
# of uncompleted tasks (Edge/Cloud): 344(293/51)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2392/0(0/0/0)
|
||||
percentage of failed tasks: 0.761296%
|
||||
average service time: 1.599207 seconds. (on Edge: 1.466031, on Cloud: 1.791074)
|
||||
average processing time: 0.838821 seconds. (on Edge: 1.344627, on Cloud: 0.110105)
|
||||
average network delay: 0.760386 seconds. (LAN delay: 0.109824, MAN delay: 0.012760, WAN delay: 1.680968)
|
||||
average server utilization Edge/Cloud: 11.915850/2.052341
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:19:02. It took 13 Minutes 51 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:19:02
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 337757(331600/6157)
|
||||
# of failed tasks (Edge/Cloud): 4984(4171/813)
|
||||
# of completed tasks (Edge/Cloud): 332773(327429/5344)
|
||||
# of uncompleted tasks (Edge/Cloud): 511(511/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 4217/767(0/0/767)
|
||||
percentage of failed tasks: 1.475617%
|
||||
average service time: 2.797770 seconds. (on Edge: 2.800765, on Cloud: 2.614221)
|
||||
average processing time: 2.615700 seconds. (on Edge: 2.656488, on Cloud: 0.116634)
|
||||
average network delay: 0.182069 seconds. (LAN delay: 0.132092, MAN delay: 0.013144, WAN delay: 2.497586)
|
||||
average server utilization Edge/Cloud: 39.703655/0.081605
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:35:33. It took 16 Minutes 31 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:35:33
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 321226(317933/3293)
|
||||
# of failed tasks (Edge/Cloud): 3556(3532/24)
|
||||
# of completed tasks (Edge/Cloud): 317670(314401/3269)
|
||||
# of uncompleted tasks (Edge/Cloud): 374(374/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 3556/0(0/0/0)
|
||||
percentage of failed tasks: 1.107009%
|
||||
average service time: 2.483255 seconds. (on Edge: 2.494113, on Cloud: 1.438886)
|
||||
average processing time: 2.333389 seconds. (on Edge: 2.356538, on Cloud: 0.106921)
|
||||
average network delay: 0.149866 seconds. (LAN delay: 0.125431, MAN delay: 0.013102, WAN delay: 1.331964)
|
||||
average server utilization Edge/Cloud: 34.688665/0.068060
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:50:45. It took 15 Minutes 12 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:50:45
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 354652(222258/132394)
|
||||
# of failed tasks (Edge/Cloud): 2878(1499/1379)
|
||||
# of completed tasks (Edge/Cloud): 351774(220759/131015)
|
||||
# of uncompleted tasks (Edge/Cloud): 363(314/49)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2751/127(127/0/0)
|
||||
percentage of failed tasks: 0.811500%
|
||||
average service time: 1.711415 seconds. (on Edge: 1.669410, on Cloud: 1.782193)
|
||||
average processing time: 0.995133 seconds. (on Edge: 1.522218, on Cloud: 0.107001)
|
||||
average network delay: 0.716282 seconds. (LAN delay: 0.135431, MAN delay: 0.012868, WAN delay: 1.675192)
|
||||
average server utilization Edge/Cloud: 16.164178/1.941639
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 18:10:16. It took 19 Minutes 30 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 18:10:16
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 358119(341491/16628)
|
||||
# of failed tasks (Edge/Cloud): 8812(5099/3713)
|
||||
# of completed tasks (Edge/Cloud): 349307(336392/12915)
|
||||
# of uncompleted tasks (Edge/Cloud): 583(583/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 5237/3575(0/0/3575)
|
||||
percentage of failed tasks: 2.460635%
|
||||
average service time: 3.161474 seconds. (on Edge: 3.171439, on Cloud: 2.901900)
|
||||
average processing time: 2.919204 seconds. (on Edge: 3.026607, on Cloud: 0.121704)
|
||||
average network delay: 0.242270 seconds. (LAN delay: 0.132599, MAN delay: 0.013177, WAN delay: 2.780196)
|
||||
average server utilization Edge/Cloud: 47.883063/0.271405
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 18:29:34. It took 19 Minutes 17 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 18:29:34
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 375908(352880/23028)
|
||||
# of failed tasks (Edge/Cloud): 5532(5322/210)
|
||||
# of completed tasks (Edge/Cloud): 370376(347558/22818)
|
||||
# of uncompleted tasks (Edge/Cloud): 749(749/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 108(108/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 5424/0(0/0/0)
|
||||
percentage of failed tasks: 1.471637%
|
||||
average service time: 3.384142 seconds. (on Edge: 3.496209, on Cloud: 1.677167)
|
||||
average processing time: 3.143068 seconds. (on Edge: 3.341966, on Cloud: 0.113504)
|
||||
average network delay: 0.241075 seconds. (LAN delay: 0.141995, MAN delay: 0.013201, WAN delay: 1.563664)
|
||||
average server utilization Edge/Cloud: 53.217033/0.440970
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 18:51:05. It took 21 Minutes 31 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 18:51:05
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 403912(269624/134288)
|
||||
# of failed tasks (Edge/Cloud): 4187(2813/1374)
|
||||
# of completed tasks (Edge/Cloud): 399725(266811/132914)
|
||||
# of uncompleted tasks (Edge/Cloud): 464(418/46)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 112(112/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 3780/295(295/0/0)
|
||||
percentage of failed tasks: 1.036612%
|
||||
average service time: 2.080150 seconds. (on Edge: 2.217547, on Cloud: 1.804338)
|
||||
average processing time: 1.397972 seconds. (on Edge: 2.039905, on Cloud: 0.109359)
|
||||
average network delay: 0.682178 seconds. (LAN delay: 0.165670, MAN delay: 0.013001, WAN delay: 1.694979)
|
||||
average server utilization Edge/Cloud: 26.201804/2.069565
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 19:15:30. It took 24 Minutes 25 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 19:15:30
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 410351(360195/50156)
|
||||
# of failed tasks (Edge/Cloud): 27236(6217/21019)
|
||||
# of completed tasks (Edge/Cloud): 383115(353978/29137)
|
||||
# of uncompleted tasks (Edge/Cloud): 1577(1577/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 6606/20630(65/0/20565)
|
||||
percentage of failed tasks: 6.637245%
|
||||
average service time: 3.835048 seconds. (on Edge: 3.836660, on Cloud: 3.815467)
|
||||
average processing time: 3.392348 seconds. (on Edge: 3.662883, on Cloud: 0.105685)
|
||||
average network delay: 0.442700 seconds. (LAN delay: 0.161498, MAN delay: 0.013222, WAN delay: 3.709782)
|
||||
average server utilization Edge/Cloud: 60.454013/0.541137
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 19:38:47. It took 23 Minutes 16 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 19:38:47
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 406719(370099/36620)
|
||||
# of failed tasks (Edge/Cloud): 12109(11768/341)
|
||||
# of completed tasks (Edge/Cloud): 394610(358331/36279)
|
||||
# of uncompleted tasks (Edge/Cloud): 1419(1419/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 416(416/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 6430/5263(5263/0/0)
|
||||
percentage of failed tasks: 2.977240%
|
||||
average service time: 3.682708 seconds. (on Edge: 3.887171, on Cloud: 1.663204)
|
||||
average processing time: 3.304319 seconds. (on Edge: 3.627733, on Cloud: 0.109928)
|
||||
average network delay: 0.378389 seconds. (LAN delay: 0.247145, MAN delay: 0.013255, WAN delay: 1.553275)
|
||||
average server utilization Edge/Cloud: 59.883182/0.615552
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 20:03:40. It took 24 Minutes 53 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 20:03:40
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 2000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 472132(335995/136137)
|
||||
# of failed tasks (Edge/Cloud): 13842(12395/1447)
|
||||
# of completed tasks (Edge/Cloud): 458290(323600/134690)
|
||||
# of uncompleted tasks (Edge/Cloud): 778(732/46)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 3925(3925/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 6065/3852(3852/0/0)
|
||||
percentage of failed tasks: 2.931807%
|
||||
average service time: 3.106907 seconds. (on Edge: 3.645084, on Cloud: 1.813905)
|
||||
average processing time: 2.394212 seconds. (on Edge: 3.345234, on Cloud: 0.109330)
|
||||
average network delay: 0.712694 seconds. (LAN delay: 0.287646, MAN delay: 0.013185, WAN delay: 1.704575)
|
||||
average server utilization Edge/Cloud: 48.776278/1.999331
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 20:36:45. It took 33 Minutes 4 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 20:36:45
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 2000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 469273(368119/101154)
|
||||
# of failed tasks (Edge/Cloud): 62954(7149/55805)
|
||||
# of completed tasks (Edge/Cloud): 406319(360970/45349)
|
||||
# of uncompleted tasks (Edge/Cloud): 1761(1727/34)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 8064/54890(0/0/54890)
|
||||
percentage of failed tasks: 13.415219%
|
||||
average service time: 4.401645 seconds. (on Edge: 4.394803, on Cloud: 4.456103)
|
||||
average processing time: 3.774144 seconds. (on Edge: 4.235375, on Cloud: 0.102831)
|
||||
average network delay: 0.627501 seconds. (LAN delay: 0.147140, MAN delay: 0.013231, WAN delay: 4.353273)
|
||||
average server utilization Edge/Cloud: 69.488772/0.854515
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 21:03:17. It took 26 Minutes 31 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 21:03:17
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 1
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 2000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 466709(390271/76438)
|
||||
# of failed tasks (Edge/Cloud): 18041(17271/770)
|
||||
# of completed tasks (Edge/Cloud): 448668(373000/75668)
|
||||
# of uncompleted tasks (Edge/Cloud): 1702(1667/35)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 7541(7541/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 8779/1721(1721/0/0)
|
||||
percentage of failed tasks: 3.865578%
|
||||
average service time: 4.367623 seconds. (on Edge: 4.894161, on Cloud: 1.772096)
|
||||
average processing time: 3.892593 seconds. (on Edge: 4.659362, on Cloud: 0.112859)
|
||||
average network delay: 0.475030 seconds. (LAN delay: 0.222459, MAN delay: 0.013298, WAN delay: 1.659237)
|
||||
average server utilization Edge/Cloud: 76.583791/1.254348
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 21:32:19. It took 29 Minutes 2 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Simulation finished at 30/08/2018 21:32:19. It took 6 Hours 2 Minutes 49 Seconds
|
Binary file not shown.
@ -0,0 +1,633 @@
|
||||
Simulation started at 30/08/2018 15:29:29
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:29:30
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 45511(1198/44313)
|
||||
# of failed tasks (Edge/Cloud): 259(4/255)
|
||||
# of completed tasks (Edge/Cloud): 45252(1194/44058)
|
||||
# of uncompleted tasks (Edge/Cloud): 58(43/15)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 259/0(0/0/0)
|
||||
percentage of failed tasks: 0.569093%
|
||||
average service time: 1.337625 seconds. (on Edge: 0.952594, on Cloud: 1.348059)
|
||||
average processing time: 0.120725 seconds. (on Edge: 0.894831, on Cloud: 0.099747)
|
||||
average network delay: 1.216899 seconds. (LAN delay: 0.050298, MAN delay: 0.012346, WAN delay: 1.248313)
|
||||
average server utilization Edge/Cloud: 0.042582/0.595819
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:30:02. It took 32 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:30:02
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 47112(47112/0)
|
||||
# of failed tasks (Edge/Cloud): 226(226/0)
|
||||
# of completed tasks (Edge/Cloud): 46886(46886/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 27(27/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 226/0(0/0/0)
|
||||
percentage of failed tasks: 0.479708%
|
||||
average service time: 1.072342 seconds. (on Edge: 1.072342, on Cloud: NaN)
|
||||
average processing time: 1.009541 seconds. (on Edge: 1.009541, on Cloud: NaN)
|
||||
average network delay: 0.062802 seconds. (LAN delay: 0.051962, MAN delay: 0.012424, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 2.312052/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:30:39. It took 36 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:30:39
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 43388(43388/0)
|
||||
# of failed tasks (Edge/Cloud): 239(239/0)
|
||||
# of completed tasks (Edge/Cloud): 43149(43149/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 15(15/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 239/0(0/0/0)
|
||||
percentage of failed tasks: 0.550844%
|
||||
average service time: 1.086365 seconds. (on Edge: 1.086365, on Cloud: NaN)
|
||||
average processing time: 1.025517 seconds. (on Edge: 1.025517, on Cloud: NaN)
|
||||
average network delay: 0.060848 seconds. (LAN delay: 0.049999, MAN delay: 0.012417, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 2.278249/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:31:15. It took 35 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:31:15
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 92964(16984/75980)
|
||||
# of failed tasks (Edge/Cloud): 625(49/576)
|
||||
# of completed tasks (Edge/Cloud): 92339(16935/75404)
|
||||
# of uncompleted tasks (Edge/Cloud): 91(64/27)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 625/0(0/0/0)
|
||||
percentage of failed tasks: 0.672303%
|
||||
average service time: 1.469923 seconds. (on Edge: 1.013752, on Cloud: 1.572374)
|
||||
average processing time: 0.255786 seconds. (on Edge: 0.944721, on Cloud: 0.101058)
|
||||
average network delay: 1.214137 seconds. (LAN delay: 0.059975, MAN delay: 0.012376, WAN delay: 1.471316)
|
||||
average server utilization Edge/Cloud: 0.720736/1.006689
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:33:42. It took 2 Minutes 27 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:33:42
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 89047(89047/0)
|
||||
# of failed tasks (Edge/Cloud): 483(483/0)
|
||||
# of completed tasks (Edge/Cloud): 88564(88564/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 61(61/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 483/0(0/0/0)
|
||||
percentage of failed tasks: 0.542410%
|
||||
average service time: 1.164589 seconds. (on Edge: 1.164589, on Cloud: NaN)
|
||||
average processing time: 1.094660 seconds. (on Edge: 1.094660, on Cloud: NaN)
|
||||
average network delay: 0.069928 seconds. (LAN delay: 0.058826, MAN delay: 0.012505, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 5.058230/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:36:10. It took 2 Minutes 28 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:36:10
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 94625(94625/0)
|
||||
# of failed tasks (Edge/Cloud): 544(544/0)
|
||||
# of completed tasks (Edge/Cloud): 94081(94081/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 67(67/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 544/0(0/0/0)
|
||||
percentage of failed tasks: 0.574901%
|
||||
average service time: 1.150333 seconds. (on Edge: 1.150333, on Cloud: NaN)
|
||||
average processing time: 1.079921 seconds. (on Edge: 1.079921, on Cloud: NaN)
|
||||
average network delay: 0.070412 seconds. (LAN delay: 0.059262, MAN delay: 0.012516, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 4.791925/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:38:59. It took 2 Minutes 48 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:38:59
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 143289(45289/98000)
|
||||
# of failed tasks (Edge/Cloud): 1073(150/923)
|
||||
# of completed tasks (Edge/Cloud): 142216(45139/97077)
|
||||
# of uncompleted tasks (Edge/Cloud): 149(116/33)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1073/0(0/0/0)
|
||||
percentage of failed tasks: 0.748836%
|
||||
average service time: 1.505602 seconds. (on Edge: 1.134109, on Cloud: 1.678339)
|
||||
average processing time: 0.405596 seconds. (on Edge: 1.056032, on Cloud: 0.103156)
|
||||
average network delay: 1.100006 seconds. (LAN delay: 0.067838, MAN delay: 0.012429, WAN delay: 1.575183)
|
||||
average server utilization Edge/Cloud: 2.271441/1.347157
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:44:21. It took 5 Minutes 21 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:44:21
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 141416(141416/0)
|
||||
# of failed tasks (Edge/Cloud): 762(762/0)
|
||||
# of completed tasks (Edge/Cloud): 140654(140654/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 104(104/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 762/0(0/0/0)
|
||||
percentage of failed tasks: 0.538836%
|
||||
average service time: 1.269646 seconds. (on Edge: 1.269646, on Cloud: NaN)
|
||||
average processing time: 1.185923 seconds. (on Edge: 1.185923, on Cloud: NaN)
|
||||
average network delay: 0.083722 seconds. (LAN delay: 0.072302, MAN delay: 0.012617, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 7.926063/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:49:24. It took 5 Minutes 3 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:49:24
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 141808(141808/0)
|
||||
# of failed tasks (Edge/Cloud): 817(817/0)
|
||||
# of completed tasks (Edge/Cloud): 140991(140991/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 103(103/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 817/0(0/0/0)
|
||||
percentage of failed tasks: 0.576131%
|
||||
average service time: 1.279690 seconds. (on Edge: 1.279690, on Cloud: NaN)
|
||||
average processing time: 1.197356 seconds. (on Edge: 1.197356, on Cloud: NaN)
|
||||
average network delay: 0.082334 seconds. (LAN delay: 0.070932, MAN delay: 0.012616, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 7.968944/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:54:31. It took 5 Minutes 6 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:54:31
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 188225(78284/109941)
|
||||
# of failed tasks (Edge/Cloud): 1318(286/1032)
|
||||
# of completed tasks (Edge/Cloud): 186907(77998/108909)
|
||||
# of uncompleted tasks (Edge/Cloud): 169(138/31)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1318/0(0/0/0)
|
||||
percentage of failed tasks: 0.700226%
|
||||
average service time: 1.495678 seconds. (on Edge: 1.187101, on Cloud: 1.716674)
|
||||
average processing time: 0.518201 seconds. (on Edge: 1.097685, on Cloud: 0.103189)
|
||||
average network delay: 0.977477 seconds. (LAN delay: 0.078833, MAN delay: 0.012501, WAN delay: 1.613485)
|
||||
average server utilization Edge/Cloud: 4.092690/1.605853
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 15:59:39. It took 5 Minutes 8 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 15:59:39
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 178909(178909/0)
|
||||
# of failed tasks (Edge/Cloud): 1080(1080/0)
|
||||
# of completed tasks (Edge/Cloud): 177829(177829/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 128(128/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1080/0(0/0/0)
|
||||
percentage of failed tasks: 0.603659%
|
||||
average service time: 1.363532 seconds. (on Edge: 1.363532, on Cloud: NaN)
|
||||
average processing time: 1.270870 seconds. (on Edge: 1.270870, on Cloud: NaN)
|
||||
average network delay: 0.092663 seconds. (LAN delay: 0.081074, MAN delay: 0.012709, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 11.162028/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:03:55. It took 4 Minutes 16 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:03:55
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 180756(180756/0)
|
||||
# of failed tasks (Edge/Cloud): 1184(1184/0)
|
||||
# of completed tasks (Edge/Cloud): 179572(179572/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 152(152/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1184/0(0/0/0)
|
||||
percentage of failed tasks: 0.655027%
|
||||
average service time: 1.362261 seconds. (on Edge: 1.362261, on Cloud: NaN)
|
||||
average processing time: 1.271373 seconds. (on Edge: 1.271373, on Cloud: NaN)
|
||||
average network delay: 0.090887 seconds. (LAN delay: 0.079246, MAN delay: 0.012712, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 11.413760/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:08:11. It took 4 Minutes 15 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:08:11
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 220968(103329/117639)
|
||||
# of failed tasks (Edge/Cloud): 1604(455/1149)
|
||||
# of completed tasks (Edge/Cloud): 219364(102874/116490)
|
||||
# of uncompleted tasks (Edge/Cloud): 212(180/32)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1604/0(0/0/0)
|
||||
percentage of failed tasks: 0.725897%
|
||||
average service time: 1.523172 seconds. (on Edge: 1.272743, on Cloud: 1.744329)
|
||||
average processing time: 0.608840 seconds. (on Edge: 1.176503, on Cloud: 0.107528)
|
||||
average network delay: 0.914332 seconds. (LAN delay: 0.085285, MAN delay: 0.012553, WAN delay: 1.636800)
|
||||
average server utilization Edge/Cloud: 6.042523/1.771070
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:15:23. It took 7 Minutes 12 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:15:23
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 236315(236315/0)
|
||||
# of failed tasks (Edge/Cloud): 1684(1684/0)
|
||||
# of completed tasks (Edge/Cloud): 234631(234631/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 201(201/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1684/0(0/0/0)
|
||||
percentage of failed tasks: 0.712608%
|
||||
average service time: 1.484813 seconds. (on Edge: 1.484813, on Cloud: NaN)
|
||||
average processing time: 1.375792 seconds. (on Edge: 1.375792, on Cloud: NaN)
|
||||
average network delay: 0.109020 seconds. (LAN delay: 0.097190, MAN delay: 0.012856, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 14.982441/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:22:59. It took 7 Minutes 36 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:22:59
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 228153(228153/0)
|
||||
# of failed tasks (Edge/Cloud): 1561(1561/0)
|
||||
# of completed tasks (Edge/Cloud): 226592(226592/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 188(188/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1561/0(0/0/0)
|
||||
percentage of failed tasks: 0.684190%
|
||||
average service time: 1.499554 seconds. (on Edge: 1.499554, on Cloud: NaN)
|
||||
average processing time: 1.393105 seconds. (on Edge: 1.393105, on Cloud: NaN)
|
||||
average network delay: 0.106449 seconds. (LAN delay: 0.094647, MAN delay: 0.012837, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 15.360308/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:30:04. It took 7 Minutes 4 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:30:04
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 260397(138305/122092)
|
||||
# of failed tasks (Edge/Cloud): 1904(664/1240)
|
||||
# of completed tasks (Edge/Cloud): 258493(137641/120852)
|
||||
# of uncompleted tasks (Edge/Cloud): 257(212/45)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 1904/0(0/0/0)
|
||||
percentage of failed tasks: 0.731191%
|
||||
average service time: 1.551752 seconds. (on Edge: 1.362068, on Cloud: 1.767786)
|
||||
average processing time: 0.718549 seconds. (on Edge: 1.252711, on Cloud: 0.110181)
|
||||
average network delay: 0.833202 seconds. (LAN delay: 0.098112, MAN delay: 0.012643, WAN delay: 1.657605)
|
||||
average server utilization Edge/Cloud: 8.683767/2.008027
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:39:17. It took 9 Minutes 12 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:39:17
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 281770(281770/0)
|
||||
# of failed tasks (Edge/Cloud): 2634(2634/0)
|
||||
# of completed tasks (Edge/Cloud): 279136(279136/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 271(271/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2634/0(0/0/0)
|
||||
percentage of failed tasks: 0.934805%
|
||||
average service time: 2.001325 seconds. (on Edge: 2.001325, on Cloud: NaN)
|
||||
average processing time: 1.880686 seconds. (on Edge: 1.880686, on Cloud: NaN)
|
||||
average network delay: 0.120639 seconds. (LAN delay: 0.108610, MAN delay: 0.012986, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 24.826027/0.001505
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 16:50:15. It took 10 Minutes 58 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 16:50:15
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1200
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 275507(275507/0)
|
||||
# of failed tasks (Edge/Cloud): 2350(2350/0)
|
||||
# of completed tasks (Edge/Cloud): 273157(273157/0)
|
||||
# of uncompleted tasks (Edge/Cloud): 275(275/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2350/0(0/0/0)
|
||||
percentage of failed tasks: 0.852973%
|
||||
average service time: 1.921091 seconds. (on Edge: 1.921091, on Cloud: NaN)
|
||||
average processing time: 1.799380 seconds. (on Edge: 1.799380, on Cloud: NaN)
|
||||
average network delay: 0.121712 seconds. (LAN delay: 0.109726, MAN delay: 0.012972, WAN delay: NaN)
|
||||
average server utilization Edge/Cloud: 23.292821/0.000000
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:01:04. It took 10 Minutes 48 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:01:04
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 318350(190971/127379)
|
||||
# of failed tasks (Edge/Cloud): 2334(995/1339)
|
||||
# of completed tasks (Edge/Cloud): 316016(189976/126040)
|
||||
# of uncompleted tasks (Edge/Cloud): 300(257/43)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2334/0(0/0/0)
|
||||
percentage of failed tasks: 0.733155%
|
||||
average service time: 1.615096 seconds. (on Edge: 1.509502, on Cloud: 1.774255)
|
||||
average processing time: 0.869955 seconds. (on Edge: 1.376080, on Cloud: 0.107089)
|
||||
average network delay: 0.745142 seconds. (LAN delay: 0.121848, MAN delay: 0.012774, WAN delay: 1.667166)
|
||||
average server utilization Edge/Cloud: 12.247253/1.964548
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:15:03. It took 13 Minutes 58 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:15:03
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 331135(326695/4440)
|
||||
# of failed tasks (Edge/Cloud): 4235(3925/310)
|
||||
# of completed tasks (Edge/Cloud): 326900(322770/4130)
|
||||
# of uncompleted tasks (Edge/Cloud): 411(411/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 3959/276(0/0/276)
|
||||
percentage of failed tasks: 1.278935%
|
||||
average service time: 2.728190 seconds. (on Edge: 2.734557, on Cloud: 2.230656)
|
||||
average processing time: 2.564679 seconds. (on Edge: 2.596054, on Cloud: 0.112616)
|
||||
average network delay: 0.163512 seconds. (LAN delay: 0.126334, MAN delay: 0.013131, WAN delay: 2.118040)
|
||||
average server utilization Edge/Cloud: 38.494804/0.090970
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:30:22. It took 15 Minutes 19 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:30:22
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1400
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 326390(323710/2680)
|
||||
# of failed tasks (Edge/Cloud): 3651(3628/23)
|
||||
# of completed tasks (Edge/Cloud): 322739(320082/2657)
|
||||
# of uncompleted tasks (Edge/Cloud): 452(452/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 3651/0(0/0/0)
|
||||
percentage of failed tasks: 1.118600%
|
||||
average service time: 2.551082 seconds. (on Edge: 2.559829, on Cloud: 1.497460)
|
||||
average processing time: 2.401708 seconds. (on Edge: 2.420797, on Cloud: 0.102219)
|
||||
average network delay: 0.149374 seconds. (LAN delay: 0.126868, MAN delay: 0.013131, WAN delay: 1.395241)
|
||||
average server utilization Edge/Cloud: 35.463450/0.041472
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 17:45:45. It took 15 Minutes 23 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 17:45:45
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 359788(227836/131952)
|
||||
# of failed tasks (Edge/Cloud): 2816(1467/1349)
|
||||
# of completed tasks (Edge/Cloud): 356972(226369/130603)
|
||||
# of uncompleted tasks (Edge/Cloud): 352(302/50)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 2816/0(0/0/0)
|
||||
percentage of failed tasks: 0.782683%
|
||||
average service time: 1.782793 seconds. (on Edge: 1.770438, on Cloud: 1.804206)
|
||||
average processing time: 1.078572 seconds. (on Edge: 1.636596, on Cloud: 0.111370)
|
||||
average network delay: 0.704221 seconds. (LAN delay: 0.122043, MAN delay: 0.012875, WAN delay: 1.692837)
|
||||
average server utilization Edge/Cloud: 17.739548/2.097659
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 18:04:31. It took 18 Minutes 46 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 18:04:31
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 362741(343915/18826)
|
||||
# of failed tasks (Edge/Cloud): 10105(5203/4902)
|
||||
# of completed tasks (Edge/Cloud): 352636(338712/13924)
|
||||
# of uncompleted tasks (Edge/Cloud): 573(573/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 5348/4757(0/0/4757)
|
||||
percentage of failed tasks: 2.785734%
|
||||
average service time: 3.294907 seconds. (on Edge: 3.301577, on Cloud: 3.132656)
|
||||
average processing time: 3.034665 seconds. (on Edge: 3.154561, on Cloud: 0.118109)
|
||||
average network delay: 0.260242 seconds. (LAN delay: 0.134798, MAN delay: 0.013177, WAN delay: 3.014548)
|
||||
average server utilization Edge/Cloud: 50.316591/0.275920
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 18:24:05. It took 19 Minutes 34 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 18:24:05
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1600
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 372610(348915/23695)
|
||||
# of failed tasks (Edge/Cloud): 5733(5554/179)
|
||||
# of completed tasks (Edge/Cloud): 366877(343361/23516)
|
||||
# of uncompleted tasks (Edge/Cloud): 740(740/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 44(44/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 5689/0(0/0/0)
|
||||
percentage of failed tasks: 1.538606%
|
||||
average service time: 3.413521 seconds. (on Edge: 3.533761, on Cloud: 1.657884)
|
||||
average processing time: 3.172138 seconds. (on Edge: 3.381305, on Cloud: 0.118050)
|
||||
average network delay: 0.241384 seconds. (LAN delay: 0.140204, MAN delay: 0.013193, WAN delay: 1.539834)
|
||||
average server utilization Edge/Cloud: 53.913282/0.455184
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 18:45:08. It took 21 Minutes 3 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 18:45:08
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 412756(277804/134952)
|
||||
# of failed tasks (Edge/Cloud): 4831(3396/1435)
|
||||
# of completed tasks (Edge/Cloud): 407925(274408/133517)
|
||||
# of uncompleted tasks (Edge/Cloud): 501(463/38)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 77(77/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 4094/660(660/0/0)
|
||||
percentage of failed tasks: 1.170425%
|
||||
average service time: 2.103563 seconds. (on Edge: 2.252819, on Cloud: 1.796808)
|
||||
average processing time: 1.426899 seconds. (on Edge: 2.068516, on Cloud: 0.108230)
|
||||
average network delay: 0.676664 seconds. (LAN delay: 0.172303, MAN delay: 0.013025, WAN delay: 1.688578)
|
||||
average server utilization Edge/Cloud: 26.691531/2.045151
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 19:10:00. It took 24 Minutes 51 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 19:10:00
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 401994(360678/41316)
|
||||
# of failed tasks (Edge/Cloud): 21303(6122/15181)
|
||||
# of completed tasks (Edge/Cloud): 380691(354556/26135)
|
||||
# of uncompleted tasks (Edge/Cloud): 1529(1529/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 6470/14833(6/0/14827)
|
||||
percentage of failed tasks: 5.299333%
|
||||
average service time: 3.756641 seconds. (on Edge: 3.779225, on Cloud: 3.450260)
|
||||
average processing time: 3.372097 seconds. (on Edge: 3.612813, on Cloud: 0.106475)
|
||||
average network delay: 0.384543 seconds. (LAN delay: 0.154133, MAN delay: 0.013230, WAN delay: 3.343785)
|
||||
average server utilization Edge/Cloud: 59.380256/0.487124
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 19:32:46. It took 22 Minutes 46 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 19:32:46
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 1800
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 419525(371746/47779)
|
||||
# of failed tasks (Edge/Cloud): 10066(9584/482)
|
||||
# of completed tasks (Edge/Cloud): 409459(362162/47297)
|
||||
# of uncompleted tasks (Edge/Cloud): 1594(1594/0)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 1748(1748/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 7387/931(931/0/0)
|
||||
percentage of failed tasks: 2.399380%
|
||||
average service time: 3.927485 seconds. (on Edge: 4.215348, on Cloud: 1.723262)
|
||||
average processing time: 3.541644 seconds. (on Edge: 3.989104, on Cloud: 0.115358)
|
||||
average network delay: 0.385841 seconds. (LAN delay: 0.213946, MAN delay: 0.013257, WAN delay: 1.607903)
|
||||
average server utilization Edge/Cloud: 65.670569/0.836120
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 19:58:59. It took 26 Minutes 13 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 19:58:59
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: NETWORK_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 2000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 457018(321402/135616)
|
||||
# of failed tasks (Edge/Cloud): 10516(9103/1413)
|
||||
# of completed tasks (Edge/Cloud): 446502(312299/134203)
|
||||
# of uncompleted tasks (Edge/Cloud): 633(580/53)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 2119(2119/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 5340/3057(3057/0/0)
|
||||
percentage of failed tasks: 2.301003%
|
||||
average service time: 2.817930 seconds. (on Edge: 3.248023, on Cloud: 1.817076)
|
||||
average processing time: 2.105360 seconds. (on Edge: 2.962654, on Cloud: 0.110382)
|
||||
average network delay: 0.712571 seconds. (LAN delay: 0.273213, MAN delay: 0.013147, WAN delay: 1.706695)
|
||||
average server utilization Edge/Cloud: 42.871715/2.056856
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 20:29:32. It took 30 Minutes 32 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 20:29:32
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: UTILIZATION_BASED - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 2000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 469830(369916/99914)
|
||||
# of failed tasks (Edge/Cloud): 62179(7184/54995)
|
||||
# of completed tasks (Edge/Cloud): 407651(362732/44919)
|
||||
# of uncompleted tasks (Edge/Cloud): 1878(1856/22)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 0(0/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 8091/54088(14/0/54074)
|
||||
percentage of failed tasks: 13.234361%
|
||||
average service time: 4.361821 seconds. (on Edge: 4.342146, on Cloud: 4.520703)
|
||||
average processing time: 3.730369 seconds. (on Edge: 4.179636, on Cloud: 0.102426)
|
||||
average network delay: 0.631453 seconds. (LAN delay: 0.150216, MAN delay: 0.013242, WAN delay: 4.418277)
|
||||
average server utilization Edge/Cloud: 69.073161/0.800502
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 20:56:13. It took 26 Minutes 40 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Scenario started at 30/08/2018 20:56:13
|
||||
Scenario: TWO_TIER_WITH_EO - Policy: HYBRID - #iteration: 2
|
||||
Duration: 30.0 min (warm up period: 3.0 min) - #devices: 2000
|
||||
Creating tasks...Done,
|
||||
Creating device locations...Done.
|
||||
SimManager is starting...Done.
|
||||
.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100
|
||||
# of tasks (Edge/Cloud): 474285(393097/81188)
|
||||
# of failed tasks (Edge/Cloud): 22765(21961/804)
|
||||
# of completed tasks (Edge/Cloud): 451520(371136/80384)
|
||||
# of uncompleted tasks (Edge/Cloud): 1801(1771/30)
|
||||
# of failed tasks due to vm capacity (Edge/Cloud): 7502(7502/0)
|
||||
# of failed tasks due to Mobility/Network(WLAN/MAN/WAN): 8699/6564(6564/0/0)
|
||||
percentage of failed tasks: 4.799857%
|
||||
average service time: 4.437271 seconds. (on Edge: 5.019076, on Cloud: 1.751054)
|
||||
average processing time: 3.881488 seconds. (on Edge: 4.698189, on Cloud: 0.110747)
|
||||
average network delay: 0.555783 seconds. (LAN delay: 0.308558, MAN delay: 0.013292, WAN delay: 1.640308)
|
||||
average server utilization Edge/Cloud: 77.309066/1.273244
|
||||
average cost: 0.0$
|
||||
Scenario finished at 30/08/2018 21:27:59. It took 31 Minutes 45 Seconds
|
||||
----------------------------------------------------------------------
|
||||
Simulation finished at 30/08/2018 21:27:59. It took 5 Hours 58 Minutes 29 Seconds
|
Binary file not shown.
1
scripts/sample_app2/output/30-08-2018_15-29/tmp_runner0.sh
Executable file
1
scripts/sample_app2/output/30-08-2018_15-29/tmp_runner0.sh
Executable file
@ -0,0 +1 @@
|
||||
/home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app2/runner.sh /home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app2/output/30-08-2018_15-29 default_config edge_devices.xml applications.xml 1
|
1
scripts/sample_app2/output/30-08-2018_15-29/tmp_runner1.sh
Executable file
1
scripts/sample_app2/output/30-08-2018_15-29/tmp_runner1.sh
Executable file
@ -0,0 +1 @@
|
||||
/home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app2/runner.sh /home/cagatay/Desktop/ecs/EdgeCloudSim/scripts/sample_app2/output/30-08-2018_15-29 default_config edge_devices.xml applications.xml 2
|
59
scripts/sample_app2/run_scenarios.sh
Executable file
59
scripts/sample_app2/run_scenarios.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Missing arguments! Please provide number of parallel processes and number of iterations."
|
||||
echo "Usage: '$0 4 10'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
re='^[0-9]+$'
|
||||
if ! [[ $1 =~ $re ]] ; then
|
||||
echo "$1 is not an integer! Please provide number of parallel processes."
|
||||
echo "Usage: '$0 4 10'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [[ $2 =~ $re ]] ; then
|
||||
echo "$1 is not an integer! Please provide number of iterations."
|
||||
echo "Usage: '$0 4 10'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
script_root_path="$(dirname "$(readlink -f "$0")")"
|
||||
root_out_folder=${script_root_path}/output
|
||||
num_of_processes=$1
|
||||
iterationNumber=$2
|
||||
process_counter=0
|
||||
|
||||
date=$(date '+%d-%m-%Y_%H-%M')
|
||||
simulation_out_folder=${root_out_folder}/${date}
|
||||
mkdir -p $simulation_out_folder
|
||||
|
||||
simulations=$(cat ${script_root_path}/simulation.list)
|
||||
|
||||
rm -rf ${script_root_path}/tmp_runner*
|
||||
|
||||
for sim_args in $simulations
|
||||
do
|
||||
scenario_name=$(echo $sim_args | cut -d ';' -f1)
|
||||
edge_devices_file=$(echo $sim_args | cut -d ';' -f2)
|
||||
applications_file=$(echo $sim_args | cut -d ';' -f3)
|
||||
for (( i=1; i<=$iterationNumber; i++ ))
|
||||
do
|
||||
process_id=$(($process_counter % $num_of_processes))
|
||||
process_counter=$(($process_counter + 1))
|
||||
|
||||
echo "${script_root_path}/runner.sh $simulation_out_folder $scenario_name $edge_devices_file $applications_file ${i}" >> "${simulation_out_folder}/tmp_runner${process_id}.sh"
|
||||
done
|
||||
done
|
||||
|
||||
#num_of_cores=$(grep -c ^processor /proc/cpuinfo)
|
||||
|
||||
for (( i=0; i<$num_of_processes; i++ ))
|
||||
do
|
||||
chmod +x ${simulation_out_folder}/tmp_runner${i}.sh
|
||||
${simulation_out_folder}/tmp_runner${i}.sh &
|
||||
|
||||
# pid=$!
|
||||
# cpu=$(($i % $num_of_cores))
|
||||
# taskset -cp $cpu,$cpu $pid
|
||||
done
|
18
scripts/sample_app2/runner.sh
Executable file
18
scripts/sample_app2/runner.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
script_root_path="$(dirname "$(readlink -f "$0")")"
|
||||
simulation_out_folder=$1
|
||||
scenario_name=$2
|
||||
edge_devices_file=$3
|
||||
applications_file=$4
|
||||
iteration_number=$5
|
||||
|
||||
scenario_out_folder=${simulation_out_folder}/${scenario_name}/ite${iteration_number}
|
||||
scenario_conf_file=${script_root_path}/config/${scenario_name}.properties
|
||||
scenario_edge_devices_file=${script_root_path}/config/${edge_devices_file}
|
||||
scenario_applications_file=${script_root_path}/config/${applications_file}
|
||||
|
||||
mkdir -p $scenario_out_folder
|
||||
java -classpath '../../bin:../../lib/cloudsim-4.0.jar:../../lib/commons-math3-3.6.1.jar:../../lib/colt.jar' edu.boun.edgecloudsim.applications.sample_app2.MainApp $scenario_conf_file $scenario_edge_devices_file $scenario_applications_file $scenario_out_folder $iteration_number > ${scenario_out_folder}.log
|
||||
tar -czf ${scenario_out_folder}.tar.gz -C $simulation_out_folder/${scenario_name} ite${iteration_number}
|
||||
rm -rf $scenario_out_folder
|
1
scripts/sample_app2/simulation.list
Normal file
1
scripts/sample_app2/simulation.list
Normal file
@ -0,0 +1 @@
|
||||
default_config;edge_devices.xml;applications.xml
|
@ -1,20 +0,0 @@
|
||||
function [] = plotAvgFailedTask()
|
||||
|
||||
plotGenericResult(1, 2, 'Failed Tasks (%)', 'ALL_APPS', 1);
|
||||
plotGenericResult(1, 2, {'Failed Tasks for';'Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 1);
|
||||
plotGenericResult(1, 2, 'Failed Tasks for Health App (%)', 'HEALTH_APP', 1);
|
||||
plotGenericResult(1, 2, 'Failed Tasks for Infotainment App (%)', 'INFOTAINMENT_APP', 1);
|
||||
plotGenericResult(1, 2, 'Failed Tasks for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 1);
|
||||
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Cloudlet (%)', 'ALL_APPS', 0);
|
||||
plotGenericResult(2, 2, {'Failed Tasks on Cloudlet';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 1);
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Cloudlet for Health App (%)', 'HEALTH_APP', 1);
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Cloudlet for Infotainment App (%)', 'INFOTAINMENT_APP', 1);
|
||||
plotGenericResult(2, 2, 'Failed Tasks on Cloudlet for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 1);
|
||||
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud (%)', 'ALL_APPS', 1);
|
||||
plotGenericResult(3, 2, {'Failed Tasks on Cloud for';'Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 1);
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Health App (%)', 'HEALTH_APP', 1);
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Infotainment App (%)', 'INFOTAINMENT_APP', 1);
|
||||
plotGenericResult(3, 2, 'Failed Tasks on Cloud for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 1);
|
||||
end
|
@ -1,20 +0,0 @@
|
||||
function [] = plotAvgNetworkDelay()
|
||||
|
||||
plotGenericResult(1, 7, 'Average Network Delay (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(1, 7, 'Average Network Delay for Health App (sec)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(1, 7, {'Average Network Delay';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', 0);
|
||||
|
||||
plotGenericResult(2, 7, 'Average WLAN Delay (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(2, 7, {'Average WLAN Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(2, 7, 'Average WLAN Delay for Health App (sec)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(2, 7, {'Average WLAN Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(2, 7, {'Average WLAN Delay';'for Heavy Comp. App %(sec)'}, 'HEAVY_COMP_APP', 0);
|
||||
|
||||
plotGenericResult(3, 7, 'Average WAN Delay (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(3, 7, {'Average WAN Delay';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(3, 7, 'Average WAN Delay for Health App (sec)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(3, 7, {'Average WAN Delay';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(3, 7, {'Average WAN Delay';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', 0);
|
||||
end
|
@ -1,20 +0,0 @@
|
||||
function [] = plotAvgProcessingTime()
|
||||
|
||||
plotGenericResult(1, 6, 'Processing Time (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(1, 6, 'Processing Time for Augmented Reality App (sec)', 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(1, 6, 'Processing Time for Health App (sec)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(1, 6, 'Processing Time for Infotainment App (sec)', 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(1, 6, 'Processing Time for Heavy Comp. App (sec)', 'HEAVY_COMP_APP', 0);
|
||||
|
||||
plotGenericResult(2, 6, 'Processing Time on Cloudlet (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(2, 6, {'Processing Time on Cloudlet';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(2, 6, {'Processing Time on Cloudlet';'for Health App (sec)'}, 'HEALTH_APP', 0);
|
||||
plotGenericResult(2, 6, {'Processing Time on Cloudlet';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(2, 6, {'Processing Time on Cloudlet';'for Heavy Computation App (sec)'}, 'HEAVY_COMP_APP', 0);
|
||||
|
||||
plotGenericResult(3, 6, 'Processing Time on Cloud (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Health App (sec)'}, 'HEALTH_APP', 0);
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(3, 6, {'Processing Time on Cloud';'for Heavy Computation App (sec)'}, 'HEAVY_COMP_APP', 0);
|
||||
end
|
@ -1,21 +0,0 @@
|
||||
function [] = plotAvgServiceTime()
|
||||
|
||||
plotGenericResult(1, 5, 'Service Time (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(1, 5, 'Service Time for Augmented Reality App (sec)', 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(1, 5, 'Service Time for Health App (sec)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(1, 5, 'Service Time for Infotainment App (sec)', 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(1, 5, 'Service Time for Heavy Comp. App (sec)', 'HEAVY_COMP_APP', 0);
|
||||
|
||||
plotGenericResult(2, 5, 'Service Time on Cloudlet (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(2, 5, {'Service Time on Cloudlet';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(2, 5, 'Service Time on Cloudlet for Health App (sec)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(2, 5, {'Service Time on Cloudlet';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(2, 5, {'Service Time on Cloudlet';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', 0);
|
||||
|
||||
plotGenericResult(3, 5, 'Service Time on Cloud (sec)', 'ALL_APPS', 0);
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Augmented Reality App (sec)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(3, 5, 'Service Time on Cloud for Health App (sec)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Infotainment App (sec)'}, 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(3, 5, {'Service Time on Cloud';'for Heavy Comp. App (sec)'}, 'HEAVY_COMP_APP', 0);
|
||||
|
||||
end
|
@ -1,9 +0,0 @@
|
||||
function [] = plotAvgVmUtilization()
|
||||
|
||||
plotGenericResult(1, 8, 'Average VM Utilization (%)', 'ALL_APPS', 0);
|
||||
plotGenericResult(1, 8, {'Average VM Utilization';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 0);
|
||||
plotGenericResult(1, 8, 'Average VM Utilization for Health App (%)', 'HEALTH_APP', 0);
|
||||
plotGenericResult(1, 8, 'Average VM Utilization for Infotainment App (%)', 'INFOTAINMENT_APP', 0);
|
||||
plotGenericResult(1, 8, 'Average VM Utilization for Heavy Comp. App (%)', 'HEAVY_COMP_APP', 0);
|
||||
|
||||
end
|
@ -1,75 +0,0 @@
|
||||
function [] = plotLocation()
|
||||
folderPath = getConfiguration(1);
|
||||
numOfSimulations = getConfiguration(3);
|
||||
stepOfxAxis = getConfiguration(4);
|
||||
startOfMobileDeviceLoop = getConfiguration(10);
|
||||
stepOfMobileDeviceLoop = getConfiguration(11);
|
||||
endOfMobileDeviceLoop = getConfiguration(12);
|
||||
numOfMobileDevices = (endOfMobileDeviceLoop - startOfMobileDeviceLoop)/stepOfMobileDeviceLoop + 1;
|
||||
placeTypes = {'Attractiveness L1','Attractiveness L2','Attractiveness L3'};
|
||||
|
||||
results = zeros(size(placeTypes,2),numOfMobileDevices);
|
||||
|
||||
for s=1:numOfSimulations
|
||||
indexCounter = 1;
|
||||
for i=startOfMobileDeviceLoop:stepOfMobileDeviceLoop:endOfMobileDeviceLoop
|
||||
try
|
||||
filePath = strcat(folderPath,'\ite',int2str(s),'\SIMRESULT_SINGLE_TIER_NEXT_FIT_',int2str(i),'DEVICES_LOCATION.log');
|
||||
readData = dlmread(filePath,';',1,0);
|
||||
|
||||
for j=1:size(placeTypes,2)
|
||||
results(j,indexCounter) = results(j,indexCounter) + mean(readData(:,j+1));
|
||||
end
|
||||
catch err
|
||||
error(err)
|
||||
end
|
||||
indexCounter = indexCounter + 1;
|
||||
end
|
||||
end
|
||||
results = results/numOfSimulations;
|
||||
|
||||
types = zeros(1,numOfMobileDevices);
|
||||
for i=1:numOfMobileDevices
|
||||
types(i)=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
end
|
||||
|
||||
hFig = figure;
|
||||
set(hFig, 'Position',getConfiguration(7));
|
||||
if(getConfiguration(20) == 1)
|
||||
for i=stepOfxAxis:stepOfxAxis:numOfMobileDevices
|
||||
xIndex=startOfMobileDeviceLoop+((i-1)*stepOfMobileDeviceLoop);
|
||||
|
||||
markers = {':k*',':ko',':ks',':kv'};
|
||||
for j=1:size(placeTypes,2)
|
||||
plot(xIndex, results(j,i),char(markers(j)),'MarkerFaceColor',getConfiguration(20+j),'color',getConfiguration(20+j));
|
||||
hold on;
|
||||
end
|
||||
end
|
||||
|
||||
for j=1:size(placeTypes,2)
|
||||
plot(types, results(j,:),':k','color',getConfiguration(20+j),'LineWidth',1.5);
|
||||
hold on;
|
||||
end
|
||||
|
||||
set(gca,'color','none');
|
||||
else
|
||||
markers = {'-k*','-ko','-ks','-kv'};
|
||||
for j=1:size(placeTypes,2)
|
||||
plot(types, results(j,:),char(markers(j)),'MarkerFaceColor','w','LineWidth',1.4);
|
||||
hold on;
|
||||
end
|
||||
|
||||
%set(gcf, 'Position',getConfiguration(28));
|
||||
end
|
||||
lgnd = legend(placeTypes,'Location','NorthWest');
|
||||
if(getConfiguration(20) == 1)
|
||||
set(lgnd,'color','none');
|
||||
end
|
||||
|
||||
hold off;
|
||||
axis square
|
||||
xlabel('Number of Devices in the Simulation');
|
||||
set(gca,'XTick', (stepOfxAxis*stepOfMobileDeviceLoop):(stepOfxAxis*stepOfMobileDeviceLoop):endOfMobileDeviceLoop);
|
||||
ylabel('Average Number of Devices in Related Place');
|
||||
%set(gca,'YLim',[2 6]);
|
||||
end
|
@ -1,25 +0,0 @@
|
||||
function [] = plotTaskFailureReason()
|
||||
plotGenericResult(1, 10, 'Failed Task due to VM Capacity (%)', 'ALL_APPS', 1);
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 1);
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Health App (%)'}, 'HEALTH_APP', 1);
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 1);
|
||||
plotGenericResult(1, 10, {'Failed Task due to VM Capacity';'for Heavy Computation App (%)'}, 'HEAVY_COMP_APP', 1);
|
||||
|
||||
plotGenericResult(1, 11, 'Average Failed Task due to Mobility (%)', 'ALL_APPS', 1);
|
||||
plotGenericResult(1, 11, {'Failed Task due to VM Capacity';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 1);
|
||||
plotGenericResult(1, 11, {'Failed Task due to VM Capacity';'for Health App (%)'}, 'HEALTH_APP', 1);
|
||||
plotGenericResult(1, 11, {'Failed Task due to VM Capacity';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 1);
|
||||
plotGenericResult(1, 11, {'Failed Task due to VM Capacity';'for Heavy Computation App (%)'}, 'HEAVY_COMP_APP', 1);
|
||||
|
||||
plotGenericResult(2, 4, 'Failed Tasks due to WLAN failure (%)', 'ALL_APPS', 1);
|
||||
plotGenericResult(2, 4, {'Failed Tasks due to WLAN';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 1);
|
||||
plotGenericResult(2, 4, {'Failed Tasks due to WLAN';'for Health App (%)', 'HEALTH_APP'}, 1);
|
||||
plotGenericResult(2, 4, {'Failed Tasks due to WLAN';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 1);
|
||||
plotGenericResult(2, 4, {'Failed Tasks due to WLAN';'for Heavy Comp. App (%)'}, 'HEAVY_COMP_APP', 1);
|
||||
|
||||
plotGenericResult(3, 4, 'Failed Tasks due to WAN failure (%)', 'ALL_APPS', 1);
|
||||
plotGenericResult(3, 4, {'Failed Tasks due to WAN';'for Augmented Reality App (%)'}, 'AUGMENTED_REALITY', 1);
|
||||
plotGenericResult(3, 4, {'Failed Tasks due to WAN';'for Health App (%)'}, 'HEALTH_APP', 1);
|
||||
plotGenericResult(3, 4, {'Failed Tasks due to WAN';'for Infotainment App (%)'}, 'INFOTAINMENT_APP', 1);
|
||||
plotGenericResult(3, 4, {'Failed Tasks due to WAN';'for Heavy Comp. App (%)'}, 'HEAVY_COMP_APP', 1);
|
||||
end
|
@ -1,132 +1,131 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Sample Application
|
||||
*
|
||||
* Description: Sample application for EdgeCloudSim
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.sample_application;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
|
||||
import edu.boun.edgecloudsim.core.ScenarioFactory;
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class mainApp {
|
||||
|
||||
/**
|
||||
* Creates main() to run this example
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
//disable console output of cloudsim library
|
||||
Log.disable();
|
||||
|
||||
//enable console ourput and file output of this application
|
||||
SimLogger.enablePrintLog();
|
||||
|
||||
int iterationNumber = 1;
|
||||
String configFile = "";
|
||||
String outputFolder = "";
|
||||
String edgeDevicesFile = "";
|
||||
String applicationsFile = "";
|
||||
if (args.length == 5){
|
||||
configFile = args[0];
|
||||
edgeDevicesFile = args[1];
|
||||
applicationsFile = args[2];
|
||||
outputFolder = args[3];
|
||||
iterationNumber = Integer.parseInt(args[4]);
|
||||
}
|
||||
else{
|
||||
SimLogger.printLine("Simulation setting file, output folder and iteration number are not provided! Using default ones...");
|
||||
String configName = "default_config";
|
||||
configFile = "config/sample_application/" + configName + ".properties";
|
||||
applicationsFile = "config/sample_application/applications.xml";
|
||||
edgeDevicesFile = "config/sample_application/edge_devices.xml";
|
||||
outputFolder = "D:/" + configName + "/ite" + iterationNumber;
|
||||
}
|
||||
|
||||
//load settings from configuration file
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
if(SS.initialize(configFile, edgeDevicesFile, applicationsFile) == false){
|
||||
SimLogger.printLine("cannot initialize simulation settings!");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
if(SS.getFileLoggingEnabled()){
|
||||
SimLogger.enableFileLog();
|
||||
SimUtils.cleanOutputFolder(outputFolder);
|
||||
}
|
||||
|
||||
DateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
Date SimulationStartDate = Calendar.getInstance().getTime();
|
||||
String now = df.format(SimulationStartDate);
|
||||
SimLogger.printLine("Simulation started at " + now);
|
||||
SimLogger.printLine("----------------------------------------------------------------------");
|
||||
|
||||
for(int j=SS.getMinNumOfMobileDev(); j<=SS.getMaxNumOfMobileDev(); j+=SS.getMobileDevCounterSize())
|
||||
{
|
||||
for(int k=0; k<SS.getSimulationScenarios().length; k++)
|
||||
{
|
||||
for(int i=0; i<SS.getOrchestratorPolicies().length; i++)
|
||||
{
|
||||
String simScenario = SS.getSimulationScenarios()[k];
|
||||
String orchestratorPolicy = SS.getOrchestratorPolicies()[i];
|
||||
Date ScenarioStartDate = Calendar.getInstance().getTime();
|
||||
now = df.format(ScenarioStartDate);
|
||||
|
||||
SimLogger.printLine("Scenario started at " + now);
|
||||
SimLogger.printLine("Scenario: " + simScenario + " - Policy: " + orchestratorPolicy + " - #iteration: " + iterationNumber);
|
||||
SimLogger.printLine("Duration: " + SS.getSimulationTime()/3600 + " hour(s) - Poisson: " + SS.getTaskLookUpTable()[0][2] + " - #devices: " + j);
|
||||
SimLogger.getInstance().simStarted(outputFolder,"SIMRESULT_" + simScenario + "_" + orchestratorPolicy + "_" + j + "DEVICES");
|
||||
|
||||
try
|
||||
{
|
||||
// First step: Initialize the CloudSim package. It should be called
|
||||
// before creating any entities.
|
||||
int num_user = 2; // number of grid users
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
boolean trace_flag = false; // mean trace events
|
||||
|
||||
// Initialize the CloudSim library
|
||||
CloudSim.init(num_user, calendar, trace_flag, 0.01);
|
||||
|
||||
// Generate EdgeCloudsim Scenario Factory
|
||||
ScenarioFactory sampleFactory = new SampleScenarioFactory(j,SS.getSimulationTime(), orchestratorPolicy, simScenario);
|
||||
|
||||
// Generate EdgeCloudSim Simulation Manager
|
||||
SimManager manager = new SimManager(sampleFactory, j, simScenario);
|
||||
|
||||
// Start simulation
|
||||
manager.startSimulation();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SimLogger.printLine("The simulation has been terminated due to an unexpected error");
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
Date ScenarioEndDate = Calendar.getInstance().getTime();
|
||||
now = df.format(ScenarioEndDate);
|
||||
SimLogger.printLine("Scenario finished at " + now + ". It took " + SimUtils.getTimeDifference(ScenarioStartDate,ScenarioEndDate));
|
||||
SimLogger.printLine("----------------------------------------------------------------------");
|
||||
}//End of orchestrators loop
|
||||
}//End of scenarios loop
|
||||
}//End of mobile devices loop
|
||||
|
||||
Date SimulationEndDate = Calendar.getInstance().getTime();
|
||||
now = df.format(SimulationEndDate);
|
||||
SimLogger.printLine("Simulation finished at " + now + ". It took " + SimUtils.getTimeDifference(SimulationStartDate,SimulationEndDate));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Main Application
|
||||
*
|
||||
* Description: Main application for Simple App
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.applications.sample_app1;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
|
||||
import edu.boun.edgecloudsim.core.ScenarioFactory;
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class MainApp {
|
||||
|
||||
/**
|
||||
* Creates main() to run this example
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
//disable console output of cloudsim library
|
||||
Log.disable();
|
||||
|
||||
//enable console ourput and file output of this application
|
||||
SimLogger.enablePrintLog();
|
||||
|
||||
int iterationNumber = 1;
|
||||
String configFile = "";
|
||||
String outputFolder = "";
|
||||
String edgeDevicesFile = "";
|
||||
String applicationsFile = "";
|
||||
if (args.length == 5){
|
||||
configFile = args[0];
|
||||
edgeDevicesFile = args[1];
|
||||
applicationsFile = args[2];
|
||||
outputFolder = args[3];
|
||||
iterationNumber = Integer.parseInt(args[4]);
|
||||
}
|
||||
else{
|
||||
SimLogger.printLine("Simulation setting file, output folder and iteration number are not provided! Using default ones...");
|
||||
configFile = "scripts/sample_app1/config/default_config.properties";
|
||||
applicationsFile = "scripts/sample_app1/config/applications.xml";
|
||||
edgeDevicesFile = "scripts/sample_app1/config/edge_devices.xml";
|
||||
outputFolder = "sim_results/ite" + iterationNumber;
|
||||
}
|
||||
|
||||
//load settings from configuration file
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
if(SS.initialize(configFile, edgeDevicesFile, applicationsFile) == false){
|
||||
SimLogger.printLine("cannot initialize simulation settings!");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
if(SS.getFileLoggingEnabled()){
|
||||
SimLogger.enableFileLog();
|
||||
SimUtils.cleanOutputFolder(outputFolder);
|
||||
}
|
||||
|
||||
DateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
Date SimulationStartDate = Calendar.getInstance().getTime();
|
||||
String now = df.format(SimulationStartDate);
|
||||
SimLogger.printLine("Simulation started at " + now);
|
||||
SimLogger.printLine("----------------------------------------------------------------------");
|
||||
|
||||
for(int j=SS.getMinNumOfMobileDev(); j<=SS.getMaxNumOfMobileDev(); j+=SS.getMobileDevCounterSize())
|
||||
{
|
||||
for(int k=0; k<SS.getSimulationScenarios().length; k++)
|
||||
{
|
||||
for(int i=0; i<SS.getOrchestratorPolicies().length; i++)
|
||||
{
|
||||
String simScenario = SS.getSimulationScenarios()[k];
|
||||
String orchestratorPolicy = SS.getOrchestratorPolicies()[i];
|
||||
Date ScenarioStartDate = Calendar.getInstance().getTime();
|
||||
now = df.format(ScenarioStartDate);
|
||||
|
||||
SimLogger.printLine("Scenario started at " + now);
|
||||
SimLogger.printLine("Scenario: " + simScenario + " - Policy: " + orchestratorPolicy + " - #iteration: " + iterationNumber);
|
||||
SimLogger.printLine("Duration: " + SS.getSimulationTime()/3600 + " hour(s) - Poisson: " + SS.getTaskLookUpTable()[0][2] + " - #devices: " + j);
|
||||
SimLogger.getInstance().simStarted(outputFolder,"SIMRESULT_" + simScenario + "_" + orchestratorPolicy + "_" + j + "DEVICES");
|
||||
|
||||
try
|
||||
{
|
||||
// First step: Initialize the CloudSim package. It should be called
|
||||
// before creating any entities.
|
||||
int num_user = 2; // number of grid users
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
boolean trace_flag = false; // mean trace events
|
||||
|
||||
// Initialize the CloudSim library
|
||||
CloudSim.init(num_user, calendar, trace_flag, 0.01);
|
||||
|
||||
// Generate EdgeCloudsim Scenario Factory
|
||||
ScenarioFactory sampleFactory = new SampleScenarioFactory(j,SS.getSimulationTime(), orchestratorPolicy, simScenario);
|
||||
|
||||
// Generate EdgeCloudSim Simulation Manager
|
||||
SimManager manager = new SimManager(sampleFactory, j, simScenario, orchestratorPolicy);
|
||||
|
||||
// Start simulation
|
||||
manager.startSimulation();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SimLogger.printLine("The simulation has been terminated due to an unexpected error");
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
Date ScenarioEndDate = Calendar.getInstance().getTime();
|
||||
now = df.format(ScenarioEndDate);
|
||||
SimLogger.printLine("Scenario finished at " + now + ". It took " + SimUtils.getTimeDifference(ScenarioStartDate,ScenarioEndDate));
|
||||
SimLogger.printLine("----------------------------------------------------------------------");
|
||||
}//End of orchestrators loop
|
||||
}//End of scenarios loop
|
||||
}//End of mobile devices loop
|
||||
|
||||
Date SimulationEndDate = Calendar.getInstance().getTime();
|
||||
now = df.format(SimulationEndDate);
|
||||
SimLogger.printLine("Simulation finished at " + now + ". It took " + SimUtils.getTimeDifference(SimulationStartDate,SimulationEndDate));
|
||||
}
|
||||
}
|
@ -1,77 +1,78 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Sample Scenario Factory
|
||||
*
|
||||
* Description: Sample factory providing the default
|
||||
* instances of required abstract classes
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.sample_application;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
|
||||
import edu.boun.edgecloudsim.core.ScenarioFactory;
|
||||
import edu.boun.edgecloudsim.core.SimSettings.APP_TYPES;
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.BasicEdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_server.VmAllocationPolicy_Custom;
|
||||
import edu.boun.edgecloudsim.edge_client.CpuUtilizationModel_Custom;
|
||||
import edu.boun.edgecloudsim.mobility.MobilityModel;
|
||||
import edu.boun.edgecloudsim.mobility.NomadicMobility;
|
||||
import edu.boun.edgecloudsim.task_generator.IdleActiveLoadGenerator;
|
||||
import edu.boun.edgecloudsim.task_generator.LoadGeneratorModel;
|
||||
import edu.boun.edgecloudsim.network.MM1Queue;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
|
||||
public class SampleScenarioFactory implements ScenarioFactory {
|
||||
private int numOfMobileDevice;
|
||||
private double simulationTime;
|
||||
private String orchestratorPolicy;
|
||||
private String simScenario;
|
||||
|
||||
SampleScenarioFactory(int _numOfMobileDevice,
|
||||
double _simulationTime,
|
||||
String _orchestratorPolicy,
|
||||
String _simScenario){
|
||||
orchestratorPolicy = _orchestratorPolicy;
|
||||
numOfMobileDevice = _numOfMobileDevice;
|
||||
simulationTime = _simulationTime;
|
||||
simScenario = _simScenario;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoadGeneratorModel getLoadGeneratorModel() {
|
||||
return new IdleActiveLoadGenerator(numOfMobileDevice, simulationTime, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EdgeOrchestrator getEdgeOrchestrator() {
|
||||
return new BasicEdgeOrchestrator(orchestratorPolicy, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobilityModel getMobilityModel() {
|
||||
return new NomadicMobility(numOfMobileDevice,simulationTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NetworkModel getNetworkModel() {
|
||||
return new MM1Queue(numOfMobileDevice);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VmAllocationPolicy getVmAllocationPolicy(List<? extends Host> hostList, int dataCenterIndex) {
|
||||
return new VmAllocationPolicy_Custom(hostList,dataCenterIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UtilizationModel getCpuUtilizationModel(APP_TYPES _taskType) {
|
||||
return new CpuUtilizationModel_Custom(_taskType);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Scenario Factory
|
||||
*
|
||||
* Description: Sample scenario factory providing the default
|
||||
* instances of required abstract classes
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.applications.sample_app1;
|
||||
|
||||
import edu.boun.edgecloudsim.cloud_server.CloudServerManager;
|
||||
import edu.boun.edgecloudsim.cloud_server.DefaultCloudServerManager;
|
||||
import edu.boun.edgecloudsim.core.ScenarioFactory;
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.BasicEdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_server.DefaultEdgeServerManager;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeServerManager;
|
||||
import edu.boun.edgecloudsim.edge_client.DefaultMobileDeviceManager;
|
||||
import edu.boun.edgecloudsim.edge_client.MobileDeviceManager;
|
||||
import edu.boun.edgecloudsim.mobility.MobilityModel;
|
||||
import edu.boun.edgecloudsim.mobility.NomadicMobility;
|
||||
import edu.boun.edgecloudsim.task_generator.IdleActiveLoadGenerator;
|
||||
import edu.boun.edgecloudsim.task_generator.LoadGeneratorModel;
|
||||
import edu.boun.edgecloudsim.network.MM1Queue;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
|
||||
public class SampleScenarioFactory implements ScenarioFactory {
|
||||
private int numOfMobileDevice;
|
||||
private double simulationTime;
|
||||
private String orchestratorPolicy;
|
||||
private String simScenario;
|
||||
|
||||
SampleScenarioFactory(int _numOfMobileDevice,
|
||||
double _simulationTime,
|
||||
String _orchestratorPolicy,
|
||||
String _simScenario){
|
||||
orchestratorPolicy = _orchestratorPolicy;
|
||||
numOfMobileDevice = _numOfMobileDevice;
|
||||
simulationTime = _simulationTime;
|
||||
simScenario = _simScenario;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoadGeneratorModel getLoadGeneratorModel() {
|
||||
return new IdleActiveLoadGenerator(numOfMobileDevice, simulationTime, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EdgeOrchestrator getEdgeOrchestrator() {
|
||||
return new BasicEdgeOrchestrator(orchestratorPolicy, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobilityModel getMobilityModel() {
|
||||
return new NomadicMobility(numOfMobileDevice,simulationTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NetworkModel getNetworkModel() {
|
||||
return new MM1Queue(numOfMobileDevice, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EdgeServerManager getEdgeServerManager() {
|
||||
return new DefaultEdgeServerManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudServerManager getCloudServerManager() {
|
||||
return new DefaultCloudServerManager();
|
||||
}
|
||||
|
||||
public MobileDeviceManager getMobileDeviceManager() throws Exception {
|
||||
return new DefaultMobileDeviceManager();
|
||||
}
|
||||
}
|
131
src/edu/boun/edgecloudsim/applications/sample_app2/MainApp.java
Normal file
131
src/edu/boun/edgecloudsim/applications/sample_app2/MainApp.java
Normal file
@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Main Application
|
||||
*
|
||||
* Description: Main application for Sample App2
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.applications.sample_app2;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
|
||||
import edu.boun.edgecloudsim.core.ScenarioFactory;
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class MainApp {
|
||||
|
||||
/**
|
||||
* Creates main() to run this example
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
//disable console output of cloudsim library
|
||||
Log.disable();
|
||||
|
||||
//enable console ourput and file output of this application
|
||||
SimLogger.enablePrintLog();
|
||||
|
||||
int iterationNumber = 1;
|
||||
String configFile = "";
|
||||
String outputFolder = "";
|
||||
String edgeDevicesFile = "";
|
||||
String applicationsFile = "";
|
||||
if (args.length == 5){
|
||||
configFile = args[0];
|
||||
edgeDevicesFile = args[1];
|
||||
applicationsFile = args[2];
|
||||
outputFolder = args[3];
|
||||
iterationNumber = Integer.parseInt(args[4]);
|
||||
}
|
||||
else{
|
||||
SimLogger.printLine("Simulation setting file, output folder and iteration number are not provided! Using default ones...");
|
||||
configFile = "scripts/sample_app2/config/default_config.properties";
|
||||
applicationsFile = "scripts/sample_app2/config/applications.xml";
|
||||
edgeDevicesFile = "scripts/sample_app2/config/edge_devices.xml";
|
||||
outputFolder = "sim_results/ite" + iterationNumber;
|
||||
}
|
||||
|
||||
//load settings from configuration file
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
if(SS.initialize(configFile, edgeDevicesFile, applicationsFile) == false){
|
||||
SimLogger.printLine("cannot initialize simulation settings!");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
if(SS.getFileLoggingEnabled()){
|
||||
SimLogger.enableFileLog();
|
||||
SimUtils.cleanOutputFolder(outputFolder);
|
||||
}
|
||||
|
||||
DateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
Date SimulationStartDate = Calendar.getInstance().getTime();
|
||||
String now = df.format(SimulationStartDate);
|
||||
SimLogger.printLine("Simulation started at " + now);
|
||||
SimLogger.printLine("----------------------------------------------------------------------");
|
||||
|
||||
for(int j=SS.getMinNumOfMobileDev(); j<=SS.getMaxNumOfMobileDev(); j+=SS.getMobileDevCounterSize())
|
||||
{
|
||||
for(int k=0; k<SS.getSimulationScenarios().length; k++)
|
||||
{
|
||||
for(int i=0; i<SS.getOrchestratorPolicies().length; i++)
|
||||
{
|
||||
String simScenario = SS.getSimulationScenarios()[k];
|
||||
String orchestratorPolicy = SS.getOrchestratorPolicies()[i];
|
||||
Date ScenarioStartDate = Calendar.getInstance().getTime();
|
||||
now = df.format(ScenarioStartDate);
|
||||
|
||||
SimLogger.printLine("Scenario started at " + now);
|
||||
SimLogger.printLine("Scenario: " + simScenario + " - Policy: " + orchestratorPolicy + " - #iteration: " + iterationNumber);
|
||||
SimLogger.printLine("Duration: " + SS.getSimulationTime()/60 + " min (warm up period: "+ SS.getWarmUpPeriod()/60 +" min) - #devices: " + j);
|
||||
SimLogger.getInstance().simStarted(outputFolder,"SIMRESULT_" + simScenario + "_" + orchestratorPolicy + "_" + j + "DEVICES");
|
||||
|
||||
try
|
||||
{
|
||||
// First step: Initialize the CloudSim package. It should be called
|
||||
// before creating any entities.
|
||||
int num_user = 2; // number of grid users
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
boolean trace_flag = false; // mean trace events
|
||||
|
||||
// Initialize the CloudSim library
|
||||
CloudSim.init(num_user, calendar, trace_flag, 0.01);
|
||||
|
||||
// Generate EdgeCloudsim Scenario Factory
|
||||
ScenarioFactory sampleFactory = new SampleScenarioFactory(j,SS.getSimulationTime(), orchestratorPolicy, simScenario);
|
||||
|
||||
// Generate EdgeCloudSim Simulation Manager
|
||||
SimManager manager = new SimManager(sampleFactory, j, simScenario, orchestratorPolicy);
|
||||
|
||||
// Start simulation
|
||||
manager.startSimulation();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SimLogger.printLine("The simulation has been terminated due to an unexpected error");
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
Date ScenarioEndDate = Calendar.getInstance().getTime();
|
||||
now = df.format(ScenarioEndDate);
|
||||
SimLogger.printLine("Scenario finished at " + now + ". It took " + SimUtils.getTimeDifference(ScenarioStartDate,ScenarioEndDate));
|
||||
SimLogger.printLine("----------------------------------------------------------------------");
|
||||
}//End of orchestrators loop
|
||||
}//End of scenarios loop
|
||||
}//End of mobile devices loop
|
||||
|
||||
Date SimulationEndDate = Calendar.getInstance().getTime();
|
||||
now = df.format(SimulationEndDate);
|
||||
SimLogger.printLine("Simulation finished at " + now + ". It took " + SimUtils.getTimeDifference(SimulationStartDate,SimulationEndDate));
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Edge Orchestrator
|
||||
*
|
||||
* Description:
|
||||
* SampleEdgeOrchestrator offloads tasks to proper server
|
||||
* by considering WAN bandwidth and edge server utilization.
|
||||
* After the target server is decided, the least loaded VM is selected.
|
||||
* If the target server is a remote edge server, MAN is used.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.applications.sample_app2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.UtilizationModelFull;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.core.SimEvent;
|
||||
|
||||
import edu.boun.edgecloudsim.cloud_server.CloudVM;
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeVM;
|
||||
import edu.boun.edgecloudsim.edge_client.CpuUtilizationModel_Custom;
|
||||
import edu.boun.edgecloudsim.edge_client.Task;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
public class SampleEdgeOrchestrator extends EdgeOrchestrator {
|
||||
|
||||
private int numberOfHost; //used by load balancer
|
||||
|
||||
public SampleEdgeOrchestrator(String _policy, String _simScenario) {
|
||||
super(_policy, _simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
numberOfHost=SimSettings.getInstance().getNumOfEdgeHosts();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator#getDeviceToOffload(edu.boun.edgecloudsim.edge_client.Task)
|
||||
*
|
||||
* It is assumed that the edge orchestrator app is running on the edge devices in a distributed manner
|
||||
*/
|
||||
@Override
|
||||
public int getDeviceToOffload(Task task) {
|
||||
int result = 0;
|
||||
|
||||
//RODO: return proper host ID
|
||||
|
||||
if(simScenario.equals("SINGLE_TIER")){
|
||||
result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
}
|
||||
else if(simScenario.equals("TWO_TIER_WITH_EO")){
|
||||
//dummy task to simulate a task with 1 Mbit file size to upload and download
|
||||
Task dummyTask = new Task(0, 0, 0, 0, 128, 128, new UtilizationModelFull(), new UtilizationModelFull(), new UtilizationModelFull());
|
||||
|
||||
double wanDelay = SimManager.getInstance().getNetworkModel().getUploadDelay(task.getMobileDeviceId(),
|
||||
SimSettings.CLOUD_DATACENTER_ID, dummyTask /* 1 Mbit */);
|
||||
|
||||
double wanBW = (wanDelay == 0) ? 0 : (1 / wanDelay); /* Mbps */
|
||||
|
||||
double edgeUtilization = SimManager.getInstance().getEdgeServerManager().getAvgUtilization();
|
||||
|
||||
|
||||
if(policy.equals("NETWORK_BASED")){
|
||||
if(wanBW > 6)
|
||||
result = SimSettings.CLOUD_DATACENTER_ID;
|
||||
else
|
||||
result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
}
|
||||
else if(policy.equals("UTILIZATION_BASED")){
|
||||
double utilization = edgeUtilization;
|
||||
if(utilization > 80)
|
||||
result = SimSettings.CLOUD_DATACENTER_ID;
|
||||
else
|
||||
result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
}
|
||||
else if(policy.equals("HYBRID")){
|
||||
double utilization = edgeUtilization;
|
||||
if(wanBW > 6 && utilization > 80)
|
||||
result = SimSettings.CLOUD_DATACENTER_ID;
|
||||
else
|
||||
result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknow edge orchestrator policy! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknow simulation scenario! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vm getVmToOffload(Task task, int deviceId) {
|
||||
Vm selectedVM = null;
|
||||
|
||||
if(deviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
//Select VM on cloud devices via Least Loaded algorithm!
|
||||
double selectedVmCapacity = 0; //start with min value
|
||||
List<Host> list = SimManager.getInstance().getCloudServerManager().getDatacenter().getHostList();
|
||||
for (int hostIndex=0; hostIndex < list.size(); hostIndex++) {
|
||||
List<CloudVM> vmArray = SimManager.getInstance().getCloudServerManager().getVmList(hostIndex);
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(vmIndex).getVmType());
|
||||
double targetVmCapacity = (double)100 - vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
if(requiredCapacity <= targetVmCapacity && targetVmCapacity > selectedVmCapacity){
|
||||
selectedVM = vmArray.get(vmIndex);
|
||||
selectedVmCapacity = targetVmCapacity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(deviceId == SimSettings.GENERIC_EDGE_DEVICE_ID){
|
||||
//Select VM on edge devices via Least Loaded algorithm!
|
||||
double selectedVmCapacity = 0; //start with min value
|
||||
for(int hostIndex=0; hostIndex<numberOfHost; hostIndex++){
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(hostIndex);
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(vmIndex).getVmType());
|
||||
double targetVmCapacity = (double)100 - vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
if(requiredCapacity <= targetVmCapacity && targetVmCapacity > selectedVmCapacity){
|
||||
selectedVM = vmArray.get(vmIndex);
|
||||
selectedVmCapacity = targetVmCapacity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
SimLogger.printLine("Unknown device id! The simulation has been terminated.");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
return selectedVM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processEvent(SimEvent arg0) {
|
||||
// Nothing to do!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownEntity() {
|
||||
// Nothing to do!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startEntity() {
|
||||
// Nothing to do!
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,399 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Mobile Device Manager
|
||||
*
|
||||
* Description:
|
||||
* Mobile Device Manager is one of the most important component
|
||||
* in EdgeCloudSim. It is responsible for creating the tasks,
|
||||
* submitting them to the related VM with respect to the
|
||||
* Edge Orchestrator decision, and takes proper actions when
|
||||
* the execution of the tasks are finished. It also feeds the
|
||||
* SimLogger with the relevant results.
|
||||
|
||||
* SampleMobileDeviceManager sends tasks to the edge servers or
|
||||
* cloud servers. The mobile devices use WAN if the tasks are
|
||||
* offloaded to the edge servers. On the other hand, they use WLAN
|
||||
* if the target server is an edge server. Finally, the mobile
|
||||
* devices use MAN if they must be served by a remote edge server
|
||||
* due to the congestion at their own location. In this case,
|
||||
* they access the edge server via two hops where the packets
|
||||
* must go through WLAN and MAN.
|
||||
*
|
||||
* If you want to use different topology, you should modify
|
||||
* the flow implemented in this class.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.applications.sample_app2;
|
||||
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
import org.cloudbus.cloudsim.UtilizationModelFull;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.core.CloudSimTags;
|
||||
import org.cloudbus.cloudsim.core.SimEvent;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.core.SimSettings.NETWORK_DELAY_TYPES;
|
||||
import edu.boun.edgecloudsim.edge_client.CpuUtilizationModel_Custom;
|
||||
import edu.boun.edgecloudsim.edge_client.MobileDeviceManager;
|
||||
import edu.boun.edgecloudsim.edge_client.Task;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeHost;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeVM;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
public class SampleMobileDeviceManager extends MobileDeviceManager {
|
||||
private static final int BASE = 100000; //start from base in order not to conflict cloudsim tag!
|
||||
|
||||
private static final int UPDATE_MM1_QUEUE_MODEL = BASE + 1;
|
||||
private static final int REQUEST_RECEIVED_BY_CLOUD = BASE + 2;
|
||||
private static final int REQUEST_RECEIVED_BY_EDGE_DEVICE = BASE + 3;
|
||||
private static final int REQUEST_RECEIVED_BY_REMOTE_EDGE_DEVICE = BASE + 4;
|
||||
private static final int REQUEST_RECEIVED_BY_EDGE_DEVICE_TO_RELAY_NEIGHBOR = BASE + 5;
|
||||
private static final int RESPONSE_RECEIVED_BY_MOBILE_DEVICE = BASE + 6;
|
||||
private static final int RESPONSE_RECEIVED_BY_EDGE_DEVICE_TO_RELAY_MOBILE_DEVICE = BASE + 7;
|
||||
|
||||
private static final double MM1_QUEUE_MODEL_UPDATE_INTEVAL = 5; //seconds
|
||||
|
||||
private int taskIdCounter=0;
|
||||
|
||||
public SampleMobileDeviceManager() throws Exception{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public UtilizationModel getCpuUtilizationModel() {
|
||||
return new CpuUtilizationModel_Custom();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startEntity() {
|
||||
super.startEntity();
|
||||
schedule(getId(), SimSettings.CLIENT_ACTIVITY_START_TIME +
|
||||
MM1_QUEUE_MODEL_UPDATE_INTEVAL, UPDATE_MM1_QUEUE_MODEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit cloudlets to the created VMs.
|
||||
*
|
||||
* @pre $none
|
||||
* @post $none
|
||||
*/
|
||||
protected void submitCloudlets() {
|
||||
//do nothing!
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a cloudlet return event.
|
||||
*
|
||||
* @param ev a SimEvent object
|
||||
* @pre ev != $null
|
||||
* @post $none
|
||||
*/
|
||||
protected void processCloudletReturn(SimEvent ev) {
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
SimLogger.getInstance().taskExecuted(task.getCloudletId());
|
||||
|
||||
if(task.getAssociatedDatacenterId() == SimSettings.CLOUD_DATACENTER_ID){
|
||||
//SimLogger.printLine(CloudSim.clock() + ": " + getName() + ": task #" + task.getCloudletId() + " received from cloud");
|
||||
double WanDelay = networkModel.getDownloadDelay(SimSettings.CLOUD_DATACENTER_ID, task.getMobileDeviceId(), task);
|
||||
if(WanDelay > 0)
|
||||
{
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().getLocation(task.getMobileDeviceId(),CloudSim.clock()+WanDelay);
|
||||
if(task.getSubmittedLocation().getServingWlanId() == currentLocation.getServingWlanId())
|
||||
{
|
||||
networkModel.downloadStarted(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
SimLogger.getInstance().setDownloadDelay(task.getCloudletId(), WanDelay, NETWORK_DELAY_TYPES.WAN_DELAY);
|
||||
schedule(getId(), WanDelay, RESPONSE_RECEIVED_BY_MOBILE_DEVICE, task);
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToMobility(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToBandwidth(task.getCloudletId(), CloudSim.clock(), NETWORK_DELAY_TYPES.WAN_DELAY);
|
||||
}
|
||||
}
|
||||
else{
|
||||
int nextEvent = RESPONSE_RECEIVED_BY_MOBILE_DEVICE;
|
||||
int nextDeviceForNetworkModel = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
NETWORK_DELAY_TYPES delayType = NETWORK_DELAY_TYPES.WLAN_DELAY;
|
||||
double delay = networkModel.getDownloadDelay(task.getAssociatedHostId(), task.getMobileDeviceId(), task);
|
||||
|
||||
EdgeHost host = (EdgeHost)(SimManager.
|
||||
getInstance().
|
||||
getEdgeServerManager().
|
||||
getDatacenterList().get(task.getAssociatedHostId()).
|
||||
getHostList().get(0));
|
||||
|
||||
//if neighbor edge device is selected
|
||||
if(host.getLocation().getServingWlanId() != task.getSubmittedLocation().getServingWlanId())
|
||||
{
|
||||
delay = networkModel.getDownloadDelay(SimSettings.GENERIC_EDGE_DEVICE_ID, SimSettings.GENERIC_EDGE_DEVICE_ID, task);
|
||||
nextEvent = RESPONSE_RECEIVED_BY_EDGE_DEVICE_TO_RELAY_MOBILE_DEVICE;
|
||||
nextDeviceForNetworkModel = SimSettings.GENERIC_EDGE_DEVICE_ID + 1;
|
||||
delayType = NETWORK_DELAY_TYPES.MAN_DELAY;
|
||||
}
|
||||
|
||||
if(delay > 0)
|
||||
{
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().getLocation(task.getMobileDeviceId(),CloudSim.clock()+delay);
|
||||
if(task.getSubmittedLocation().getServingWlanId() == currentLocation.getServingWlanId())
|
||||
{
|
||||
networkModel.downloadStarted(currentLocation, nextDeviceForNetworkModel);
|
||||
SimLogger.getInstance().setDownloadDelay(task.getCloudletId(), delay, delayType);
|
||||
|
||||
schedule(getId(), delay, nextEvent, task);
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToMobility(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToBandwidth(task.getCloudletId(), CloudSim.clock(), delayType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void processOtherEvent(SimEvent ev) {
|
||||
if (ev == null) {
|
||||
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - an event is null! Terminating simulation...");
|
||||
System.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
|
||||
switch (ev.getTag()) {
|
||||
case UPDATE_MM1_QUEUE_MODEL:
|
||||
{
|
||||
((SampleNetworkModel)networkModel).updateMM1QueeuModel();
|
||||
schedule(getId(), MM1_QUEUE_MODEL_UPDATE_INTEVAL, UPDATE_MM1_QUEUE_MODEL);
|
||||
|
||||
break;
|
||||
}
|
||||
case REQUEST_RECEIVED_BY_CLOUD:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
submitTaskToVm(task, SimSettings.VM_TYPES.CLOUD_VM);
|
||||
break;
|
||||
}
|
||||
case REQUEST_RECEIVED_BY_EDGE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
submitTaskToVm(task, SimSettings.VM_TYPES.EDGE_VM);
|
||||
break;
|
||||
}
|
||||
case REQUEST_RECEIVED_BY_REMOTE_EDGE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID+1);
|
||||
submitTaskToVm(task, SimSettings.VM_TYPES.EDGE_VM);
|
||||
|
||||
break;
|
||||
}
|
||||
case REQUEST_RECEIVED_BY_EDGE_DEVICE_TO_RELAY_NEIGHBOR:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
|
||||
double manDelay = networkModel.getUploadDelay(SimSettings.GENERIC_EDGE_DEVICE_ID, SimSettings.GENERIC_EDGE_DEVICE_ID, task);
|
||||
if(manDelay>0){
|
||||
networkModel.uploadStarted(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID+1);
|
||||
SimLogger.getInstance().setUploadDelay(task.getCloudletId(), manDelay, NETWORK_DELAY_TYPES.MAN_DELAY);
|
||||
schedule(getId(), manDelay, REQUEST_RECEIVED_BY_REMOTE_EDGE_DEVICE, task);
|
||||
}
|
||||
else
|
||||
{
|
||||
//SimLogger.printLine("Task #" + task.getCloudletId() + " cannot assign to any VM");
|
||||
SimLogger.getInstance().rejectedDueToBandwidth(
|
||||
task.getCloudletId(),
|
||||
CloudSim.clock(),
|
||||
SimSettings.VM_TYPES.EDGE_VM.ordinal(),
|
||||
NETWORK_DELAY_TYPES.MAN_DELAY);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case RESPONSE_RECEIVED_BY_EDGE_DEVICE_TO_RELAY_MOBILE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
networkModel.downloadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID+1);
|
||||
|
||||
//SimLogger.printLine(CloudSim.clock() + ": " + getName() + ": task #" + task.getCloudletId() + " received from edge");
|
||||
double delay = networkModel.getDownloadDelay(task.getAssociatedHostId(), task.getMobileDeviceId(), task);
|
||||
|
||||
if(delay > 0)
|
||||
{
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().getLocation(task.getMobileDeviceId(),CloudSim.clock()+delay);
|
||||
if(task.getSubmittedLocation().getServingWlanId() == currentLocation.getServingWlanId())
|
||||
{
|
||||
networkModel.downloadStarted(currentLocation, SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
SimLogger.getInstance().setDownloadDelay(task.getCloudletId(), delay, NETWORK_DELAY_TYPES.WLAN_DELAY);
|
||||
schedule(getId(), delay, RESPONSE_RECEIVED_BY_MOBILE_DEVICE, task);
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToMobility(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToBandwidth(task.getCloudletId(), CloudSim.clock(), NETWORK_DELAY_TYPES.WLAN_DELAY);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case RESPONSE_RECEIVED_BY_MOBILE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
if(task.getAssociatedDatacenterId() == SimSettings.CLOUD_DATACENTER_ID)
|
||||
networkModel.downloadFinished(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
else
|
||||
networkModel.downloadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
|
||||
SimLogger.getInstance().taskEnded(task.getCloudletId(), CloudSim.clock());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - event unknown by this DatacenterBroker. Terminating simulation...");
|
||||
System.exit(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void submitTask(EdgeTask edgeTask) {
|
||||
int vmType=0;
|
||||
int nextEvent=0;
|
||||
int nextDeviceForNetworkModel;
|
||||
NETWORK_DELAY_TYPES delayType;
|
||||
double delay=0;
|
||||
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
|
||||
//create a task
|
||||
Task task = createTask(edgeTask);
|
||||
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().
|
||||
getLocation(task.getMobileDeviceId(), CloudSim.clock());
|
||||
|
||||
//set location of the mobile device which generates this task
|
||||
task.setSubmittedLocation(currentLocation);
|
||||
|
||||
//add related task to log list
|
||||
SimLogger.getInstance().addLog(task.getCloudletId(),
|
||||
task.getTaskType(),
|
||||
(int)task.getCloudletLength(),
|
||||
(int)task.getCloudletFileSize(),
|
||||
(int)task.getCloudletOutputSize());
|
||||
|
||||
int nextHopId = SimManager.getInstance().getEdgeOrchestrator().getDeviceToOffload(task);
|
||||
|
||||
if(nextHopId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
delay = networkModel.getUploadDelay(task.getMobileDeviceId(), SimSettings.CLOUD_DATACENTER_ID, task);
|
||||
vmType = SimSettings.VM_TYPES.CLOUD_VM.ordinal();
|
||||
nextEvent = REQUEST_RECEIVED_BY_CLOUD;
|
||||
delayType = NETWORK_DELAY_TYPES.WAN_DELAY;
|
||||
nextDeviceForNetworkModel = SimSettings.CLOUD_DATACENTER_ID;
|
||||
}
|
||||
else {
|
||||
delay = networkModel.getUploadDelay(task.getMobileDeviceId(), SimSettings.GENERIC_EDGE_DEVICE_ID, task);
|
||||
vmType = SimSettings.VM_TYPES.EDGE_VM.ordinal();
|
||||
nextEvent = REQUEST_RECEIVED_BY_EDGE_DEVICE;
|
||||
delayType = NETWORK_DELAY_TYPES.WLAN_DELAY;
|
||||
nextDeviceForNetworkModel = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
}
|
||||
|
||||
if(delay>0){
|
||||
|
||||
Vm selectedVM = SimManager.getInstance().getEdgeOrchestrator().getVmToOffload(task, nextHopId);
|
||||
|
||||
if(selectedVM != null){
|
||||
//set related host id
|
||||
task.setAssociatedDatacenterId(nextHopId);
|
||||
|
||||
//set related host id
|
||||
task.setAssociatedHostId(selectedVM.getHost().getId());
|
||||
|
||||
//set related vm id
|
||||
task.setAssociatedVmId(selectedVM.getId());
|
||||
|
||||
//bind task to related VM
|
||||
getCloudletList().add(task);
|
||||
bindCloudletToVm(task.getCloudletId(), selectedVM.getId());
|
||||
|
||||
if(selectedVM instanceof EdgeVM){
|
||||
EdgeHost host = (EdgeHost)(selectedVM.getHost());
|
||||
|
||||
//if neighbor edge device is selected
|
||||
if(host.getLocation().getServingWlanId() != task.getSubmittedLocation().getServingWlanId()){
|
||||
nextEvent = REQUEST_RECEIVED_BY_EDGE_DEVICE_TO_RELAY_NEIGHBOR;
|
||||
}
|
||||
}
|
||||
networkModel.uploadStarted(currentLocation, nextDeviceForNetworkModel);
|
||||
|
||||
SimLogger.getInstance().taskStarted(task.getCloudletId(), CloudSim.clock());
|
||||
SimLogger.getInstance().setUploadDelay(task.getCloudletId(), delay, delayType);
|
||||
|
||||
schedule(getId(), delay, nextEvent, task);
|
||||
}
|
||||
else{
|
||||
//SimLogger.printLine("Task #" + task.getCloudletId() + " cannot assign to any VM");
|
||||
SimLogger.getInstance().rejectedDueToVMCapacity(task.getCloudletId(), CloudSim.clock(), vmType);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//SimLogger.printLine("Task #" + task.getCloudletId() + " cannot assign to any VM");
|
||||
SimLogger.getInstance().rejectedDueToBandwidth(task.getCloudletId(), CloudSim.clock(), vmType, delayType);
|
||||
}
|
||||
}
|
||||
|
||||
private void submitTaskToVm(Task task, SimSettings.VM_TYPES vmType) {
|
||||
//SimLogger.printLine(CloudSim.clock() + ": Cloudlet#" + task.getCloudletId() + " is submitted to VM#" + task.getVmId());
|
||||
schedule(getVmsToDatacentersMap().get(task.getVmId()), 0, CloudSimTags.CLOUDLET_SUBMIT, task);
|
||||
|
||||
SimLogger.getInstance().taskAssigned(task.getCloudletId(),
|
||||
task.getAssociatedDatacenterId(),
|
||||
task.getAssociatedHostId(),
|
||||
task.getAssociatedVmId(),
|
||||
vmType.ordinal());
|
||||
}
|
||||
|
||||
private Task createTask(EdgeTask edgeTask){
|
||||
UtilizationModel utilizationModel = new UtilizationModelFull(); /*UtilizationModelStochastic*/
|
||||
UtilizationModel utilizationModelCPU = getCpuUtilizationModel();
|
||||
|
||||
Task task = new Task(edgeTask.mobileDeviceId, ++taskIdCounter,
|
||||
edgeTask.length, edgeTask.pesNumber,
|
||||
edgeTask.inputFileSize, edgeTask.outputFileSize,
|
||||
utilizationModelCPU, utilizationModel, utilizationModel);
|
||||
|
||||
//set the owner of this task
|
||||
task.setUserId(this.getId());
|
||||
task.setTaskType(edgeTask.taskType);
|
||||
|
||||
if (utilizationModelCPU instanceof CpuUtilizationModel_Custom) {
|
||||
((CpuUtilizationModel_Custom)utilizationModelCPU).setTask(task);
|
||||
}
|
||||
|
||||
return task;
|
||||
}
|
||||
}
|
@ -0,0 +1,432 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Network Model
|
||||
*
|
||||
* Description:
|
||||
* SampleNetworkModel uses
|
||||
* -> the result of an empirical study for the WLAN and WAN delays
|
||||
* The experimental network model is developed
|
||||
* by taking measurements from the real life deployments.
|
||||
*
|
||||
* -> MMPP/MMPP/1 queue model for MAN delay
|
||||
* MAN delay is observed via a single server queue model with
|
||||
* Markov-modulated Poisson process (MMPP) arrivals.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.applications.sample_app2;
|
||||
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.edge_client.Task;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
public class SampleNetworkModel extends NetworkModel {
|
||||
public static enum NETWORK_TYPE {WLAN, LAN};
|
||||
public static enum LINK_TYPE {DOWNLOAD, UPLOAD};
|
||||
public static double MAN_BW = 1300*1024; //Kbps
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private int manClients;
|
||||
private int[] wanClients;
|
||||
private int[] wlanClients;
|
||||
|
||||
private double lastMM1QueeuUpdateTime;
|
||||
private double ManPoissonMeanForDownload; //seconds
|
||||
private double ManPoissonMeanForUpload; //seconds
|
||||
|
||||
private double avgManTaskInputSize; //bytes
|
||||
private double avgManTaskOutputSize; //bytes
|
||||
|
||||
//record last n task statistics during MM1_QUEUE_MODEL_UPDATE_INTEVAL seconds to simulate mmpp/m/1 queue model
|
||||
private double totalManTaskInputSize;
|
||||
private double totalManTaskOutputSize;
|
||||
private double numOfManTaskForDownload;
|
||||
private double numOfManTaskForUpload;
|
||||
|
||||
public static final double[] experimentalWlanDelay = {
|
||||
/*1 Client*/ 88040.279 /*(Kbps)*/,
|
||||
/*2 Clients*/ 45150.982 /*(Kbps)*/,
|
||||
/*3 Clients*/ 30303.641 /*(Kbps)*/,
|
||||
/*4 Clients*/ 27617.211 /*(Kbps)*/,
|
||||
/*5 Clients*/ 24868.616 /*(Kbps)*/,
|
||||
/*6 Clients*/ 22242.296 /*(Kbps)*/,
|
||||
/*7 Clients*/ 20524.064 /*(Kbps)*/,
|
||||
/*8 Clients*/ 18744.889 /*(Kbps)*/,
|
||||
/*9 Clients*/ 17058.827 /*(Kbps)*/,
|
||||
/*10 Clients*/ 15690.455 /*(Kbps)*/,
|
||||
/*11 Clients*/ 14127.744 /*(Kbps)*/,
|
||||
/*12 Clients*/ 13522.408 /*(Kbps)*/,
|
||||
/*13 Clients*/ 13177.631 /*(Kbps)*/,
|
||||
/*14 Clients*/ 12811.330 /*(Kbps)*/,
|
||||
/*15 Clients*/ 12584.387 /*(Kbps)*/,
|
||||
/*15 Clients*/ 12135.161 /*(Kbps)*/,
|
||||
/*16 Clients*/ 11705.638 /*(Kbps)*/,
|
||||
/*17 Clients*/ 11276.116 /*(Kbps)*/,
|
||||
/*18 Clients*/ 10846.594 /*(Kbps)*/,
|
||||
/*19 Clients*/ 10417.071 /*(Kbps)*/,
|
||||
/*20 Clients*/ 9987.549 /*(Kbps)*/,
|
||||
/*21 Clients*/ 9367.587 /*(Kbps)*/,
|
||||
/*22 Clients*/ 8747.625 /*(Kbps)*/,
|
||||
/*23 Clients*/ 8127.663 /*(Kbps)*/,
|
||||
/*24 Clients*/ 7907.701 /*(Kbps)*/,
|
||||
/*25 Clients*/ 7887.739 /*(Kbps)*/,
|
||||
/*26 Clients*/ 7690.831 /*(Kbps)*/,
|
||||
/*27 Clients*/ 7393.922 /*(Kbps)*/,
|
||||
/*28 Clients*/ 7297.014 /*(Kbps)*/,
|
||||
/*29 Clients*/ 7100.106 /*(Kbps)*/,
|
||||
/*30 Clients*/ 6903.197 /*(Kbps)*/,
|
||||
/*31 Clients*/ 6701.986 /*(Kbps)*/,
|
||||
/*32 Clients*/ 6500.776 /*(Kbps)*/,
|
||||
/*33 Clients*/ 6399.565 /*(Kbps)*/,
|
||||
/*34 Clients*/ 6098.354 /*(Kbps)*/,
|
||||
/*35 Clients*/ 5897.143 /*(Kbps)*/,
|
||||
/*36 Clients*/ 5552.127 /*(Kbps)*/,
|
||||
/*37 Clients*/ 5207.111 /*(Kbps)*/,
|
||||
/*38 Clients*/ 4862.096 /*(Kbps)*/,
|
||||
/*39 Clients*/ 4517.080 /*(Kbps)*/,
|
||||
/*40 Clients*/ 4172.064 /*(Kbps)*/,
|
||||
/*41 Clients*/ 4092.922 /*(Kbps)*/,
|
||||
/*42 Clients*/ 4013.781 /*(Kbps)*/,
|
||||
/*43 Clients*/ 3934.639 /*(Kbps)*/,
|
||||
/*44 Clients*/ 3855.498 /*(Kbps)*/,
|
||||
/*45 Clients*/ 3776.356 /*(Kbps)*/,
|
||||
/*46 Clients*/ 3697.215 /*(Kbps)*/,
|
||||
/*47 Clients*/ 3618.073 /*(Kbps)*/,
|
||||
/*48 Clients*/ 3538.932 /*(Kbps)*/,
|
||||
/*49 Clients*/ 3459.790 /*(Kbps)*/,
|
||||
/*50 Clients*/ 3380.649 /*(Kbps)*/,
|
||||
/*51 Clients*/ 3274.611 /*(Kbps)*/,
|
||||
/*52 Clients*/ 3168.573 /*(Kbps)*/,
|
||||
/*53 Clients*/ 3062.536 /*(Kbps)*/,
|
||||
/*54 Clients*/ 2956.498 /*(Kbps)*/,
|
||||
/*55 Clients*/ 2850.461 /*(Kbps)*/,
|
||||
/*56 Clients*/ 2744.423 /*(Kbps)*/,
|
||||
/*57 Clients*/ 2638.386 /*(Kbps)*/,
|
||||
/*58 Clients*/ 2532.348 /*(Kbps)*/,
|
||||
/*59 Clients*/ 2426.310 /*(Kbps)*/,
|
||||
/*60 Clients*/ 2320.273 /*(Kbps)*/,
|
||||
/*61 Clients*/ 2283.828 /*(Kbps)*/,
|
||||
/*62 Clients*/ 2247.383 /*(Kbps)*/,
|
||||
/*63 Clients*/ 2210.939 /*(Kbps)*/,
|
||||
/*64 Clients*/ 2174.494 /*(Kbps)*/,
|
||||
/*65 Clients*/ 2138.049 /*(Kbps)*/,
|
||||
/*66 Clients*/ 2101.604 /*(Kbps)*/,
|
||||
/*67 Clients*/ 2065.160 /*(Kbps)*/,
|
||||
/*68 Clients*/ 2028.715 /*(Kbps)*/,
|
||||
/*69 Clients*/ 1992.270 /*(Kbps)*/,
|
||||
/*70 Clients*/ 1955.825 /*(Kbps)*/,
|
||||
/*71 Clients*/ 1946.788 /*(Kbps)*/,
|
||||
/*72 Clients*/ 1937.751 /*(Kbps)*/,
|
||||
/*73 Clients*/ 1928.714 /*(Kbps)*/,
|
||||
/*74 Clients*/ 1919.677 /*(Kbps)*/,
|
||||
/*75 Clients*/ 1910.640 /*(Kbps)*/,
|
||||
/*76 Clients*/ 1901.603 /*(Kbps)*/,
|
||||
/*77 Clients*/ 1892.566 /*(Kbps)*/,
|
||||
/*78 Clients*/ 1883.529 /*(Kbps)*/,
|
||||
/*79 Clients*/ 1874.492 /*(Kbps)*/,
|
||||
/*80 Clients*/ 1865.455 /*(Kbps)*/,
|
||||
/*81 Clients*/ 1833.185 /*(Kbps)*/,
|
||||
/*82 Clients*/ 1800.915 /*(Kbps)*/,
|
||||
/*83 Clients*/ 1768.645 /*(Kbps)*/,
|
||||
/*84 Clients*/ 1736.375 /*(Kbps)*/,
|
||||
/*85 Clients*/ 1704.106 /*(Kbps)*/,
|
||||
/*86 Clients*/ 1671.836 /*(Kbps)*/,
|
||||
/*87 Clients*/ 1639.566 /*(Kbps)*/,
|
||||
/*88 Clients*/ 1607.296 /*(Kbps)*/,
|
||||
/*89 Clients*/ 1575.026 /*(Kbps)*/,
|
||||
/*90 Clients*/ 1542.756 /*(Kbps)*/,
|
||||
/*91 Clients*/ 1538.544 /*(Kbps)*/,
|
||||
/*92 Clients*/ 1534.331 /*(Kbps)*/,
|
||||
/*93 Clients*/ 1530.119 /*(Kbps)*/,
|
||||
/*94 Clients*/ 1525.906 /*(Kbps)*/,
|
||||
/*95 Clients*/ 1521.694 /*(Kbps)*/,
|
||||
/*96 Clients*/ 1517.481 /*(Kbps)*/,
|
||||
/*97 Clients*/ 1513.269 /*(Kbps)*/,
|
||||
/*98 Clients*/ 1509.056 /*(Kbps)*/,
|
||||
/*99 Clients*/ 1504.844 /*(Kbps)*/,
|
||||
/*100 Clients*/ 1500.631 /*(Kbps)*/
|
||||
};
|
||||
|
||||
public static final double[] experimentalWanDelay = {
|
||||
/*1 Client*/ 20703.973 /*(Kbps)*/,
|
||||
/*2 Clients*/ 12023.957 /*(Kbps)*/,
|
||||
/*3 Clients*/ 9887.785 /*(Kbps)*/,
|
||||
/*4 Clients*/ 8915.775 /*(Kbps)*/,
|
||||
/*5 Clients*/ 8259.277 /*(Kbps)*/,
|
||||
/*6 Clients*/ 7560.574 /*(Kbps)*/,
|
||||
/*7 Clients*/ 7262.140 /*(Kbps)*/,
|
||||
/*8 Clients*/ 7155.361 /*(Kbps)*/,
|
||||
/*9 Clients*/ 7041.153 /*(Kbps)*/,
|
||||
/*10 Clients*/ 6994.595 /*(Kbps)*/,
|
||||
/*11 Clients*/ 6653.232 /*(Kbps)*/,
|
||||
/*12 Clients*/ 6111.868 /*(Kbps)*/,
|
||||
/*13 Clients*/ 5570.505 /*(Kbps)*/,
|
||||
/*14 Clients*/ 5029.142 /*(Kbps)*/,
|
||||
/*15 Clients*/ 4487.779 /*(Kbps)*/,
|
||||
/*16 Clients*/ 3899.729 /*(Kbps)*/,
|
||||
/*17 Clients*/ 3311.680 /*(Kbps)*/,
|
||||
/*18 Clients*/ 2723.631 /*(Kbps)*/,
|
||||
/*19 Clients*/ 2135.582 /*(Kbps)*/,
|
||||
/*20 Clients*/ 1547.533 /*(Kbps)*/,
|
||||
/*21 Clients*/ 1500.252 /*(Kbps)*/,
|
||||
/*22 Clients*/ 1452.972 /*(Kbps)*/,
|
||||
/*23 Clients*/ 1405.692 /*(Kbps)*/,
|
||||
/*24 Clients*/ 1358.411 /*(Kbps)*/,
|
||||
/*25 Clients*/ 1311.131 /*(Kbps)*/
|
||||
};
|
||||
|
||||
public SampleNetworkModel(int _numberOfMobileDevices, String _simScenario) {
|
||||
super(_numberOfMobileDevices, _simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
wanClients = new int[SimSettings.getInstance().getNumOfEdgeDatacenters()]; //we have one access point for each datacenter
|
||||
wlanClients = new int[SimSettings.getInstance().getNumOfEdgeDatacenters()]; //we have one access point for each datacenter
|
||||
|
||||
int numOfApp = SimSettings.getInstance().getTaskLookUpTable().length;
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
for(int taskIndex=0; taskIndex<numOfApp; taskIndex++) {
|
||||
if(SS.getTaskLookUpTable()[taskIndex][0] == 0) {
|
||||
SimLogger.printLine("Usage percantage of task " + taskIndex + " is 0! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
else{
|
||||
double weight = SS.getTaskLookUpTable()[taskIndex][0]/(double)100;
|
||||
|
||||
//assume half of the tasks use the MAN at the beginning
|
||||
ManPoissonMeanForDownload += ((SS.getTaskLookUpTable()[taskIndex][2])*weight) * 4;
|
||||
ManPoissonMeanForUpload = ManPoissonMeanForDownload;
|
||||
|
||||
avgManTaskInputSize += SS.getTaskLookUpTable()[taskIndex][5]*weight;
|
||||
avgManTaskOutputSize += SS.getTaskLookUpTable()[taskIndex][6]*weight;
|
||||
}
|
||||
}
|
||||
|
||||
ManPoissonMeanForDownload = ManPoissonMeanForDownload/numOfApp;
|
||||
ManPoissonMeanForUpload = ManPoissonMeanForUpload/numOfApp;
|
||||
avgManTaskInputSize = avgManTaskInputSize/numOfApp;
|
||||
avgManTaskOutputSize = avgManTaskOutputSize/numOfApp;
|
||||
|
||||
lastMM1QueeuUpdateTime = SimSettings.CLIENT_ACTIVITY_START_TIME;
|
||||
totalManTaskOutputSize = 0;
|
||||
numOfManTaskForDownload = 0;
|
||||
totalManTaskInputSize = 0;
|
||||
numOfManTaskForUpload = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* source device is always mobile device in our simulation scenarios!
|
||||
*/
|
||||
@Override
|
||||
public double getUploadDelay(int sourceDeviceId, int destDeviceId, Task task) {
|
||||
double delay = 0;
|
||||
|
||||
//special case for man communication
|
||||
if(sourceDeviceId == destDeviceId && sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID){
|
||||
return delay = getManUploadDelay();
|
||||
}
|
||||
|
||||
Location accessPointLocation = SimManager.getInstance().getMobilityModel().getLocation(sourceDeviceId,CloudSim.clock());
|
||||
|
||||
//mobile device to cloud server
|
||||
if(destDeviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
delay = getWanUploadDelay(accessPointLocation, task.getCloudletFileSize());
|
||||
}
|
||||
//mobile device to edge device (wifi access point)
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID) {
|
||||
delay = getWlanUploadDelay(accessPointLocation, task.getCloudletFileSize());
|
||||
}
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* destination device is always mobile device in our simulation scenarios!
|
||||
*/
|
||||
@Override
|
||||
public double getDownloadDelay(int sourceDeviceId, int destDeviceId, Task task) {
|
||||
double delay = 0;
|
||||
|
||||
//special case for man communication
|
||||
if(sourceDeviceId == destDeviceId && sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID){
|
||||
return delay = getManDownloadDelay();
|
||||
}
|
||||
|
||||
Location accessPointLocation = SimManager.getInstance().getMobilityModel().getLocation(destDeviceId,CloudSim.clock());
|
||||
|
||||
//cloud server to mobile device
|
||||
if(sourceDeviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
delay = getWanDownloadDelay(accessPointLocation, task.getCloudletOutputSize());
|
||||
}
|
||||
//edge device (wifi access point) to mobile device
|
||||
else{
|
||||
delay = getWlanDownloadDelay(accessPointLocation, task.getCloudletOutputSize());
|
||||
}
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadStarted(Location accessPointLocation, int destDeviceId) {
|
||||
if(destDeviceId == SimSettings.CLOUD_DATACENTER_ID)
|
||||
wanClients[accessPointLocation.getServingWlanId()]++;
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID)
|
||||
wlanClients[accessPointLocation.getServingWlanId()]++;
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients++;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknown device id in uploadStarted(). Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadFinished(Location accessPointLocation, int destDeviceId) {
|
||||
if(destDeviceId == SimSettings.CLOUD_DATACENTER_ID)
|
||||
wanClients[accessPointLocation.getServingWlanId()]--;
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID)
|
||||
wlanClients[accessPointLocation.getServingWlanId()]--;
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients--;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknown device id in uploadFinished(). Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadStarted(Location accessPointLocation, int sourceDeviceId) {
|
||||
if(sourceDeviceId == SimSettings.CLOUD_DATACENTER_ID)
|
||||
wanClients[accessPointLocation.getServingWlanId()]++;
|
||||
else if(sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID)
|
||||
wlanClients[accessPointLocation.getServingWlanId()]++;
|
||||
else if(sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients++;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknown device id in downloadStarted(). Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadFinished(Location accessPointLocation, int sourceDeviceId) {
|
||||
if(sourceDeviceId == SimSettings.CLOUD_DATACENTER_ID)
|
||||
wanClients[accessPointLocation.getServingWlanId()]--;
|
||||
else if(sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID)
|
||||
wlanClients[accessPointLocation.getServingWlanId()]--;
|
||||
else if(sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients--;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknown device id in downloadFinished(). Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private double getWlanDownloadDelay(Location accessPointLocation, double dataSize) {
|
||||
int numOfWlanUser = wlanClients[accessPointLocation.getServingWlanId()];
|
||||
double taskSizeInKb = dataSize * (double)8; //KB to Kb
|
||||
double result=0;
|
||||
|
||||
if(numOfWlanUser < experimentalWlanDelay.length)
|
||||
result = taskSizeInKb /*Kb*/ / (experimentalWlanDelay[numOfWlanUser] * (double) 3 ) /*Kbps*/; //802.11ac is around 3 times faster than 802.11n
|
||||
|
||||
//System.out.println("--> " + numOfWlanUser + " user, " + taskSizeInKb + " KB, " +result + " sec");
|
||||
return result;
|
||||
}
|
||||
|
||||
//wlan upload and download delay is symmetric in this model
|
||||
private double getWlanUploadDelay(Location accessPointLocation, double dataSize) {
|
||||
return getWlanDownloadDelay(accessPointLocation, dataSize);
|
||||
}
|
||||
|
||||
private double getWanDownloadDelay(Location accessPointLocation, double dataSize) {
|
||||
int numOfWanUser = wanClients[accessPointLocation.getServingWlanId()];
|
||||
double taskSizeInKb = dataSize * (double)8; //KB to Kb
|
||||
double result=0;
|
||||
|
||||
if(numOfWanUser < experimentalWanDelay.length)
|
||||
result = taskSizeInKb /*Kb*/ / (experimentalWanDelay[numOfWanUser]) /*Kbps*/;
|
||||
|
||||
//System.out.println("--> " + numOfWanUser + " user, " + taskSizeInKb + " KB, " +result + " sec");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//wan upload and download delay is symmetric in this model
|
||||
private double getWanUploadDelay(Location accessPointLocation, double dataSize) {
|
||||
return getWanDownloadDelay(accessPointLocation, dataSize);
|
||||
}
|
||||
|
||||
private double calculateMM1(double propogationDelay, double bandwidth /*Kbps*/, double PoissonMean, double avgTaskSize /*KB*/, int deviceCount){
|
||||
double mu=0, lamda=0;
|
||||
|
||||
avgTaskSize = avgTaskSize * 8; //convert from KB to Kb
|
||||
|
||||
lamda = ((double)1/(double)PoissonMean); //task per seconds
|
||||
mu = bandwidth /*Kbps*/ / avgTaskSize /*Kb*/; //task per seconds
|
||||
double result = (double)1 / (mu-lamda*(double)deviceCount);
|
||||
|
||||
if(result < 0)
|
||||
return 0;
|
||||
|
||||
result += propogationDelay;
|
||||
|
||||
return (result > 15) ? 0 : result;
|
||||
}
|
||||
|
||||
private double getManDownloadDelay() {
|
||||
double result = calculateMM1(SimSettings.getInstance().getInternalLanDelay(),
|
||||
MAN_BW,
|
||||
ManPoissonMeanForDownload,
|
||||
avgManTaskOutputSize,
|
||||
numberOfMobileDevices);
|
||||
|
||||
totalManTaskOutputSize += avgManTaskOutputSize;
|
||||
numOfManTaskForDownload++;
|
||||
|
||||
//System.out.println("--> " + SimManager.getInstance().getNumOfMobileDevice() + " user, " +result + " sec");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private double getManUploadDelay() {
|
||||
double result = calculateMM1(SimSettings.getInstance().getInternalLanDelay(),
|
||||
MAN_BW,
|
||||
ManPoissonMeanForUpload,
|
||||
avgManTaskInputSize,
|
||||
numberOfMobileDevices);
|
||||
|
||||
totalManTaskInputSize += avgManTaskInputSize;
|
||||
numOfManTaskForUpload++;
|
||||
|
||||
//System.out.println(CloudSim.clock() + " -> " + SimManager.getInstance().getNumOfMobileDevice() + " user, " + result + " sec");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void updateMM1QueeuModel(){
|
||||
double lastInterval = CloudSim.clock() - lastMM1QueeuUpdateTime;
|
||||
lastMM1QueeuUpdateTime = CloudSim.clock();
|
||||
|
||||
if(numOfManTaskForDownload != 0){
|
||||
ManPoissonMeanForDownload = lastInterval / (numOfManTaskForDownload / (double)numberOfMobileDevices);
|
||||
avgManTaskOutputSize = totalManTaskOutputSize / numOfManTaskForDownload;
|
||||
}
|
||||
if(numOfManTaskForUpload != 0){
|
||||
ManPoissonMeanForUpload = lastInterval / (numOfManTaskForUpload / (double)numberOfMobileDevices);
|
||||
avgManTaskInputSize = totalManTaskInputSize / numOfManTaskForUpload;
|
||||
}
|
||||
|
||||
totalManTaskOutputSize = 0;
|
||||
numOfManTaskForDownload = 0;
|
||||
totalManTaskInputSize = 0;
|
||||
numOfManTaskForUpload = 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Scenario Factory
|
||||
*
|
||||
* Description: Sample scenario factory providing the default
|
||||
* instances of required abstract classes
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.applications.sample_app2;
|
||||
|
||||
import edu.boun.edgecloudsim.cloud_server.CloudServerManager;
|
||||
import edu.boun.edgecloudsim.cloud_server.DefaultCloudServerManager;
|
||||
import edu.boun.edgecloudsim.core.ScenarioFactory;
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_server.DefaultEdgeServerManager;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeServerManager;
|
||||
import edu.boun.edgecloudsim.edge_client.MobileDeviceManager;
|
||||
import edu.boun.edgecloudsim.mobility.MobilityModel;
|
||||
import edu.boun.edgecloudsim.mobility.NomadicMobility;
|
||||
import edu.boun.edgecloudsim.task_generator.IdleActiveLoadGenerator;
|
||||
import edu.boun.edgecloudsim.task_generator.LoadGeneratorModel;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
|
||||
public class SampleScenarioFactory implements ScenarioFactory {
|
||||
private int numOfMobileDevice;
|
||||
private double simulationTime;
|
||||
private String orchestratorPolicy;
|
||||
private String simScenario;
|
||||
|
||||
SampleScenarioFactory(int _numOfMobileDevice,
|
||||
double _simulationTime,
|
||||
String _orchestratorPolicy,
|
||||
String _simScenario){
|
||||
orchestratorPolicy = _orchestratorPolicy;
|
||||
numOfMobileDevice = _numOfMobileDevice;
|
||||
simulationTime = _simulationTime;
|
||||
simScenario = _simScenario;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoadGeneratorModel getLoadGeneratorModel() {
|
||||
return new IdleActiveLoadGenerator(numOfMobileDevice, simulationTime, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EdgeOrchestrator getEdgeOrchestrator() {
|
||||
return new SampleEdgeOrchestrator(orchestratorPolicy, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobilityModel getMobilityModel() {
|
||||
return new NomadicMobility(numOfMobileDevice,simulationTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NetworkModel getNetworkModel() {
|
||||
return new SampleNetworkModel(numOfMobileDevice, simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EdgeServerManager getEdgeServerManager() {
|
||||
return new DefaultEdgeServerManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudServerManager getCloudServerManager() {
|
||||
return new DefaultCloudServerManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobileDeviceManager getMobileDeviceManager() throws Exception {
|
||||
return new SampleMobileDeviceManager();
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package edu.boun.edgecloudsim.cloud_server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Datacenter;
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
|
||||
public abstract class CloudServerManager {
|
||||
protected Datacenter localDatacenter;
|
||||
protected List<List<CloudVM>> vmList;
|
||||
|
||||
public CloudServerManager() {
|
||||
vmList = new ArrayList<List<CloudVM>>();
|
||||
}
|
||||
|
||||
public List<CloudVM> getVmList(int hostId){
|
||||
return vmList.get(hostId);
|
||||
}
|
||||
|
||||
public Datacenter getDatacenter(){
|
||||
return localDatacenter;
|
||||
}
|
||||
|
||||
/*
|
||||
* initialize edge server manager if needed
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/*
|
||||
* provides abstract Vm Allocation Policy for Cloud Datacenters
|
||||
*/
|
||||
public abstract VmAllocationPolicy getVmAllocationPolicy(List<? extends Host> list, int dataCenterIndex);
|
||||
|
||||
/*
|
||||
* Starts Datacenters
|
||||
*/
|
||||
public abstract void startDatacenters() throws Exception;
|
||||
|
||||
/*
|
||||
* Terminates Datacenters
|
||||
*/
|
||||
public abstract void terminateDatacenters();
|
||||
/*
|
||||
* Creates VM List
|
||||
*/
|
||||
public abstract void createVmList(int brockerId);
|
||||
|
||||
/*
|
||||
* returns average utilization of all VMs
|
||||
*/
|
||||
public abstract double getAvgUtilization();
|
||||
}
|
50
src/edu/boun/edgecloudsim/cloud_server/CloudVM.java
Normal file
50
src/edu/boun/edgecloudsim/cloud_server/CloudVM.java
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - CloudVM
|
||||
*
|
||||
* Description:
|
||||
* CloudVM adds vm type information over CloudSim's VM class
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.cloud_server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.CloudletScheduler;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class CloudVM extends Vm {
|
||||
private SimSettings.VM_TYPES type;
|
||||
|
||||
public CloudVM(int id, int userId, double mips, int numberOfPes, int ram,
|
||||
long bw, long size, String vmm, CloudletScheduler cloudletScheduler) {
|
||||
super(id, userId, mips, numberOfPes, ram, bw, size, vmm, cloudletScheduler);
|
||||
|
||||
type = SimSettings.VM_TYPES.CLOUD_VM;
|
||||
}
|
||||
|
||||
public SimSettings.VM_TYPES getVmType(){
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* dynamically reconfigures the mips value of a VM in CloudSim
|
||||
*
|
||||
* @param mips new mips value for this VM.
|
||||
*/
|
||||
public void reconfigureMips(double mips){
|
||||
super.setMips(mips);
|
||||
super.getHost().getVmScheduler().deallocatePesForVm(this);
|
||||
|
||||
List<Double> mipsShareAllocated = new ArrayList<Double>();
|
||||
for(int i= 0; i<getNumberOfPes(); i++)
|
||||
mipsShareAllocated.add(mips);
|
||||
|
||||
super.getHost().getVmScheduler().allocatePesForVm(this, mipsShareAllocated);
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Custom VM Allocation Policy for Cloud VMs
|
||||
*
|
||||
* Description:
|
||||
* VmAllocationPolicy_Custom implements VmAllocationPolicy to decide which.
|
||||
* VM is created on which host locatied on the datacenters. For those
|
||||
* who wants to add another Vm Allocation Policy to EdgeCloudSim should
|
||||
* provide another concreate instance of VmAllocationPolicy via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.cloud_server;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
/*
|
||||
* Same as VmAllocationPolicySimple.
|
||||
*/
|
||||
public class CloudVmAllocationPolicy_Custom extends VmAllocationPolicy {
|
||||
/** The vm table. */
|
||||
private Map<String, Host> vmTable;
|
||||
private static int createdVmNum;
|
||||
private int DataCenterIndex;
|
||||
|
||||
public CloudVmAllocationPolicy_Custom(List<? extends Host> list, int _DataCenterIndex) {
|
||||
super(list);
|
||||
|
||||
setVmTable(new HashMap<String, Host>());
|
||||
DataCenterIndex=_DataCenterIndex;
|
||||
createdVmNum = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allocateHostForVm(Vm vm) {
|
||||
boolean result = false;
|
||||
|
||||
if (!getVmTable().containsKey(vm.getUid()) && vm instanceof CloudVM) { // if this vm was not created
|
||||
int hostIndex = (vm.getId() - SimSettings.getInstance().getNumOfEdgeVMs()) / SimSettings.getInstance().getNumOfCloudVMsPerHost();
|
||||
|
||||
if(DataCenterIndex == SimSettings.CLOUD_DATACENTER_ID){
|
||||
Host host = getHostList().get(hostIndex);
|
||||
result = host.vmCreate(vm);
|
||||
|
||||
if (result) { // if vm were succesfully created in the host
|
||||
getVmTable().put(vm.getUid(), host);
|
||||
createdVmNum++;
|
||||
Log.formatLine("%.2f: Cloud VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock());
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allocateHostForVm(Vm vm, Host host) {
|
||||
if (host.vmCreate(vm)) { // if vm has been succesfully created in the host
|
||||
getVmTable().put(vm.getUid(), host);
|
||||
createdVmNum++;
|
||||
|
||||
Log.formatLine("%.2f: Cloud VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> optimizeAllocation(
|
||||
List<? extends Vm> vmList) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deallocateHostForVm(Vm vm) {
|
||||
Host host = getVmTable().remove(vm.getUid());
|
||||
if (host != null) {
|
||||
host.vmDestroy(vm);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Host getHost(Vm vm) {
|
||||
return getVmTable().get(vm.getUid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Host getHost(int vmId, int userId) {
|
||||
return getVmTable().get(Vm.getUid(userId, vmId));
|
||||
}
|
||||
|
||||
public static int getCreatedVmNum(){
|
||||
return createdVmNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the vm table.
|
||||
*
|
||||
* @return the vm table
|
||||
*/
|
||||
public Map<String, Host> getVmTable() {
|
||||
return vmTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the vm table.
|
||||
*
|
||||
* @param vmTable the vm table
|
||||
*/
|
||||
protected void setVmTable(Map<String, Host> vmTable) {
|
||||
this.vmTable = vmTable;
|
||||
}
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Cloud Server Manager
|
||||
*
|
||||
* Description:
|
||||
* DefaultCloudServerManager is responsible for creating datacenters, hosts and VMs.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.cloud_server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.CloudletSchedulerTimeShared;
|
||||
import org.cloudbus.cloudsim.Datacenter;
|
||||
import org.cloudbus.cloudsim.DatacenterCharacteristics;
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Pe;
|
||||
import org.cloudbus.cloudsim.Storage;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
import org.cloudbus.cloudsim.VmSchedulerSpaceShared;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.provisioners.BwProvisionerSimple;
|
||||
import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple;
|
||||
import org.cloudbus.cloudsim.provisioners.RamProvisionerSimple;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class DefaultCloudServerManager extends CloudServerManager{
|
||||
|
||||
public DefaultCloudServerManager() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public VmAllocationPolicy getVmAllocationPolicy(List<? extends Host> hostList, int dataCenterIndex) {
|
||||
return new CloudVmAllocationPolicy_Custom(hostList,dataCenterIndex);
|
||||
}
|
||||
|
||||
public void startDatacenters() throws Exception{
|
||||
localDatacenter = createDatacenter(SimSettings.CLOUD_DATACENTER_ID);
|
||||
}
|
||||
|
||||
public void terminateDatacenters(){
|
||||
localDatacenter.shutdownEntity();
|
||||
}
|
||||
|
||||
public void createVmList(int brockerId){
|
||||
//VMs should have unique IDs, so create Cloud VMs after Edge VMs
|
||||
int vmCounter=SimSettings.getInstance().getNumOfEdgeVMs();
|
||||
|
||||
//Create VMs for each hosts
|
||||
for (int i = 0; i < SimSettings.getInstance().getNumOfCoudHost(); i++) {
|
||||
vmList.add(i, new ArrayList<CloudVM>());
|
||||
for(int j = 0; j < SimSettings.getInstance().getNumOfCloudVMsPerHost(); j++){
|
||||
String vmm = "Xen";
|
||||
int numOfCores = SimSettings.getInstance().getCoreForCloudVM();
|
||||
double mips = SimSettings.getInstance().getMipsForCloudVM();
|
||||
int ram = SimSettings.getInstance().getRamForCloudVM();
|
||||
long storage = SimSettings.getInstance().getStorageForCloudVM();
|
||||
long bandwidth = 0;
|
||||
|
||||
//VM Parameters
|
||||
CloudVM vm = new CloudVM(vmCounter, brockerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared());
|
||||
vmList.get(i).add(vm);
|
||||
vmCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//average utilization of all VMs
|
||||
public double getAvgUtilization(){
|
||||
double totalUtilization = 0;
|
||||
double vmCounter = 0;
|
||||
|
||||
List<? extends Host> list = localDatacenter.getHostList();
|
||||
// for each host...
|
||||
for (int hostIndex=0; hostIndex < list.size(); hostIndex++) {
|
||||
List<CloudVM> vmArray = SimManager.getInstance().getCloudServerManager().getVmList(hostIndex);
|
||||
//for each vm...
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
totalUtilization += vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
vmCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
return totalUtilization / vmCounter;
|
||||
}
|
||||
|
||||
private Datacenter createDatacenter(int index) throws Exception{
|
||||
String arch = "x86";
|
||||
String os = "Linux";
|
||||
String vmm = "Xen";
|
||||
double costPerBw = 0;
|
||||
double costPerSec = 0;
|
||||
double costPerMem = 0;
|
||||
double costPerStorage = 0;
|
||||
|
||||
List<Host> hostList=createHosts();
|
||||
|
||||
String name = "CloudDatacenter_" + Integer.toString(index);
|
||||
double time_zone = 3.0; // time zone this resource located
|
||||
LinkedList<Storage> storageList = new LinkedList<Storage>(); //we are not adding SAN devices by now
|
||||
|
||||
// 5. Create a DatacenterCharacteristics object that stores the
|
||||
// properties of a data center: architecture, OS, list of
|
||||
// Machines, allocation policy: time- or space-shared, time zone
|
||||
// and its price (G$/Pe time unit).
|
||||
DatacenterCharacteristics characteristics = new DatacenterCharacteristics(
|
||||
arch, os, vmm, hostList, time_zone, costPerSec, costPerMem, costPerStorage, costPerBw);
|
||||
|
||||
// 6. Finally, we need to create a PowerDatacenter object.
|
||||
Datacenter datacenter = null;
|
||||
|
||||
VmAllocationPolicy vm_policy = getVmAllocationPolicy(hostList,index);
|
||||
datacenter = new Datacenter(name, characteristics, vm_policy, storageList, 0);
|
||||
|
||||
return datacenter;
|
||||
}
|
||||
|
||||
private List<Host> createHosts(){
|
||||
// Here are the steps needed to create a PowerDatacenter:
|
||||
// 1. We need to create a list to store one or more Machines
|
||||
List<Host> hostList = new ArrayList<Host>();
|
||||
|
||||
for (int i = 0; i < SimSettings.getInstance().getNumOfCoudHost(); i++) {
|
||||
int numOfVMPerHost = SimSettings.getInstance().getNumOfCloudVMsPerHost();
|
||||
int numOfCores = SimSettings.getInstance().getCoreForCloudVM() * numOfVMPerHost;
|
||||
double mips = SimSettings.getInstance().getMipsForCloudVM() * numOfVMPerHost;
|
||||
int ram = SimSettings.getInstance().getRamForCloudVM() * numOfVMPerHost;
|
||||
long storage = SimSettings.getInstance().getStorageForCloudVM() * numOfVMPerHost;
|
||||
long bandwidth = 0;
|
||||
|
||||
// 2. A Machine contains one or more PEs or CPUs/Cores. Therefore, should
|
||||
// create a list to store these PEs before creating
|
||||
// a Machine.
|
||||
List<Pe> peList = new ArrayList<Pe>();
|
||||
|
||||
// 3. Create PEs and add these into the list.
|
||||
//for a quad-core machine, a list of 4 PEs is required:
|
||||
for(int j=0; j<numOfCores; j++){
|
||||
peList.add(new Pe(j, new PeProvisionerSimple(mips))); // need to store Pe id and MIPS Rating
|
||||
}
|
||||
|
||||
//4. Create Hosts with its id and list of PEs and add them to the list of machines
|
||||
Host host = new Host(
|
||||
//Hosts should have unique IDs, so create Cloud Hosts after Edge Hosts
|
||||
i+SimSettings.getInstance().getNumOfEdgeHosts(),
|
||||
new RamProvisionerSimple(ram),
|
||||
new BwProvisionerSimple(bandwidth), //kbps
|
||||
storage,
|
||||
peList,
|
||||
new VmSchedulerSpaceShared(peList)
|
||||
);
|
||||
hostList.add(host);
|
||||
}
|
||||
|
||||
return hostList;
|
||||
}
|
||||
}
|
@ -1,57 +1,59 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Scenarion Factory interface
|
||||
*
|
||||
* Description:
|
||||
* ScenarioFactory responsible for providing customizable components
|
||||
* such as Network Model, Mobility Model, Edge Orchestrator.
|
||||
* This interface is very critical for using custom models on EdgeCloudSim
|
||||
* This interface should be implemented by EdgeCloudSim users
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.mobility.MobilityModel;
|
||||
import edu.boun.edgecloudsim.task_generator.LoadGeneratorModel;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
|
||||
public interface ScenarioFactory {
|
||||
/**
|
||||
* provides abstract Load Generator Model
|
||||
*/
|
||||
public LoadGeneratorModel getLoadGeneratorModel();
|
||||
|
||||
/**
|
||||
* provides abstract Edge Orchestrator
|
||||
*/
|
||||
public EdgeOrchestrator getEdgeOrchestrator();
|
||||
|
||||
/**
|
||||
* provides abstract Mobility Model
|
||||
*/
|
||||
public MobilityModel getMobilityModel();
|
||||
|
||||
/**
|
||||
* provides abstract Network Model
|
||||
*/
|
||||
public NetworkModel getNetworkModel();
|
||||
|
||||
/**
|
||||
* provides abstract CPU Utilization Model
|
||||
*/
|
||||
public UtilizationModel getCpuUtilizationModel(SimSettings.APP_TYPES _taskType);
|
||||
|
||||
/**
|
||||
* provides abstract Vm Allocation Policy
|
||||
*/
|
||||
public VmAllocationPolicy getVmAllocationPolicy(List<? extends Host> list, int dataCenterIndex);
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Scenarion Factory interface
|
||||
*
|
||||
* Description:
|
||||
* ScenarioFactory responsible for providing customizable components
|
||||
* such as Network Model, Mobility Model, Edge Orchestrator.
|
||||
* This interface is very critical for using custom models on EdgeCloudSim
|
||||
* This interface should be implemented by EdgeCloudSim users
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.core;
|
||||
|
||||
import edu.boun.edgecloudsim.cloud_server.CloudServerManager;
|
||||
import edu.boun.edgecloudsim.edge_client.MobileDeviceManager;
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeServerManager;
|
||||
import edu.boun.edgecloudsim.mobility.MobilityModel;
|
||||
import edu.boun.edgecloudsim.task_generator.LoadGeneratorModel;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
|
||||
public interface ScenarioFactory {
|
||||
/**
|
||||
* provides abstract Load Generator Model
|
||||
*/
|
||||
public LoadGeneratorModel getLoadGeneratorModel();
|
||||
|
||||
/**
|
||||
* provides abstract Edge Orchestrator
|
||||
*/
|
||||
public EdgeOrchestrator getEdgeOrchestrator();
|
||||
|
||||
/**
|
||||
* provides abstract Mobility Model
|
||||
*/
|
||||
public MobilityModel getMobilityModel();
|
||||
|
||||
/**
|
||||
* provides abstract Network Model
|
||||
*/
|
||||
public NetworkModel getNetworkModel();
|
||||
|
||||
/**
|
||||
* provides abstract Edge Server Model
|
||||
*/
|
||||
public EdgeServerManager getEdgeServerManager();
|
||||
|
||||
/**
|
||||
* provides abstract Cloud Server Model
|
||||
*/
|
||||
public CloudServerManager getCloudServerManager();
|
||||
|
||||
/**
|
||||
* provides abstract Mobile Device Manager Model
|
||||
*/
|
||||
public MobileDeviceManager getMobileDeviceManager() throws Exception;
|
||||
}
|
||||
|
@ -1,200 +1,251 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Simulation Manager
|
||||
*
|
||||
* Description:
|
||||
* SimManager is an singleton class providing many abstract classeses such as
|
||||
* Network Model, Mobility Model, Edge Orchestrator to other modules
|
||||
* Critical simulation related information would be gathered via this class
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.core;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.core.SimEntity;
|
||||
import org.cloudbus.cloudsim.core.SimEvent;
|
||||
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeServerManager;
|
||||
import edu.boun.edgecloudsim.edge_server.VmAllocationPolicy_Custom;
|
||||
import edu.boun.edgecloudsim.edge_client.MobileDeviceManager;
|
||||
import edu.boun.edgecloudsim.mobility.MobilityModel;
|
||||
import edu.boun.edgecloudsim.task_generator.LoadGeneratorModel;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
public class SimManager extends SimEntity {
|
||||
private static final int CREATE_TASK = 0;
|
||||
private static final int CHECK_ALL_VM = 1;
|
||||
private static final int GET_LOAD_LOG = 2;
|
||||
private static final int PRINT_PROGRESS = 3;
|
||||
private static final int STOP_SIMULATION = 4;
|
||||
|
||||
private int numOfMobileDevice;
|
||||
private NetworkModel networkModel;
|
||||
private MobilityModel mobilityModel;
|
||||
private ScenarioFactory scenarioFactory;
|
||||
private EdgeOrchestrator edgeOrchestrator;
|
||||
private EdgeServerManager edgeServerManager;
|
||||
private LoadGeneratorModel loadGeneratorModel;
|
||||
private MobileDeviceManager mobileDeviceManager;
|
||||
|
||||
private static SimManager instance = null;
|
||||
|
||||
public SimManager(ScenarioFactory _scenarioFactory, int _numOfMobileDevice, String _simScenario) throws Exception {
|
||||
super("SimManager");
|
||||
scenarioFactory = _scenarioFactory;
|
||||
numOfMobileDevice = _numOfMobileDevice;
|
||||
|
||||
SimLogger.print("Creating tasks...");
|
||||
loadGeneratorModel = scenarioFactory.getLoadGeneratorModel();
|
||||
loadGeneratorModel.initializeModel();
|
||||
SimLogger.printLine("Done, ");
|
||||
|
||||
SimLogger.print("Creating device locations...");
|
||||
mobilityModel = scenarioFactory.getMobilityModel();
|
||||
mobilityModel.initialize();
|
||||
SimLogger.printLine("Done.");
|
||||
|
||||
//Generate network model
|
||||
networkModel = scenarioFactory.getNetworkModel();
|
||||
networkModel.initialize();
|
||||
|
||||
//Generate edge orchestrator
|
||||
edgeOrchestrator = scenarioFactory.getEdgeOrchestrator();
|
||||
edgeOrchestrator.initialize();
|
||||
|
||||
//Create Physical Servers
|
||||
edgeServerManager = new EdgeServerManager();
|
||||
|
||||
//Create Client Manager
|
||||
mobileDeviceManager = new MobileDeviceManager();
|
||||
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static SimManager getInstance(){
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggering CloudSim to start simulation
|
||||
*/
|
||||
public void startSimulation() throws Exception{
|
||||
//Starts the simulation
|
||||
SimLogger.print(super.getName()+" is starting...");
|
||||
|
||||
//Start Edge Servers & Generate VMs
|
||||
edgeServerManager.startDatacenters();
|
||||
edgeServerManager.createVmList(mobileDeviceManager.getId());
|
||||
|
||||
CloudSim.startSimulation();
|
||||
}
|
||||
|
||||
public ScenarioFactory getScenarioFactory(){
|
||||
return scenarioFactory;
|
||||
}
|
||||
|
||||
public int getNumOfMobileDevice(){
|
||||
return numOfMobileDevice;
|
||||
}
|
||||
|
||||
public NetworkModel getNetworkModel(){
|
||||
return networkModel;
|
||||
}
|
||||
|
||||
public MobilityModel getMobilityModel(){
|
||||
return mobilityModel;
|
||||
}
|
||||
|
||||
public EdgeOrchestrator getEdgeOrchestrator(){
|
||||
return edgeOrchestrator;
|
||||
}
|
||||
|
||||
public EdgeServerManager getLocalServerManager(){
|
||||
return edgeServerManager;
|
||||
}
|
||||
|
||||
public MobileDeviceManager getMobileDeviceManager(){
|
||||
return mobileDeviceManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startEntity() {
|
||||
for(int i=0; i<edgeServerManager.getDatacenterList().size(); i++)
|
||||
mobileDeviceManager.submitVmList(edgeServerManager.getVmList(i));
|
||||
|
||||
//Creation of tasks are scheduled here!
|
||||
for(int i=0; i< loadGeneratorModel.getTaskList().size(); i++)
|
||||
schedule(getId(), loadGeneratorModel.getTaskList().get(i).startTime, CREATE_TASK, loadGeneratorModel.getTaskList().get(i));
|
||||
|
||||
//Periodic event loops starts from here!
|
||||
schedule(getId(), 5, CHECK_ALL_VM);
|
||||
schedule(getId(), SimSettings.getInstance().getSimulationTime()/100, PRINT_PROGRESS);
|
||||
schedule(getId(), SimSettings.getInstance().getVmLoadLogInterval(), GET_LOAD_LOG);
|
||||
schedule(getId(), SimSettings.getInstance().getSimulationTime(), STOP_SIMULATION);
|
||||
|
||||
SimLogger.printLine("Done.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processEvent(SimEvent ev) {
|
||||
synchronized(this){
|
||||
switch (ev.getTag()) {
|
||||
case CREATE_TASK:
|
||||
try {
|
||||
EdgeTask edgeTask = (EdgeTask) ev.getData();
|
||||
mobileDeviceManager.submitTask(edgeTask);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
break;
|
||||
case CHECK_ALL_VM:
|
||||
int totalNumOfVm = SimSettings.getInstance().getNumOfEdgeVMs();
|
||||
if(VmAllocationPolicy_Custom.getCreatedVmNum() != totalNumOfVm){
|
||||
SimLogger.printLine("All VMs cannot be created! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
break;
|
||||
case GET_LOAD_LOG:
|
||||
SimLogger.getInstance().addVmUtilizationLog(CloudSim.clock(),edgeServerManager.getAvgUtilization());
|
||||
schedule(getId(), SimSettings.getInstance().getVmLoadLogInterval(), GET_LOAD_LOG);
|
||||
break;
|
||||
case PRINT_PROGRESS:
|
||||
int progress = (int)((CloudSim.clock()*100)/SimSettings.getInstance().getSimulationTime());
|
||||
if(progress % 10 == 0)
|
||||
SimLogger.print(Integer.toString(progress));
|
||||
else
|
||||
SimLogger.print(".");
|
||||
if(CloudSim.clock() < SimSettings.getInstance().getSimulationTime())
|
||||
schedule(getId(), SimSettings.getInstance().getSimulationTime()/100, PRINT_PROGRESS);
|
||||
break;
|
||||
case STOP_SIMULATION:
|
||||
SimLogger.printLine("100");
|
||||
CloudSim.terminateSimulation();
|
||||
try {
|
||||
SimLogger.getInstance().simStopped();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Log.printLine(getName() + ": unknown event type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownEntity() {
|
||||
edgeServerManager.terminateDatacenters();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Simulation Manager
|
||||
*
|
||||
* Description:
|
||||
* SimManager is an singleton class providing many abstract classeses such as
|
||||
* Network Model, Mobility Model, Edge Orchestrator to other modules
|
||||
* Critical simulation related information would be gathered via this class
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.core.SimEntity;
|
||||
import org.cloudbus.cloudsim.core.SimEvent;
|
||||
|
||||
import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeServerManager;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeVmAllocationPolicy_Custom;
|
||||
import edu.boun.edgecloudsim.cloud_server.CloudServerManager;
|
||||
import edu.boun.edgecloudsim.edge_client.MobileDeviceManager;
|
||||
import edu.boun.edgecloudsim.mobility.MobilityModel;
|
||||
import edu.boun.edgecloudsim.task_generator.LoadGeneratorModel;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
public class SimManager extends SimEntity {
|
||||
private static final int CREATE_TASK = 0;
|
||||
private static final int CHECK_ALL_VM = 1;
|
||||
private static final int GET_LOAD_LOG = 2;
|
||||
private static final int PRINT_PROGRESS = 3;
|
||||
private static final int STOP_SIMULATION = 4;
|
||||
|
||||
private String simScenario;
|
||||
private String orchestratorPolicy;
|
||||
private int numOfMobileDevice;
|
||||
private NetworkModel networkModel;
|
||||
private MobilityModel mobilityModel;
|
||||
private ScenarioFactory scenarioFactory;
|
||||
private EdgeOrchestrator edgeOrchestrator;
|
||||
private EdgeServerManager edgeServerManager;
|
||||
private CloudServerManager cloudServerManager;
|
||||
private LoadGeneratorModel loadGeneratorModel;
|
||||
private MobileDeviceManager mobileDeviceManager;
|
||||
|
||||
private static SimManager instance = null;
|
||||
|
||||
public SimManager(ScenarioFactory _scenarioFactory, int _numOfMobileDevice, String _simScenario, String _orchestratorPolicy) throws Exception {
|
||||
super("SimManager");
|
||||
simScenario = _simScenario;
|
||||
scenarioFactory = _scenarioFactory;
|
||||
numOfMobileDevice = _numOfMobileDevice;
|
||||
orchestratorPolicy = _orchestratorPolicy;
|
||||
|
||||
SimLogger.print("Creating tasks...");
|
||||
loadGeneratorModel = scenarioFactory.getLoadGeneratorModel();
|
||||
loadGeneratorModel.initializeModel();
|
||||
SimLogger.printLine("Done, ");
|
||||
|
||||
SimLogger.print("Creating device locations...");
|
||||
mobilityModel = scenarioFactory.getMobilityModel();
|
||||
mobilityModel.initialize();
|
||||
SimLogger.printLine("Done.");
|
||||
|
||||
//Generate network model
|
||||
networkModel = scenarioFactory.getNetworkModel();
|
||||
networkModel.initialize();
|
||||
|
||||
//Generate edge orchestrator
|
||||
edgeOrchestrator = scenarioFactory.getEdgeOrchestrator();
|
||||
edgeOrchestrator.initialize();
|
||||
|
||||
//Create Physical Servers
|
||||
edgeServerManager = scenarioFactory.getEdgeServerManager();
|
||||
edgeServerManager.initialize();
|
||||
|
||||
//Create Physical Servers on cloud
|
||||
cloudServerManager = scenarioFactory.getCloudServerManager();
|
||||
cloudServerManager.initialize();
|
||||
|
||||
//Create Client Manager
|
||||
mobileDeviceManager = scenarioFactory.getMobileDeviceManager();
|
||||
mobileDeviceManager.initialize();
|
||||
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static SimManager getInstance(){
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggering CloudSim to start simulation
|
||||
*/
|
||||
public void startSimulation() throws Exception{
|
||||
//Starts the simulation
|
||||
SimLogger.print(super.getName()+" is starting...");
|
||||
|
||||
//Start Edge Datacenters & Generate VMs
|
||||
edgeServerManager.startDatacenters();
|
||||
edgeServerManager.createVmList(mobileDeviceManager.getId());
|
||||
|
||||
//Start Edge Datacenters & Generate VMs
|
||||
cloudServerManager.startDatacenters();
|
||||
cloudServerManager.createVmList(mobileDeviceManager.getId());
|
||||
|
||||
CloudSim.startSimulation();
|
||||
}
|
||||
|
||||
public String getSimulationScenario(){
|
||||
return simScenario;
|
||||
}
|
||||
|
||||
public String getOrchestratorPolicy(){
|
||||
return orchestratorPolicy;
|
||||
}
|
||||
|
||||
public ScenarioFactory getScenarioFactory(){
|
||||
return scenarioFactory;
|
||||
}
|
||||
|
||||
public int getNumOfMobileDevice(){
|
||||
return numOfMobileDevice;
|
||||
}
|
||||
|
||||
public NetworkModel getNetworkModel(){
|
||||
return networkModel;
|
||||
}
|
||||
|
||||
public MobilityModel getMobilityModel(){
|
||||
return mobilityModel;
|
||||
}
|
||||
|
||||
public EdgeOrchestrator getEdgeOrchestrator(){
|
||||
return edgeOrchestrator;
|
||||
}
|
||||
|
||||
public EdgeServerManager getEdgeServerManager(){
|
||||
return edgeServerManager;
|
||||
}
|
||||
|
||||
public CloudServerManager getCloudServerManager(){
|
||||
return cloudServerManager;
|
||||
}
|
||||
|
||||
public LoadGeneratorModel getLoadGeneratorModel(){
|
||||
return loadGeneratorModel;
|
||||
}
|
||||
|
||||
public MobileDeviceManager getMobileDeviceManager(){
|
||||
return mobileDeviceManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startEntity() {
|
||||
int hostCounter=0;
|
||||
|
||||
for(int i= 0; i<edgeServerManager.getDatacenterList().size(); i++) {
|
||||
List<? extends Host> list = edgeServerManager.getDatacenterList().get(i).getHostList();
|
||||
for (int j=0; j < list.size(); j++) {
|
||||
mobileDeviceManager.submitVmList(edgeServerManager.getVmList(hostCounter));
|
||||
hostCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
for(int i= 0; i<SimSettings.getInstance().getNumOfCoudHost(); i++) {
|
||||
mobileDeviceManager.submitVmList(cloudServerManager.getVmList(i));
|
||||
}
|
||||
|
||||
//Creation of tasks are scheduled here!
|
||||
for(int i=0; i< loadGeneratorModel.getTaskList().size(); i++)
|
||||
schedule(getId(), loadGeneratorModel.getTaskList().get(i).startTime, CREATE_TASK, loadGeneratorModel.getTaskList().get(i));
|
||||
|
||||
//Periodic event loops starts from here!
|
||||
schedule(getId(), 5, CHECK_ALL_VM);
|
||||
schedule(getId(), SimSettings.getInstance().getSimulationTime()/100, PRINT_PROGRESS);
|
||||
schedule(getId(), SimSettings.getInstance().getVmLoadLogInterval(), GET_LOAD_LOG);
|
||||
schedule(getId(), SimSettings.getInstance().getSimulationTime(), STOP_SIMULATION);
|
||||
|
||||
SimLogger.printLine("Done.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processEvent(SimEvent ev) {
|
||||
synchronized(this){
|
||||
switch (ev.getTag()) {
|
||||
case CREATE_TASK:
|
||||
try {
|
||||
EdgeTask edgeTask = (EdgeTask) ev.getData();
|
||||
mobileDeviceManager.submitTask(edgeTask);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
break;
|
||||
case CHECK_ALL_VM:
|
||||
int totalNumOfVm = SimSettings.getInstance().getNumOfEdgeVMs();
|
||||
if(EdgeVmAllocationPolicy_Custom.getCreatedVmNum() != totalNumOfVm){
|
||||
SimLogger.printLine("All VMs cannot be created! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
break;
|
||||
case GET_LOAD_LOG:
|
||||
SimLogger.getInstance().addVmUtilizationLog(
|
||||
CloudSim.clock(),
|
||||
edgeServerManager.getAvgUtilization(),
|
||||
cloudServerManager.getAvgUtilization());
|
||||
|
||||
schedule(getId(), SimSettings.getInstance().getVmLoadLogInterval(), GET_LOAD_LOG);
|
||||
break;
|
||||
case PRINT_PROGRESS:
|
||||
int progress = (int)((CloudSim.clock()*100)/SimSettings.getInstance().getSimulationTime());
|
||||
if(progress % 10 == 0)
|
||||
SimLogger.print(Integer.toString(progress));
|
||||
else
|
||||
SimLogger.print(".");
|
||||
if(CloudSim.clock() < SimSettings.getInstance().getSimulationTime())
|
||||
schedule(getId(), SimSettings.getInstance().getSimulationTime()/100, PRINT_PROGRESS);
|
||||
|
||||
break;
|
||||
case STOP_SIMULATION:
|
||||
SimLogger.printLine("100");
|
||||
CloudSim.terminateSimulation();
|
||||
try {
|
||||
SimLogger.getInstance().simStopped();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Log.printLine(getName() + ": unknown event type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownEntity() {
|
||||
edgeServerManager.terminateDatacenters();
|
||||
cloudServerManager.terminateDatacenters();
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,42 +1,59 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Custom VM Cpu Utilization Model
|
||||
*
|
||||
* Description:
|
||||
* CpuUtilizationModel_Custom implements UtilizationModel and used for
|
||||
* VM CPU utilization model. In CloudSim, the CPU utilization of the VM
|
||||
* is a simple counter. We provide more realistic utilization model
|
||||
* which decide CPU utilization of each application by using the
|
||||
* values defined in the applications.xml file. For those who wants to
|
||||
* add another VM Cpu Utilization Model to EdgeCloudSim should provide
|
||||
* another concreate instance of UtilizationModel via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_client;
|
||||
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class CpuUtilizationModel_Custom implements UtilizationModel {
|
||||
private SimSettings.APP_TYPES taskType;
|
||||
|
||||
public CpuUtilizationModel_Custom(SimSettings.APP_TYPES _taskType){
|
||||
taskType=_taskType;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see cloudsim.power.UtilizationModel#getUtilization(double)
|
||||
*/
|
||||
@Override
|
||||
public double getUtilization(double time) {
|
||||
return SimSettings.getInstance().getTaskLookUpTable()[taskType.ordinal()][9];
|
||||
}
|
||||
|
||||
public double predictUtilization(SimSettings.VM_TYPES _vmType){
|
||||
return SimSettings.getInstance().getTaskLookUpTable()[taskType.ordinal()][9];
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Custom VM Cpu Utilization Model
|
||||
*
|
||||
* Description:
|
||||
* CpuUtilizationModel_Custom implements UtilizationModel and used for
|
||||
* VM CPU utilization model. In CloudSim, the CPU utilization of the VM
|
||||
* is a simple counter. We provide more realistic utilization model
|
||||
* which decide CPU utilization of each application by using the
|
||||
* values defined in the applications.xml file. For those who wants to
|
||||
* add another VM Cpu Utilization Model to EdgeCloudSim should provide
|
||||
* another concreate instance of UtilizationModel via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_client;
|
||||
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
public class CpuUtilizationModel_Custom implements UtilizationModel {
|
||||
private Task task;
|
||||
|
||||
public CpuUtilizationModel_Custom(){
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see cloudsim.power.UtilizationModel#getUtilization(double)
|
||||
*/
|
||||
@Override
|
||||
public double getUtilization(double time) {
|
||||
int index = 9;
|
||||
if(task.getAssociatedDatacenterId() == SimSettings.CLOUD_DATACENTER_ID)
|
||||
index = 10;
|
||||
|
||||
return SimSettings.getInstance().getTaskLookUpTable()[task.getTaskType()][index];
|
||||
}
|
||||
|
||||
public void setTask(Task _task){
|
||||
task=_task;
|
||||
}
|
||||
|
||||
public double predictUtilization(SimSettings.VM_TYPES _vmType){
|
||||
int index = 0;
|
||||
if(_vmType == SimSettings.VM_TYPES.EDGE_VM)
|
||||
index = 9;
|
||||
else if(_vmType == SimSettings.VM_TYPES.CLOUD_VM)
|
||||
index = 10;
|
||||
else{
|
||||
SimLogger.printLine("Unknown VM Type! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
return SimSettings.getInstance().getTaskLookUpTable()[task.getTaskType()][index];
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,293 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Mobile Device Manager
|
||||
*
|
||||
* Description:
|
||||
* DefaultMobileDeviceManager is responsible for submitting the tasks to the related
|
||||
* device by using the Edge Orchestrator. It also takes proper actions
|
||||
* when the execution of the tasks are finished.
|
||||
* By default, DefaultMobileDeviceManager sends tasks to the edge servers or
|
||||
* cloud servers. If you want to use different topology, for example
|
||||
* MAN edge server, you should modify the flow defined in this class.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_client;
|
||||
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
import org.cloudbus.cloudsim.UtilizationModelFull;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.core.CloudSimTags;
|
||||
import org.cloudbus.cloudsim.core.SimEvent;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.core.SimSettings.NETWORK_DELAY_TYPES;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
public class DefaultMobileDeviceManager extends MobileDeviceManager {
|
||||
private static final int BASE = 100000; //start from base in order not to conflict cloudsim tag!
|
||||
private static final int REQUEST_RECEIVED_BY_CLOUD = BASE + 1;
|
||||
private static final int REQUEST_RECIVED_BY_EDGE_DEVICE = BASE + 2;
|
||||
private static final int RESPONSE_RECEIVED_BY_MOBILE_DEVICE = BASE + 3;
|
||||
private int taskIdCounter=0;
|
||||
|
||||
public DefaultMobileDeviceManager() throws Exception{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public UtilizationModel getCpuUtilizationModel() {
|
||||
return new CpuUtilizationModel_Custom();
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit cloudlets to the created VMs.
|
||||
*
|
||||
* @pre $none
|
||||
* @post $none
|
||||
*/
|
||||
protected void submitCloudlets() {
|
||||
//do nothing!
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a cloudlet return event.
|
||||
*
|
||||
* @param ev a SimEvent object
|
||||
* @pre ev != $null
|
||||
* @post $none
|
||||
*/
|
||||
protected void processCloudletReturn(SimEvent ev) {
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
SimLogger.getInstance().taskExecuted(task.getCloudletId());
|
||||
|
||||
if(task.getAssociatedDatacenterId() == SimSettings.CLOUD_DATACENTER_ID){
|
||||
//SimLogger.printLine(CloudSim.clock() + ": " + getName() + ": task #" + task.getCloudletId() + " received from cloud");
|
||||
double WanDelay = networkModel.getDownloadDelay(SimSettings.CLOUD_DATACENTER_ID, task.getMobileDeviceId(), task);
|
||||
if(WanDelay > 0)
|
||||
{
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().getLocation(task.getMobileDeviceId(),CloudSim.clock()+WanDelay);
|
||||
if(task.getSubmittedLocation().getServingWlanId() == currentLocation.getServingWlanId())
|
||||
{
|
||||
networkModel.downloadStarted(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
SimLogger.getInstance().setDownloadDelay(task.getCloudletId(), WanDelay, NETWORK_DELAY_TYPES.WAN_DELAY);
|
||||
schedule(getId(), WanDelay, RESPONSE_RECEIVED_BY_MOBILE_DEVICE, task);
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToMobility(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToBandwidth(task.getCloudletId(), CloudSim.clock(), NETWORK_DELAY_TYPES.WAN_DELAY);
|
||||
}
|
||||
}
|
||||
else{
|
||||
//SimLogger.printLine(CloudSim.clock() + ": " + getName() + ": task #" + task.getCloudletId() + " received from edge");
|
||||
double WlanDelay = networkModel.getDownloadDelay(task.getAssociatedHostId(), task.getMobileDeviceId(), task);
|
||||
if(WlanDelay > 0)
|
||||
{
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().getLocation(task.getMobileDeviceId(),CloudSim.clock()+WlanDelay);
|
||||
if(task.getSubmittedLocation().getServingWlanId() == currentLocation.getServingWlanId())
|
||||
{
|
||||
networkModel.downloadStarted(currentLocation, SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
SimLogger.getInstance().setDownloadDelay(task.getCloudletId(), WlanDelay, NETWORK_DELAY_TYPES.WLAN_DELAY);
|
||||
schedule(getId(), WlanDelay, RESPONSE_RECEIVED_BY_MOBILE_DEVICE, task);
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToMobility(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToBandwidth(task.getCloudletId(), CloudSim.clock(), NETWORK_DELAY_TYPES.WLAN_DELAY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void processOtherEvent(SimEvent ev) {
|
||||
if (ev == null) {
|
||||
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - an event is null! Terminating simulation...");
|
||||
System.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
|
||||
switch (ev.getTag()) {
|
||||
case REQUEST_RECEIVED_BY_CLOUD:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
|
||||
submitTaskToVm(task,0,SimSettings.CLOUD_DATACENTER_ID);
|
||||
|
||||
break;
|
||||
}
|
||||
case REQUEST_RECIVED_BY_EDGE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
|
||||
submitTaskToVm(task, 0, SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
|
||||
break;
|
||||
}
|
||||
case RESPONSE_RECEIVED_BY_MOBILE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
if(task.getAssociatedDatacenterId() == SimSettings.CLOUD_DATACENTER_ID)
|
||||
networkModel.downloadFinished(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
else
|
||||
networkModel.downloadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
|
||||
SimLogger.getInstance().taskEnded(task.getCloudletId(), CloudSim.clock());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - event unknown by this DatacenterBroker. Terminating simulation...");
|
||||
System.exit(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void submitTask(EdgeTask edgeTask) {
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
|
||||
//create a task
|
||||
Task task = createTask(edgeTask);
|
||||
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().
|
||||
getLocation(task.getMobileDeviceId(),CloudSim.clock());
|
||||
|
||||
//set location of the mobile device which generates this task
|
||||
task.setSubmittedLocation(currentLocation);
|
||||
|
||||
//add related task to log list
|
||||
SimLogger.getInstance().addLog(task.getCloudletId(),
|
||||
task.getTaskType(),
|
||||
(int)task.getCloudletLength(),
|
||||
(int)task.getCloudletFileSize(),
|
||||
(int)task.getCloudletOutputSize());
|
||||
|
||||
int nextHopId = SimManager.getInstance().getEdgeOrchestrator().getDeviceToOffload(task);
|
||||
|
||||
if(nextHopId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
double WanDelay = networkModel.getUploadDelay(task.getMobileDeviceId(), nextHopId, task);
|
||||
|
||||
if(WanDelay>0){
|
||||
networkModel.uploadStarted(currentLocation, nextHopId);
|
||||
SimLogger.getInstance().taskStarted(task.getCloudletId(), CloudSim.clock());
|
||||
SimLogger.getInstance().setUploadDelay(task.getCloudletId(), WanDelay, NETWORK_DELAY_TYPES.WAN_DELAY);
|
||||
schedule(getId(), WanDelay, REQUEST_RECEIVED_BY_CLOUD, task);
|
||||
}
|
||||
else
|
||||
{
|
||||
//SimLogger.printLine("Task #" + task.getCloudletId() + " cannot assign to any VM");
|
||||
SimLogger.getInstance().rejectedDueToBandwidth(
|
||||
task.getCloudletId(),
|
||||
CloudSim.clock(),
|
||||
SimSettings.VM_TYPES.CLOUD_VM.ordinal(),
|
||||
NETWORK_DELAY_TYPES.WAN_DELAY);
|
||||
}
|
||||
}
|
||||
else if(nextHopId == SimSettings.GENERIC_EDGE_DEVICE_ID) {
|
||||
double WlanDelay = networkModel.getUploadDelay(task.getMobileDeviceId(), nextHopId, task);
|
||||
|
||||
if(WlanDelay > 0){
|
||||
networkModel.uploadStarted(currentLocation, nextHopId);
|
||||
schedule(getId(), WlanDelay, REQUEST_RECIVED_BY_EDGE_DEVICE, task);
|
||||
SimLogger.getInstance().taskStarted(task.getCloudletId(), CloudSim.clock());
|
||||
SimLogger.getInstance().setUploadDelay(task.getCloudletId(), WlanDelay, NETWORK_DELAY_TYPES.WLAN_DELAY);
|
||||
}
|
||||
else {
|
||||
SimLogger.getInstance().rejectedDueToBandwidth(
|
||||
task.getCloudletId(),
|
||||
CloudSim.clock(),
|
||||
SimSettings.VM_TYPES.EDGE_VM.ordinal(),
|
||||
NETWORK_DELAY_TYPES.WLAN_DELAY);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknown nextHopId! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void submitTaskToVm(Task task, double delay, int datacenterId) {
|
||||
//select a VM
|
||||
Vm selectedVM = SimManager.getInstance().getEdgeOrchestrator().getVmToOffload(task, datacenterId);
|
||||
|
||||
int vmType = 0;
|
||||
if(datacenterId == SimSettings.CLOUD_DATACENTER_ID)
|
||||
vmType = SimSettings.VM_TYPES.CLOUD_VM.ordinal();
|
||||
else
|
||||
vmType = SimSettings.VM_TYPES.EDGE_VM.ordinal();
|
||||
|
||||
if(selectedVM != null){
|
||||
if(datacenterId == SimSettings.CLOUD_DATACENTER_ID)
|
||||
task.setAssociatedDatacenterId(SimSettings.CLOUD_DATACENTER_ID);
|
||||
else
|
||||
task.setAssociatedDatacenterId(selectedVM.getHost().getDatacenter().getId());
|
||||
|
||||
//save related host id
|
||||
task.setAssociatedHostId(selectedVM.getHost().getId());
|
||||
|
||||
//set related vm id
|
||||
task.setAssociatedVmId(selectedVM.getId());
|
||||
|
||||
//bind task to related VM
|
||||
getCloudletList().add(task);
|
||||
bindCloudletToVm(task.getCloudletId(),selectedVM.getId());
|
||||
|
||||
//SimLogger.printLine(CloudSim.clock() + ": Cloudlet#" + task.getCloudletId() + " is submitted to VM#" + task.getVmId());
|
||||
schedule(getVmsToDatacentersMap().get(task.getVmId()), delay, CloudSimTags.CLOUDLET_SUBMIT, task);
|
||||
|
||||
SimLogger.getInstance().taskAssigned(task.getCloudletId(),
|
||||
selectedVM.getHost().getDatacenter().getId(),
|
||||
selectedVM.getHost().getId(),
|
||||
selectedVM.getId(),
|
||||
vmType);
|
||||
}
|
||||
else{
|
||||
//SimLogger.printLine("Task #" + task.getCloudletId() + " cannot assign to any VM");
|
||||
SimLogger.getInstance().rejectedDueToVMCapacity(task.getCloudletId(), CloudSim.clock(), vmType);
|
||||
}
|
||||
}
|
||||
|
||||
private Task createTask(EdgeTask edgeTask){
|
||||
UtilizationModel utilizationModel = new UtilizationModelFull(); /*UtilizationModelStochastic*/
|
||||
UtilizationModel utilizationModelCPU = getCpuUtilizationModel();
|
||||
|
||||
Task task = new Task(edgeTask.mobileDeviceId, ++taskIdCounter,
|
||||
edgeTask.length, edgeTask.pesNumber,
|
||||
edgeTask.inputFileSize, edgeTask.outputFileSize,
|
||||
utilizationModelCPU, utilizationModel, utilizationModel);
|
||||
|
||||
//set the owner of this task
|
||||
task.setUserId(this.getId());
|
||||
task.setTaskType(edgeTask.taskType);
|
||||
|
||||
if (utilizationModelCPU instanceof CpuUtilizationModel_Custom) {
|
||||
((CpuUtilizationModel_Custom)utilizationModelCPU).setTask(task);
|
||||
}
|
||||
|
||||
return task;
|
||||
}
|
||||
}
|
@ -1,324 +1,25 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Mobile Device Manager
|
||||
*
|
||||
* Description:
|
||||
* MobileDeviceManager is responsible for submitting the tasks to the related
|
||||
* device by using the Edge Orchestrator. It also takes proper actions
|
||||
* when the execution of the tasks are finished.
|
||||
* By default, MobileDeviceManager sends tasks to the edge servers or
|
||||
* cloud servers. If you want to use different topology, for example
|
||||
* MAN edge server, you should modify the flow defined in this class.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_client;
|
||||
|
||||
import org.cloudbus.cloudsim.DatacenterBroker;
|
||||
import org.cloudbus.cloudsim.Cloudlet;
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
import org.cloudbus.cloudsim.UtilizationModelFull;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.core.CloudSimTags;
|
||||
import org.cloudbus.cloudsim.core.SimEvent;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeVM;
|
||||
import edu.boun.edgecloudsim.network.NetworkModel;
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
|
||||
|
||||
public class MobileDeviceManager extends DatacenterBroker {
|
||||
private static final int BASE = 100000; //start from base in order not to conflict cloudsim tag!
|
||||
private static final int REQUEST_RECEIVED_BY_CLOUD = BASE + 1;
|
||||
private static final int REQUEST_PROCESSED_BY_CLOUD = BASE + 2;
|
||||
private static final int REQUEST_RECIVED_BY_EDGE_DEVICE = BASE + 3;
|
||||
private static final int RESPONSE_RECEIVED_BY_MOBILE_DEVICE = BASE + 4;
|
||||
// private static final int REQUEST_RECIVED_BY_EDGE_ORCHESTRATOR = BASE + 5;
|
||||
private int taskIdCounter=0;
|
||||
|
||||
public MobileDeviceManager() throws Exception {
|
||||
super("Global_Broker");
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit cloudlets to the created VMs.
|
||||
*
|
||||
* @pre $none
|
||||
* @post $none
|
||||
*/
|
||||
protected void submitCloudlets() {
|
||||
//do nothing!
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a cloudlet return event.
|
||||
*
|
||||
* @param ev a SimEvent object
|
||||
* @pre ev != $null
|
||||
* @post $none
|
||||
*/
|
||||
protected void processCloudletReturn(SimEvent ev) {
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().getLocation(task.getMobileDeviceId(),CloudSim.clock());
|
||||
if(task.getSubmittedLocation().equals(currentLocation))
|
||||
{
|
||||
//SimLogger.printLine(CloudSim.clock() + ": " + getName() + ": Cloudlet " + task.getCloudletId() + " received");
|
||||
double WlanDelay = networkModel.getDownloadDelay(task.getAssociatedHostId(), task.getMobileDeviceId(), task.getCloudletOutputSize());
|
||||
if(WlanDelay > 0)
|
||||
{
|
||||
networkModel.downloadStarted(currentLocation, SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
schedule(getId(), WlanDelay, RESPONSE_RECEIVED_BY_MOBILE_DEVICE, task);
|
||||
SimLogger.getInstance().downloadStarted(task.getCloudletId(), WlanDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToBandwidth(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//SimLogger.printLine("task cannot be finished due to mobility of user!");
|
||||
//SimLogger.printLine("device: " +task.getMobileDeviceId()+" - submitted " + task.getSubmissionTime() + " @ " + task.getSubmittedLocation().getXPos() + " handled " + CloudSim.clock() + " @ " + currentLocation.getXPos());
|
||||
SimLogger.getInstance().failedDueToMobility(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
|
||||
protected void processOtherEvent(SimEvent ev) {
|
||||
if (ev == null) {
|
||||
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - an event is null! Terminating simulation...");
|
||||
System.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
|
||||
switch (ev.getTag()) {
|
||||
case REQUEST_RECEIVED_BY_CLOUD:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
|
||||
//save related host id
|
||||
task.setAssociatedHostId(SimSettings.CLOUD_HOST_ID);
|
||||
|
||||
SimLogger.getInstance().uploaded(task.getCloudletId(),
|
||||
SimSettings.CLOUD_DATACENTER_ID,
|
||||
SimSettings.CLOUD_HOST_ID,
|
||||
SimSettings.CLOUD_VM_ID,
|
||||
SimSettings.VM_TYPES.CLOUD_VM.ordinal());
|
||||
|
||||
//calculate computational delay in cloud
|
||||
double ComputationDelay = (double)task.getCloudletLength() / (double)SimSettings.getInstance().getMipsForCloud();
|
||||
|
||||
schedule(getId(), ComputationDelay, REQUEST_PROCESSED_BY_CLOUD, task);
|
||||
|
||||
break;
|
||||
}
|
||||
case REQUEST_PROCESSED_BY_CLOUD:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
//SimLogger.printLine(CloudSim.clock() + ": " + getName() + ": Cloudlet " + task.getCloudletId() + " received");
|
||||
double WanDelay = networkModel.getDownloadDelay(SimSettings.CLOUD_DATACENTER_ID, task.getMobileDeviceId(), task.getCloudletOutputSize());
|
||||
if(WanDelay > 0)
|
||||
{
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().getLocation(task.getMobileDeviceId(),CloudSim.clock()+WanDelay);
|
||||
if(task.getSubmittedLocation().equals(currentLocation))
|
||||
{
|
||||
networkModel.downloadStarted(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
schedule(getId(), WanDelay, RESPONSE_RECEIVED_BY_MOBILE_DEVICE, task);
|
||||
SimLogger.getInstance().downloadStarted(task.getCloudletId(), WanDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
//SimLogger.printLine("task cannot be finished due to mobility of user!");
|
||||
//SimLogger.printLine("device: " +task.getMobileDeviceId()+" - submitted " + task.getSubmissionTime() + " @ " + task.getSubmittedLocation().getXPos() + " handled " + CloudSim.clock() + " @ " + currentLocation.getXPos());
|
||||
SimLogger.getInstance().failedDueToMobility(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SimLogger.getInstance().failedDueToBandwidth(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
break;
|
||||
}
|
||||
/*
|
||||
case REQUEST_RECIVED_BY_EDGE_ORCHESTRATOR:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
double internalDelay = networkModel.getDownloadDelay(
|
||||
SimSettings.EDGE_ORCHESTRATOR_ID,
|
||||
SimSettings.GENERIC_EDGE_DEVICE_ID,
|
||||
task.getCloudletOutputSize());
|
||||
|
||||
networkModel.downloadStarted(
|
||||
SimSettings.EDGE_ORCHESTRATOR_ID,
|
||||
SimSettings.GENERIC_EDGE_DEVICE_ID,
|
||||
task.getCloudletOutputSize());
|
||||
|
||||
submitTaskToEdgeDevice(task,internalDelay);
|
||||
|
||||
break;
|
||||
}
|
||||
*/
|
||||
case REQUEST_RECIVED_BY_EDGE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
networkModel.uploadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
|
||||
submitTaskToEdgeDevice(task,0);
|
||||
|
||||
break;
|
||||
}
|
||||
case RESPONSE_RECEIVED_BY_MOBILE_DEVICE:
|
||||
{
|
||||
Task task = (Task) ev.getData();
|
||||
|
||||
if(task.getAssociatedHostId() == SimSettings.CLOUD_HOST_ID)
|
||||
networkModel.downloadFinished(task.getSubmittedLocation(), SimSettings.CLOUD_DATACENTER_ID);
|
||||
else
|
||||
networkModel.downloadFinished(task.getSubmittedLocation(), SimSettings.GENERIC_EDGE_DEVICE_ID);
|
||||
|
||||
//SimLogger.printLine(CloudSim.clock() + ": " + getName() + ": Cloudlet " + cloudlet.getCloudletId() + " is received");
|
||||
SimLogger.getInstance().downloaded(task.getCloudletId(), CloudSim.clock());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - event unknown by this DatacenterBroker. Terminating simulation...");
|
||||
System.exit(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void submitTaskToEdgeDevice(Task task, double delay) {
|
||||
//select a VM
|
||||
EdgeVM selectedVM = SimManager.getInstance().getEdgeOrchestrator().getVmToOffload(task);
|
||||
|
||||
if(selectedVM != null){
|
||||
//save related host id
|
||||
task.setAssociatedHostId(selectedVM.getHost().getId());
|
||||
|
||||
//bind task to related VM
|
||||
getCloudletList().add(task);
|
||||
bindCloudletToVm(task.getCloudletId(),selectedVM.getId());
|
||||
|
||||
//SimLogger.printLine(CloudSim.clock() + ": Cloudlet#" + task.getCloudletId() + " is submitted to VM#" + task.getVmId());
|
||||
schedule(getVmsToDatacentersMap().get(task.getVmId()), delay, CloudSimTags.CLOUDLET_SUBMIT, task);
|
||||
|
||||
SimLogger.getInstance().uploaded(task.getCloudletId(),
|
||||
selectedVM.getHost().getDatacenter().getId(),
|
||||
selectedVM.getHost().getId(),
|
||||
selectedVM.getId(),
|
||||
selectedVM.getVmType().ordinal());
|
||||
}
|
||||
else{
|
||||
//SimLogger.printLine("Task #" + task.getCloudletId() + " cannot assign to any VM");
|
||||
SimLogger.getInstance().rejectedDueToVMCapacity(task.getCloudletId(), CloudSim.clock());
|
||||
}
|
||||
}
|
||||
|
||||
public void submitTask(EdgeTask edgeTask) {
|
||||
NetworkModel networkModel = SimManager.getInstance().getNetworkModel();
|
||||
|
||||
//create a task
|
||||
Task task = createTask(edgeTask);
|
||||
|
||||
Location currentLocation = SimManager.getInstance().getMobilityModel().
|
||||
getLocation(task.getMobileDeviceId(),CloudSim.clock());
|
||||
|
||||
//set location of the mobile device which generates this task
|
||||
task.setSubmittedLocation(currentLocation);
|
||||
|
||||
//add related task to log list
|
||||
SimLogger.getInstance().addLog(CloudSim.clock(),
|
||||
task.getCloudletId(),
|
||||
task.getTaskType().ordinal(),
|
||||
(int)task.getCloudletLength(),
|
||||
(int)task.getCloudletFileSize(),
|
||||
(int)task.getCloudletOutputSize());
|
||||
|
||||
int nextHopId = SimManager.getInstance().getEdgeOrchestrator().getDeviceToOffload(task);
|
||||
|
||||
if(nextHopId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
double WanDelay = networkModel.getUploadDelay(task.getMobileDeviceId(), nextHopId, task.getCloudletFileSize());
|
||||
|
||||
if(WanDelay>0){
|
||||
networkModel.uploadStarted(currentLocation, nextHopId);
|
||||
schedule(getId(), WanDelay, REQUEST_RECEIVED_BY_CLOUD, task);
|
||||
SimLogger.getInstance().uploadStarted(task.getCloudletId(),WanDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
//SimLogger.printLine("Task #" + task.getCloudletId() + " cannot assign to any VM");
|
||||
SimLogger.getInstance().rejectedDueToBandwidth(
|
||||
task.getCloudletId(),
|
||||
CloudSim.clock(),
|
||||
SimSettings.VM_TYPES.CLOUD_VM.ordinal());
|
||||
}
|
||||
}
|
||||
// else if(nextHopId == SimSettings.EDGE_ORCHESTRATOR_ID){
|
||||
// double WlanDelay = networkModel.getUploadDelay(task.getMobileDeviceId(), nextHopId, task.getCloudletFileSize());
|
||||
//
|
||||
// if(WlanDelay > 0){
|
||||
// networkModel.uploadStarted(task.getMobileDeviceId(), nextHopId, task.getCloudletFileSize());
|
||||
// schedule(getId(), WlanDelay, REQUEST_RECIVED_BY_EDGE_ORCHESTRATOR, task);
|
||||
// SimLogger.getInstance().uploadStarted(task.getCloudletId(),WlanDelay);
|
||||
// }
|
||||
// else {
|
||||
// SimLogger.getInstance().rejectedDueToBandwidth(
|
||||
// task.getCloudletId(),
|
||||
// CloudSim.clock(),
|
||||
// SimSettings.VM_TYPES.EDGE_VM.ordinal());
|
||||
// }
|
||||
// }
|
||||
else if(nextHopId == SimSettings.GENERIC_EDGE_DEVICE_ID) {
|
||||
double WlanDelay = networkModel.getUploadDelay(task.getMobileDeviceId(), nextHopId, task.getCloudletFileSize());
|
||||
|
||||
if(WlanDelay > 0){
|
||||
networkModel.uploadStarted(currentLocation, nextHopId);
|
||||
schedule(getId(), WlanDelay, REQUEST_RECIVED_BY_EDGE_DEVICE, task);
|
||||
SimLogger.getInstance().uploadStarted(task.getCloudletId(),WlanDelay);
|
||||
}
|
||||
else {
|
||||
SimLogger.getInstance().rejectedDueToBandwidth(
|
||||
task.getCloudletId(),
|
||||
CloudSim.clock(),
|
||||
SimSettings.VM_TYPES.EDGE_VM.ordinal());
|
||||
}
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknown nextHopId! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
public Task createTask(EdgeTask edgeTask){
|
||||
UtilizationModel utilizationModel = new UtilizationModelFull(); /*UtilizationModelStochastic*/
|
||||
UtilizationModel utilizationModelCPU = SimManager.getInstance().getScenarioFactory().getCpuUtilizationModel(edgeTask.taskType);
|
||||
|
||||
Task task = new Task(edgeTask.mobileDeviceId, ++taskIdCounter,
|
||||
edgeTask.length, edgeTask.pesNumber,
|
||||
edgeTask.inputFileSize, edgeTask.outputFileSize,
|
||||
utilizationModelCPU, utilizationModel, utilizationModel);
|
||||
|
||||
//set the owner of this task
|
||||
task.setUserId(this.getId());
|
||||
task.setTaskType(edgeTask.taskType);
|
||||
|
||||
return task;
|
||||
}
|
||||
|
||||
public void taskEnded(){
|
||||
clearDatacenters();
|
||||
finishExecution();
|
||||
}
|
||||
}
|
||||
package edu.boun.edgecloudsim.edge_client;
|
||||
|
||||
import org.cloudbus.cloudsim.DatacenterBroker;
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
|
||||
public abstract class MobileDeviceManager extends DatacenterBroker {
|
||||
|
||||
public MobileDeviceManager() throws Exception {
|
||||
super("Global_Broker");
|
||||
}
|
||||
|
||||
/*
|
||||
* initialize mobile device manager if needed
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/*
|
||||
* provides abstract CPU Utilization Model
|
||||
*/
|
||||
public abstract UtilizationModel getCpuUtilizationModel();
|
||||
|
||||
public abstract void submitTask(EdgeTask edgeTask);
|
||||
}
|
||||
|
@ -1,66 +1,83 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Task
|
||||
*
|
||||
* Description:
|
||||
* Task adds app type, task submission location, mobile device id and host id
|
||||
* information to CloudSim's Cloudlet class.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_client;
|
||||
|
||||
import org.cloudbus.cloudsim.Cloudlet;
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public class Task extends Cloudlet {
|
||||
private SimSettings.APP_TYPES type;
|
||||
private Location submittedLocation;
|
||||
private int mobileDeviceId;
|
||||
private int hostIndex;
|
||||
|
||||
public Task(int _mobileDeviceId, int cloudletId, long cloudletLength, int pesNumber,
|
||||
long cloudletFileSize, long cloudletOutputSize,
|
||||
UtilizationModel utilizationModelCpu,
|
||||
UtilizationModel utilizationModelRam,
|
||||
UtilizationModel utilizationModelBw) {
|
||||
super(cloudletId, cloudletLength, pesNumber, cloudletFileSize,
|
||||
cloudletOutputSize, utilizationModelCpu, utilizationModelRam,
|
||||
utilizationModelBw);
|
||||
|
||||
mobileDeviceId = _mobileDeviceId;
|
||||
}
|
||||
|
||||
|
||||
public void setSubmittedLocation(Location _submittedLocation){
|
||||
submittedLocation =_submittedLocation;
|
||||
}
|
||||
|
||||
public void setAssociatedHostId(int _hostIndex){
|
||||
hostIndex=_hostIndex;
|
||||
}
|
||||
|
||||
public void setTaskType(SimSettings.APP_TYPES _type){
|
||||
type=_type;
|
||||
}
|
||||
|
||||
public int getMobileDeviceId(){
|
||||
return mobileDeviceId;
|
||||
}
|
||||
|
||||
public Location getSubmittedLocation(){
|
||||
return submittedLocation;
|
||||
}
|
||||
|
||||
public int getAssociatedHostId(){
|
||||
return hostIndex;
|
||||
}
|
||||
|
||||
public SimSettings.APP_TYPES getTaskType(){
|
||||
return type;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Task
|
||||
*
|
||||
* Description:
|
||||
* Task adds app type, task submission location, mobile device id and host id
|
||||
* information to CloudSim's Cloudlet class.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_client;
|
||||
|
||||
import org.cloudbus.cloudsim.Cloudlet;
|
||||
import org.cloudbus.cloudsim.UtilizationModel;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public class Task extends Cloudlet {
|
||||
private Location submittedLocation;
|
||||
private int type;
|
||||
private int mobileDeviceId;
|
||||
private int hostIndex;
|
||||
private int vmIndex;
|
||||
private int datacenterId;
|
||||
|
||||
public Task(int _mobileDeviceId, int cloudletId, long cloudletLength, int pesNumber,
|
||||
long cloudletFileSize, long cloudletOutputSize,
|
||||
UtilizationModel utilizationModelCpu,
|
||||
UtilizationModel utilizationModelRam,
|
||||
UtilizationModel utilizationModelBw) {
|
||||
super(cloudletId, cloudletLength, pesNumber, cloudletFileSize,
|
||||
cloudletOutputSize, utilizationModelCpu, utilizationModelRam,
|
||||
utilizationModelBw);
|
||||
|
||||
mobileDeviceId = _mobileDeviceId;
|
||||
}
|
||||
|
||||
|
||||
public void setSubmittedLocation(Location _submittedLocation){
|
||||
submittedLocation =_submittedLocation;
|
||||
}
|
||||
|
||||
public void setAssociatedDatacenterId(int _datacenterId){
|
||||
datacenterId=_datacenterId;
|
||||
}
|
||||
|
||||
public void setAssociatedHostId(int _hostIndex){
|
||||
hostIndex=_hostIndex;
|
||||
}
|
||||
|
||||
public void setAssociatedVmId(int _vmIndex){
|
||||
vmIndex=_vmIndex;
|
||||
}
|
||||
|
||||
public void setTaskType(int _type){
|
||||
type=_type;
|
||||
}
|
||||
|
||||
public int getMobileDeviceId(){
|
||||
return mobileDeviceId;
|
||||
}
|
||||
|
||||
public Location getSubmittedLocation(){
|
||||
return submittedLocation;
|
||||
}
|
||||
|
||||
public int getAssociatedDatacenterId(){
|
||||
return datacenterId;
|
||||
}
|
||||
|
||||
public int getAssociatedHostId(){
|
||||
return hostIndex;
|
||||
}
|
||||
|
||||
public int getAssociatedVmId(){
|
||||
return vmIndex;
|
||||
}
|
||||
|
||||
public int getTaskType(){
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,12 @@ package edu.boun.edgecloudsim.edge_orchestrator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.core.SimEvent;
|
||||
|
||||
import edu.boun.edgecloudsim.cloud_server.CloudVM;
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeVM;
|
||||
@ -47,10 +51,10 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
public int getDeviceToOffload(Task task) {
|
||||
int result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
if(!simScenario.equals("SINGLE_TIER")){
|
||||
//decide to use cloud or cloudlet VM
|
||||
//decide to use cloud or Edge VM
|
||||
int CloudVmPicker = SimUtils.getRandomNumber(0, 100);
|
||||
|
||||
if(CloudVmPicker <= SimSettings.getInstance().getTaskLookUpTable()[task.getTaskType().ordinal()][1])
|
||||
if(CloudVmPicker <= SimSettings.getInstance().getTaskLookUpTable()[task.getTaskType()][1])
|
||||
result = SimSettings.CLOUD_DATACENTER_ID;
|
||||
else
|
||||
result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
@ -60,11 +64,31 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public EdgeVM getVmToOffload(Task task) {
|
||||
if(simScenario.equals("TWO_TIER_WITH_EO"))
|
||||
return selectVmOnLoadBalancer(task);
|
||||
public Vm getVmToOffload(Task task, int deviceId) {
|
||||
Vm selectedVM = null;
|
||||
|
||||
if(deviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
//Select VM on cloud devices via Least Loaded algorithm!
|
||||
double selectedVmCapacity = 0; //start with min value
|
||||
List<Host> list = SimManager.getInstance().getCloudServerManager().getDatacenter().getHostList();
|
||||
for (int hostIndex=0; hostIndex < list.size(); hostIndex++) {
|
||||
List<CloudVM> vmArray = SimManager.getInstance().getCloudServerManager().getVmList(hostIndex);
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(vmIndex).getVmType());
|
||||
double targetVmCapacity = (double)100 - vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
if(requiredCapacity <= targetVmCapacity && targetVmCapacity > selectedVmCapacity){
|
||||
selectedVM = vmArray.get(vmIndex);
|
||||
selectedVmCapacity = targetVmCapacity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(simScenario.equals("TWO_TIER_WITH_EO"))
|
||||
selectedVM = selectVmOnLoadBalancer(task);
|
||||
else
|
||||
return selectVmOnHost(task);
|
||||
selectedVM = selectVmOnHost(task);
|
||||
|
||||
return selectedVM;
|
||||
}
|
||||
|
||||
public EdgeVM selectVmOnHost(Task task){
|
||||
@ -74,7 +98,7 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
//in our scenasrio, serving wlan ID is equal to the host id
|
||||
//because there is only one host in one place
|
||||
int relatedHostId=deviceLocation.getServingWlanId();
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getLocalServerManager().getVmList(relatedHostId);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(relatedHostId);
|
||||
|
||||
if(policy.equalsIgnoreCase("RANDOM_FIT")){
|
||||
int randomIndex = SimUtils.getRandomNumber(0, vmArray.size()-1);
|
||||
@ -137,7 +161,7 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
|
||||
if(policy.equalsIgnoreCase("RANDOM_FIT")){
|
||||
int randomHostIndex = SimUtils.getRandomNumber(0, numberOfHost-1);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getLocalServerManager().getVmList(randomHostIndex);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(randomHostIndex);
|
||||
int randomIndex = SimUtils.getRandomNumber(0, vmArray.size()-1);
|
||||
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(randomIndex).getVmType());
|
||||
@ -148,7 +172,7 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
else if(policy.equalsIgnoreCase("WORST_FIT")){
|
||||
double selectedVmCapacity = 0; //start with min value
|
||||
for(int hostIndex=0; hostIndex<numberOfHost; hostIndex++){
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getLocalServerManager().getVmList(hostIndex);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(hostIndex);
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(vmIndex).getVmType());
|
||||
double targetVmCapacity = (double)100 - vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
@ -162,7 +186,7 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
else if(policy.equalsIgnoreCase("BEST_FIT")){
|
||||
double selectedVmCapacity = 101; //start with max value
|
||||
for(int hostIndex=0; hostIndex<numberOfHost; hostIndex++){
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getLocalServerManager().getVmList(hostIndex);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(hostIndex);
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(vmIndex).getVmType());
|
||||
double targetVmCapacity = (double)100 - vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
@ -175,7 +199,7 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
}
|
||||
else if(policy.equalsIgnoreCase("FIRST_FIT")){
|
||||
for(int hostIndex=0; hostIndex<numberOfHost; hostIndex++){
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getLocalServerManager().getVmList(hostIndex);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(hostIndex);
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(vmIndex).getVmType());
|
||||
double targetVmCapacity = (double)100 - vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
@ -192,7 +216,7 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
int tries = 0;
|
||||
lastSelectedHostIndex = (lastSelectedHostIndex+1) % numberOfHost;
|
||||
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getLocalServerManager().getVmList(lastSelectedHostIndex);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(lastSelectedHostIndex);
|
||||
while(tries < vmArray.size()){
|
||||
lastSelectedVmIndexes[lastSelectedHostIndex] = (lastSelectedVmIndexes[lastSelectedHostIndex]+1) % vmArray.size();
|
||||
double requiredCapacity = ((CpuUtilizationModel_Custom)task.getUtilizationModelCpu()).predictUtilization(vmArray.get(lastSelectedVmIndexes[lastSelectedHostIndex]).getVmType());
|
||||
@ -210,4 +234,22 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
|
||||
|
||||
return selectedVM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processEvent(SimEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownEntity() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startEntity() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
@ -1,42 +1,45 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Edge Orchestrator
|
||||
*
|
||||
* Description:
|
||||
* EdgeOrchestrator is an abstract class which is used for selecting VM
|
||||
* for each client requests. For those who wants to add a custom
|
||||
* Edge Orchestrator to EdgeCloudSim should extend this class and provide
|
||||
* a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_orchestrator;
|
||||
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeVM;
|
||||
import edu.boun.edgecloudsim.edge_client.Task;
|
||||
|
||||
public abstract class EdgeOrchestrator {
|
||||
protected String policy;
|
||||
protected String simScenario;
|
||||
|
||||
public EdgeOrchestrator(String _policy, String _simScenario){
|
||||
policy = _policy;
|
||||
simScenario = _simScenario;
|
||||
}
|
||||
|
||||
/*
|
||||
* initialize edge orchestrator if needed
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/*
|
||||
* decides where to offload
|
||||
*/
|
||||
public abstract int getDeviceToOffload(Task task);
|
||||
|
||||
/*
|
||||
* returns proper VM from the related edge orchestrator point of view
|
||||
*/
|
||||
public abstract EdgeVM getVmToOffload(Task task);
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Edge Orchestrator
|
||||
*
|
||||
* Description:
|
||||
* EdgeOrchestrator is an abstract class which is used for selecting VM
|
||||
* for each client requests. For those who wants to add a custom
|
||||
* Edge Orchestrator to EdgeCloudSim should extend this class and provide
|
||||
* a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_orchestrator;
|
||||
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.core.SimEntity;
|
||||
|
||||
import edu.boun.edgecloudsim.edge_client.Task;
|
||||
|
||||
public abstract class EdgeOrchestrator extends SimEntity{
|
||||
protected String policy;
|
||||
protected String simScenario;
|
||||
|
||||
public EdgeOrchestrator(String _policy, String _simScenario){
|
||||
super("EdgeOrchestrator");
|
||||
policy = _policy;
|
||||
simScenario = _simScenario;
|
||||
}
|
||||
|
||||
/*
|
||||
* initialize edge orchestrator if needed
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/*
|
||||
* decides where to offload
|
||||
*/
|
||||
public abstract int getDeviceToOffload(Task task);
|
||||
|
||||
/*
|
||||
* returns proper VM from the edge orchestrator point of view
|
||||
*/
|
||||
public abstract Vm getVmToOffload(Task task, int deviceId);
|
||||
}
|
||||
|
@ -0,0 +1,218 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Edge Server Manager
|
||||
*
|
||||
* Description:
|
||||
* DefaultEdgeServerManager is responsible for creating datacenters, hosts and VMs.
|
||||
* It also provides the list of VMs running on the hosts.
|
||||
* This information is critical for the edge orchestrator.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.CloudletSchedulerTimeShared;
|
||||
import org.cloudbus.cloudsim.Datacenter;
|
||||
import org.cloudbus.cloudsim.DatacenterCharacteristics;
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Pe;
|
||||
import org.cloudbus.cloudsim.Storage;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
import org.cloudbus.cloudsim.VmSchedulerSpaceShared;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.provisioners.BwProvisionerSimple;
|
||||
import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple;
|
||||
import org.cloudbus.cloudsim.provisioners.RamProvisionerSimple;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public class DefaultEdgeServerManager extends EdgeServerManager{
|
||||
private int hostIdCounter;
|
||||
|
||||
public DefaultEdgeServerManager() {
|
||||
hostIdCounter = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public VmAllocationPolicy getVmAllocationPolicy(List<? extends Host> hostList, int dataCenterIndex) {
|
||||
return new EdgeVmAllocationPolicy_Custom(hostList,dataCenterIndex);
|
||||
}
|
||||
|
||||
public void startDatacenters() throws Exception{
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; i < datacenterList.getLength(); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
localDatacenters.add(createDatacenter(i, datacenterElement));
|
||||
}
|
||||
}
|
||||
|
||||
public void createVmList(int brockerId){
|
||||
int hostCounter=0;
|
||||
int vmCounter=0;
|
||||
|
||||
//Create VMs for each hosts
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; i < datacenterList.getLength(); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
NodeList hostNodeList = datacenterElement.getElementsByTagName("host");
|
||||
for (int j = 0; j < hostNodeList.getLength(); j++) {
|
||||
|
||||
vmList.add(hostCounter, new ArrayList<EdgeVM>());
|
||||
|
||||
Node hostNode = hostNodeList.item(j);
|
||||
Element hostElement = (Element) hostNode;
|
||||
NodeList vmNodeList = hostElement.getElementsByTagName("VM");
|
||||
for (int k = 0; k < vmNodeList.getLength(); k++) {
|
||||
Node vmNode = vmNodeList.item(k);
|
||||
Element vmElement = (Element) vmNode;
|
||||
|
||||
String vmm = vmElement.getAttribute("vmm");
|
||||
int numOfCores = Integer.parseInt(vmElement.getElementsByTagName("core").item(0).getTextContent());
|
||||
double mips = Double.parseDouble(vmElement.getElementsByTagName("mips").item(0).getTextContent());
|
||||
int ram = Integer.parseInt(vmElement.getElementsByTagName("ram").item(0).getTextContent());
|
||||
long storage = Long.parseLong(vmElement.getElementsByTagName("storage").item(0).getTextContent());
|
||||
long bandwidth = SimSettings.getInstance().getWlanBandwidth() / (hostNodeList.getLength()+vmNodeList.getLength());
|
||||
|
||||
//VM Parameters
|
||||
EdgeVM vm = new EdgeVM(vmCounter, brockerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared());
|
||||
vmList.get(hostCounter).add(vm);
|
||||
vmCounter++;
|
||||
}
|
||||
|
||||
hostCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void terminateDatacenters(){
|
||||
for (Datacenter datacenter : localDatacenters) {
|
||||
datacenter.shutdownEntity();
|
||||
}
|
||||
}
|
||||
|
||||
//average utilization of all VMs
|
||||
public double getAvgUtilization(){
|
||||
double totalUtilization = 0;
|
||||
double vmCounter = 0;
|
||||
|
||||
// for each datacenter...
|
||||
for(int i= 0; i<localDatacenters.size(); i++) {
|
||||
List<? extends Host> list = localDatacenters.get(i).getHostList();
|
||||
// for each host...
|
||||
for (int j=0; j < list.size(); j++) {
|
||||
Host host = list.get(j);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(host.getId());
|
||||
//for each vm...
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
totalUtilization += vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
vmCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return totalUtilization / vmCounter;
|
||||
}
|
||||
|
||||
private Datacenter createDatacenter(int index, Element datacenterElement) throws Exception{
|
||||
String arch = datacenterElement.getAttribute("arch");
|
||||
String os = datacenterElement.getAttribute("os");
|
||||
String vmm = datacenterElement.getAttribute("vmm");
|
||||
double costPerBw = Double.parseDouble(datacenterElement.getElementsByTagName("costPerBw").item(0).getTextContent());
|
||||
double costPerSec = Double.parseDouble(datacenterElement.getElementsByTagName("costPerSec").item(0).getTextContent());
|
||||
double costPerMem = Double.parseDouble(datacenterElement.getElementsByTagName("costPerMem").item(0).getTextContent());
|
||||
double costPerStorage = Double.parseDouble(datacenterElement.getElementsByTagName("costPerStorage").item(0).getTextContent());
|
||||
|
||||
List<EdgeHost> hostList=createHosts(datacenterElement);
|
||||
|
||||
String name = "Datacenter_" + Integer.toString(index);
|
||||
double time_zone = 3.0; // time zone this resource located
|
||||
LinkedList<Storage> storageList = new LinkedList<Storage>(); //we are not adding SAN devices by now
|
||||
|
||||
// 5. Create a DatacenterCharacteristics object that stores the
|
||||
// properties of a data center: architecture, OS, list of
|
||||
// Machines, allocation policy: time- or space-shared, time zone
|
||||
// and its price (G$/Pe time unit).
|
||||
DatacenterCharacteristics characteristics = new DatacenterCharacteristics(
|
||||
arch, os, vmm, hostList, time_zone, costPerSec, costPerMem, costPerStorage, costPerBw);
|
||||
|
||||
|
||||
// 6. Finally, we need to create a PowerDatacenter object.
|
||||
Datacenter datacenter = null;
|
||||
|
||||
VmAllocationPolicy vm_policy = getVmAllocationPolicy(hostList,index);
|
||||
datacenter = new Datacenter(name, characteristics, vm_policy, storageList, 0);
|
||||
|
||||
return datacenter;
|
||||
}
|
||||
|
||||
private List<EdgeHost> createHosts(Element datacenterElement){
|
||||
|
||||
// Here are the steps needed to create a PowerDatacenter:
|
||||
// 1. We need to create a list to store one or more Machines
|
||||
List<EdgeHost> hostList = new ArrayList<EdgeHost>();
|
||||
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
int wlan_id = Integer.parseInt(location.getElementsByTagName("wlan_id").item(0).getTextContent());
|
||||
int x_pos = Integer.parseInt(location.getElementsByTagName("x_pos").item(0).getTextContent());
|
||||
int y_pos = Integer.parseInt(location.getElementsByTagName("y_pos").item(0).getTextContent());
|
||||
int placeTypeIndex = Integer.parseInt(attractiveness);
|
||||
|
||||
NodeList hostNodeList = datacenterElement.getElementsByTagName("host");
|
||||
for (int j = 0; j < hostNodeList.getLength(); j++) {
|
||||
Node hostNode = hostNodeList.item(j);
|
||||
|
||||
Element hostElement = (Element) hostNode;
|
||||
int numOfCores = Integer.parseInt(hostElement.getElementsByTagName("core").item(0).getTextContent());
|
||||
double mips = Double.parseDouble(hostElement.getElementsByTagName("mips").item(0).getTextContent());
|
||||
int ram = Integer.parseInt(hostElement.getElementsByTagName("ram").item(0).getTextContent());
|
||||
long storage = Long.parseLong(hostElement.getElementsByTagName("storage").item(0).getTextContent());
|
||||
long bandwidth = SimSettings.getInstance().getWlanBandwidth() / hostNodeList.getLength();
|
||||
|
||||
// 2. A Machine contains one or more PEs or CPUs/Cores. Therefore, should
|
||||
// create a list to store these PEs before creating
|
||||
// a Machine.
|
||||
List<Pe> peList = new ArrayList<Pe>();
|
||||
|
||||
// 3. Create PEs and add these into the list.
|
||||
//for a quad-core machine, a list of 4 PEs is required:
|
||||
for(int i=0; i<numOfCores; i++){
|
||||
peList.add(new Pe(i, new PeProvisionerSimple(mips))); // need to store Pe id and MIPS Rating
|
||||
}
|
||||
|
||||
//4. Create Hosts with its id and list of PEs and add them to the list of machines
|
||||
EdgeHost host = new EdgeHost(
|
||||
hostIdCounter,
|
||||
new RamProvisionerSimple(ram),
|
||||
new BwProvisionerSimple(bandwidth), //kbps
|
||||
storage,
|
||||
peList,
|
||||
new VmSchedulerSpaceShared(peList)
|
||||
);
|
||||
|
||||
host.setPlace(new Location(placeTypeIndex, wlan_id, x_pos, y_pos));
|
||||
hostList.add(host);
|
||||
hostIdCounter++;
|
||||
}
|
||||
|
||||
return hostList;
|
||||
}
|
||||
}
|
@ -1,40 +1,40 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeHost
|
||||
*
|
||||
* Description:
|
||||
* EdgeHost adds location information over CloudSim's Host class
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Pe;
|
||||
import org.cloudbus.cloudsim.VmScheduler;
|
||||
import org.cloudbus.cloudsim.provisioners.BwProvisioner;
|
||||
import org.cloudbus.cloudsim.provisioners.RamProvisioner;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public class EdgeHost extends Host {
|
||||
private Location location;
|
||||
|
||||
public EdgeHost(int id, RamProvisioner ramProvisioner,
|
||||
BwProvisioner bwProvisioner, long storage,
|
||||
List<? extends Pe> peList, VmScheduler vmScheduler) {
|
||||
super(id, ramProvisioner, bwProvisioner, storage, peList, vmScheduler);
|
||||
|
||||
}
|
||||
|
||||
public void setPlace(Location _location){
|
||||
location=_location;
|
||||
}
|
||||
|
||||
public Location getLocation(){
|
||||
return location;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeHost
|
||||
*
|
||||
* Description:
|
||||
* EdgeHost adds location information over CloudSim's Host class
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Pe;
|
||||
import org.cloudbus.cloudsim.VmScheduler;
|
||||
import org.cloudbus.cloudsim.provisioners.BwProvisioner;
|
||||
import org.cloudbus.cloudsim.provisioners.RamProvisioner;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public class EdgeHost extends Host {
|
||||
private Location location;
|
||||
|
||||
public EdgeHost(int id, RamProvisioner ramProvisioner,
|
||||
BwProvisioner bwProvisioner, long storage,
|
||||
List<? extends Pe> peList, VmScheduler vmScheduler) {
|
||||
super(id, ramProvisioner, bwProvisioner, storage, peList, vmScheduler);
|
||||
|
||||
}
|
||||
|
||||
public void setPlace(Location _location){
|
||||
location=_location;
|
||||
}
|
||||
|
||||
public Location getLocation(){
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
@ -1,224 +1,55 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Edge Server Manager
|
||||
*
|
||||
* Description:
|
||||
* EdgeServerManager is responsible for creating datacenters, hosts and VMs.
|
||||
* It also provides the list of VMs running on the hosts.
|
||||
* This information is critical for the edge orchestrator.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.CloudletSchedulerTimeShared;
|
||||
import org.cloudbus.cloudsim.Datacenter;
|
||||
import org.cloudbus.cloudsim.DatacenterCharacteristics;
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Pe;
|
||||
import org.cloudbus.cloudsim.Storage;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
import org.cloudbus.cloudsim.VmSchedulerSpaceShared;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.cloudbus.cloudsim.provisioners.BwProvisionerSimple;
|
||||
import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple;
|
||||
import org.cloudbus.cloudsim.provisioners.RamProvisionerSimple;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class EdgeServerManager {
|
||||
private List<Datacenter> localDatacenters;
|
||||
private List<List<EdgeVM>> vmList;
|
||||
private int hostIdCounter;
|
||||
|
||||
public EdgeServerManager() {
|
||||
localDatacenters=new ArrayList<Datacenter>();
|
||||
vmList = new ArrayList<List<EdgeVM>>();
|
||||
hostIdCounter = 0;
|
||||
}
|
||||
|
||||
public List<EdgeVM> getVmList(int hostId){
|
||||
return vmList.get(hostId);
|
||||
}
|
||||
|
||||
public List<Datacenter> getDatacenterList(){
|
||||
return localDatacenters;
|
||||
}
|
||||
|
||||
public void startDatacenters() throws Exception{
|
||||
//create random number generator for each place
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; i < datacenterList.getLength(); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
localDatacenters.add(createDatacenter(i, datacenterElement));
|
||||
}
|
||||
}
|
||||
|
||||
public void createVmList(int brockerId){
|
||||
int hostCounter=0;
|
||||
int vmCounter=0;
|
||||
|
||||
//Create VMs for each hosts
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; i < datacenterList.getLength(); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
NodeList hostNodeList = datacenterElement.getElementsByTagName("host");
|
||||
for (int j = 0; j < hostNodeList.getLength(); j++) {
|
||||
|
||||
vmList.add(hostCounter, new ArrayList<EdgeVM>());
|
||||
|
||||
Node hostNode = hostNodeList.item(j);
|
||||
Element hostElement = (Element) hostNode;
|
||||
NodeList vmNodeList = hostElement.getElementsByTagName("VM");
|
||||
for (int k = 0; k < vmNodeList.getLength(); k++) {
|
||||
Node vmNode = vmNodeList.item(k);
|
||||
Element vmElement = (Element) vmNode;
|
||||
|
||||
String vmm = vmElement.getAttribute("vmm");
|
||||
int numOfCores = Integer.parseInt(vmElement.getElementsByTagName("core").item(0).getTextContent());
|
||||
double mips = Double.parseDouble(vmElement.getElementsByTagName("mips").item(0).getTextContent());
|
||||
int ram = Integer.parseInt(vmElement.getElementsByTagName("ram").item(0).getTextContent());
|
||||
long storage = Long.parseLong(vmElement.getElementsByTagName("storage").item(0).getTextContent());
|
||||
long bandwidth = SimSettings.getInstance().getWlanBandwidth() / (hostNodeList.getLength()+vmNodeList.getLength());
|
||||
|
||||
//VM Parameters
|
||||
EdgeVM vm = new EdgeVM(vmCounter, brockerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared());
|
||||
vm.setVmType(SimSettings.VM_TYPES.EDGE_VM);
|
||||
vmList.get(hostCounter).add(vm);
|
||||
vmCounter++;
|
||||
}
|
||||
|
||||
hostCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void terminateDatacenters(){
|
||||
for (Datacenter datacenter : localDatacenters) {
|
||||
datacenter.shutdownEntity();
|
||||
}
|
||||
}
|
||||
|
||||
//average utilization of all VMs
|
||||
public double getAvgUtilization(){
|
||||
double totalUtilization = 0;
|
||||
double vmCounter = 0;
|
||||
|
||||
// for each datacenter...
|
||||
for(int i= 0; i<localDatacenters.size(); i++) {
|
||||
List<? extends Host> list = localDatacenters.get(i).getHostList();
|
||||
// for each host...
|
||||
for (int j=0; j < list.size(); j++) {
|
||||
Host host = list.get(j);
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getLocalServerManager().getVmList(host.getId());
|
||||
//for each vm...
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
totalUtilization += vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
vmCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return totalUtilization / vmCounter;
|
||||
}
|
||||
|
||||
private Datacenter createDatacenter(int index, Element datacenterElement) throws Exception{
|
||||
String arch = datacenterElement.getAttribute("arch");
|
||||
String os = datacenterElement.getAttribute("os");
|
||||
String vmm = datacenterElement.getAttribute("vmm");
|
||||
double costPerBw = Double.parseDouble(datacenterElement.getElementsByTagName("costPerBw").item(0).getTextContent());
|
||||
double costPerSec = Double.parseDouble(datacenterElement.getElementsByTagName("costPerSec").item(0).getTextContent());
|
||||
double costPerMem = Double.parseDouble(datacenterElement.getElementsByTagName("costPerMem").item(0).getTextContent());
|
||||
double costPerStorage = Double.parseDouble(datacenterElement.getElementsByTagName("costPerStorage").item(0).getTextContent());
|
||||
|
||||
List<EdgeHost> hostList=createHosts(datacenterElement);
|
||||
|
||||
String name = "Datacenter_" + Integer.toString(index);
|
||||
double time_zone = 3.0; // time zone this resource located
|
||||
LinkedList<Storage> storageList = new LinkedList<Storage>(); //we are not adding SAN devices by now
|
||||
|
||||
// 5. Create a DatacenterCharacteristics object that stores the
|
||||
// properties of a data center: architecture, OS, list of
|
||||
// Machines, allocation policy: time- or space-shared, time zone
|
||||
// and its price (G$/Pe time unit).
|
||||
DatacenterCharacteristics characteristics = new DatacenterCharacteristics(
|
||||
arch, os, vmm, hostList, time_zone, costPerSec, costPerMem, costPerStorage, costPerBw);
|
||||
|
||||
|
||||
// 6. Finally, we need to create a PowerDatacenter object.
|
||||
Datacenter datacenter = null;
|
||||
|
||||
VmAllocationPolicy vm_policy = SimManager.getInstance().getScenarioFactory().getVmAllocationPolicy(hostList,index);
|
||||
datacenter = new Datacenter(name, characteristics, vm_policy, storageList, 0);
|
||||
|
||||
return datacenter;
|
||||
}
|
||||
|
||||
private List<EdgeHost> createHosts(Element datacenterElement){
|
||||
|
||||
// Here are the steps needed to create a PowerDatacenter:
|
||||
// 1. We need to create a list to store one or more Machines
|
||||
List<EdgeHost> hostList = new ArrayList<EdgeHost>();
|
||||
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
int wlan_id = Integer.parseInt(location.getElementsByTagName("wlan_id").item(0).getTextContent());
|
||||
int x_pos = Integer.parseInt(location.getElementsByTagName("x_pos").item(0).getTextContent());
|
||||
int y_pos = Integer.parseInt(location.getElementsByTagName("y_pos").item(0).getTextContent());
|
||||
SimSettings.PLACE_TYPES placeType = SimUtils.stringToPlace(attractiveness);
|
||||
|
||||
NodeList hostNodeList = datacenterElement.getElementsByTagName("host");
|
||||
for (int j = 0; j < hostNodeList.getLength(); j++) {
|
||||
Node hostNode = hostNodeList.item(j);
|
||||
|
||||
Element hostElement = (Element) hostNode;
|
||||
int numOfCores = Integer.parseInt(hostElement.getElementsByTagName("core").item(0).getTextContent());
|
||||
double mips = Double.parseDouble(hostElement.getElementsByTagName("mips").item(0).getTextContent());
|
||||
int ram = Integer.parseInt(hostElement.getElementsByTagName("ram").item(0).getTextContent());
|
||||
long storage = Long.parseLong(hostElement.getElementsByTagName("storage").item(0).getTextContent());
|
||||
long bandwidth = SimSettings.getInstance().getWlanBandwidth() / hostNodeList.getLength();
|
||||
|
||||
// 2. A Machine contains one or more PEs or CPUs/Cores. Therefore, should
|
||||
// create a list to store these PEs before creating
|
||||
// a Machine.
|
||||
List<Pe> peList = new ArrayList<Pe>();
|
||||
|
||||
// 3. Create PEs and add these into the list.
|
||||
//for a quad-core machine, a list of 4 PEs is required:
|
||||
for(int i=0; i<numOfCores; i++){
|
||||
peList.add(new Pe(i, new PeProvisionerSimple(mips))); // need to store Pe id and MIPS Rating
|
||||
}
|
||||
|
||||
//4. Create Hosts with its id and list of PEs and add them to the list of machines
|
||||
EdgeHost host = new EdgeHost(
|
||||
hostIdCounter,
|
||||
new RamProvisionerSimple(ram),
|
||||
new BwProvisionerSimple(bandwidth), //kbps
|
||||
storage,
|
||||
peList,
|
||||
new VmSchedulerSpaceShared(peList)
|
||||
);
|
||||
|
||||
host.setPlace(new Location(placeType, wlan_id, x_pos, y_pos));
|
||||
hostList.add(host);
|
||||
hostIdCounter++;
|
||||
}
|
||||
|
||||
return hostList;
|
||||
}
|
||||
}
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.cloudbus.cloudsim.Datacenter;
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
|
||||
public abstract class EdgeServerManager {
|
||||
protected List<Datacenter> localDatacenters;
|
||||
protected List<List<EdgeVM>> vmList;
|
||||
|
||||
public EdgeServerManager() {
|
||||
localDatacenters=new ArrayList<Datacenter>();
|
||||
vmList = new ArrayList<List<EdgeVM>>();
|
||||
}
|
||||
|
||||
public List<EdgeVM> getVmList(int hostId){
|
||||
return vmList.get(hostId);
|
||||
}
|
||||
|
||||
public List<Datacenter> getDatacenterList(){
|
||||
return localDatacenters;
|
||||
}
|
||||
|
||||
/*
|
||||
* initialize edge server manager if needed
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/*
|
||||
* provides abstract Vm Allocation Policy for Edge Datacenters
|
||||
*/
|
||||
public abstract VmAllocationPolicy getVmAllocationPolicy(List<? extends Host> list, int dataCenterIndex);
|
||||
|
||||
/*
|
||||
* Starts Datacenters
|
||||
*/
|
||||
public abstract void startDatacenters() throws Exception;
|
||||
|
||||
/*
|
||||
* Terminates Datacenters
|
||||
*/
|
||||
public abstract void terminateDatacenters();
|
||||
/*
|
||||
* Creates VM List
|
||||
*/
|
||||
public abstract void createVmList(int brockerId);
|
||||
|
||||
/*
|
||||
* returns average utilization of all VMs
|
||||
*/
|
||||
public abstract double getAvgUtilization();
|
||||
}
|
@ -1,34 +1,31 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeVM
|
||||
*
|
||||
* Description:
|
||||
* EdgeVM adds vm type information over CloudSim's VM class
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import org.cloudbus.cloudsim.CloudletScheduler;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class EdgeVM extends Vm {
|
||||
private SimSettings.VM_TYPES type;
|
||||
|
||||
public EdgeVM(int id, int userId, double mips, int numberOfPes, int ram,
|
||||
long bw, long size, String vmm, CloudletScheduler cloudletScheduler) {
|
||||
super(id, userId, mips, numberOfPes, ram, bw, size, vmm, cloudletScheduler);
|
||||
|
||||
}
|
||||
|
||||
public void setVmType(SimSettings.VM_TYPES _type){
|
||||
type=_type;
|
||||
}
|
||||
|
||||
public SimSettings.VM_TYPES getVmType(){
|
||||
return type;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeVM
|
||||
*
|
||||
* Description:
|
||||
* EdgeVM adds vm type information over CloudSim's VM class
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import org.cloudbus.cloudsim.CloudletScheduler;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class EdgeVM extends Vm {
|
||||
private SimSettings.VM_TYPES type;
|
||||
|
||||
public EdgeVM(int id, int userId, double mips, int numberOfPes, int ram,
|
||||
long bw, long size, String vmm, CloudletScheduler cloudletScheduler) {
|
||||
super(id, userId, mips, numberOfPes, ram, bw, size, vmm, cloudletScheduler);
|
||||
|
||||
type = SimSettings.VM_TYPES.EDGE_VM;
|
||||
}
|
||||
|
||||
public SimSettings.VM_TYPES getVmType(){
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
@ -1,158 +1,158 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Custom Vm Allocation Policy
|
||||
*
|
||||
* Description:
|
||||
* VmAllocationPolicy_Custom implements VmAllocationPolicy to decide which.
|
||||
* VM is created on which host locatied on the datacenters. For those
|
||||
* who wants to add another Vm Allocation Policy to EdgeCloudSim should
|
||||
* provide another concreate instance of VmAllocationPolicy via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
/*
|
||||
* Same as VmAllocationPolicySimple.
|
||||
*/
|
||||
public class VmAllocationPolicy_Custom extends VmAllocationPolicy {
|
||||
/** The vm table. */
|
||||
private Map<String, Host> vmTable;
|
||||
private static int createdVmNum;
|
||||
private int DataCenterIndex;
|
||||
|
||||
public VmAllocationPolicy_Custom(List<? extends Host> list, int _DataCenterIndex) {
|
||||
super(list);
|
||||
|
||||
setVmTable(new HashMap<String, Host>());
|
||||
DataCenterIndex=_DataCenterIndex;
|
||||
createdVmNum = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allocateHostForVm(Vm vm) {
|
||||
boolean result = false;
|
||||
|
||||
if (!getVmTable().containsKey(vm.getUid())) { // if this vm was not created
|
||||
boolean vmFound = false;
|
||||
int vmCounter = 0;
|
||||
int hostIndex = 0;
|
||||
int dataCenterIndex = 0;
|
||||
|
||||
//find proper datacenter id and host id for this VM
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; (!vmFound && i < datacenterList.getLength()); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
NodeList hostNodeList = datacenterElement.getElementsByTagName("host");
|
||||
for (int j = 0; (!vmFound && j < hostNodeList.getLength()); j++) {
|
||||
Node hostNode = hostNodeList.item(j);
|
||||
Element hostElement = (Element) hostNode;
|
||||
NodeList vmNodeList = hostElement.getElementsByTagName("VM");
|
||||
for (int k = 0; (!vmFound && k < vmNodeList.getLength()); k++) {
|
||||
|
||||
if(vmCounter == vm.getId()){
|
||||
dataCenterIndex = i;
|
||||
hostIndex = j;
|
||||
vmFound = true;
|
||||
}
|
||||
|
||||
vmCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(vmFound && dataCenterIndex == DataCenterIndex && hostIndex < getHostList().size()){
|
||||
Host host = getHostList().get(hostIndex);
|
||||
result = host.vmCreate(vm);
|
||||
|
||||
if (result) { // if vm were succesfully created in the host
|
||||
getVmTable().put(vm.getUid(), host);
|
||||
createdVmNum++;
|
||||
Log.formatLine("%.2f: VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock());
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allocateHostForVm(Vm vm, Host host) {
|
||||
if (host.vmCreate(vm)) { // if vm has been succesfully created in the host
|
||||
getVmTable().put(vm.getUid(), host);
|
||||
createdVmNum++;
|
||||
|
||||
Log.formatLine("%.2f: VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> optimizeAllocation(
|
||||
List<? extends Vm> vmList) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deallocateHostForVm(Vm vm) {
|
||||
Host host = getVmTable().remove(vm.getUid());
|
||||
if (host != null) {
|
||||
host.vmDestroy(vm);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Host getHost(Vm vm) {
|
||||
return getVmTable().get(vm.getUid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Host getHost(int vmId, int userId) {
|
||||
return getVmTable().get(Vm.getUid(userId, vmId));
|
||||
}
|
||||
|
||||
public static int getCreatedVmNum(){
|
||||
return createdVmNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the vm table.
|
||||
*
|
||||
* @return the vm table
|
||||
*/
|
||||
public Map<String, Host> getVmTable() {
|
||||
return vmTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the vm table.
|
||||
*
|
||||
* @param vmTable the vm table
|
||||
*/
|
||||
protected void setVmTable(Map<String, Host> vmTable) {
|
||||
this.vmTable = vmTable;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Custom Vm Allocation Policy for Edge VMs
|
||||
*
|
||||
* Description:
|
||||
* VmAllocationPolicy_Custom implements VmAllocationPolicy to decide which.
|
||||
* VM is created on which host locatied on the datacenters. For those
|
||||
* who wants to add another Vm Allocation Policy to EdgeCloudSim should
|
||||
* provide another concreate instance of VmAllocationPolicy via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.edge_server;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.cloudbus.cloudsim.Host;
|
||||
import org.cloudbus.cloudsim.Log;
|
||||
import org.cloudbus.cloudsim.Vm;
|
||||
import org.cloudbus.cloudsim.VmAllocationPolicy;
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
/*
|
||||
* Same as VmAllocationPolicySimple.
|
||||
*/
|
||||
public class EdgeVmAllocationPolicy_Custom extends VmAllocationPolicy {
|
||||
/** The vm table. */
|
||||
private Map<String, Host> vmTable;
|
||||
private static int createdVmNum;
|
||||
private int DataCenterIndex;
|
||||
|
||||
public EdgeVmAllocationPolicy_Custom(List<? extends Host> list, int _DataCenterIndex) {
|
||||
super(list);
|
||||
|
||||
setVmTable(new HashMap<String, Host>());
|
||||
DataCenterIndex=_DataCenterIndex;
|
||||
createdVmNum = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allocateHostForVm(Vm vm) {
|
||||
boolean result = false;
|
||||
|
||||
if (!getVmTable().containsKey(vm.getUid()) && vm instanceof EdgeVM) { // if this vm was not created
|
||||
boolean vmFound = false;
|
||||
int vmCounter = 0;
|
||||
int hostIndex = 0;
|
||||
int dataCenterIndex = 0;
|
||||
|
||||
//find proper datacenter id and host id for this VM
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; (!vmFound && i < datacenterList.getLength()); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
NodeList hostNodeList = datacenterElement.getElementsByTagName("host");
|
||||
for (int j = 0; (!vmFound && j < hostNodeList.getLength()); j++) {
|
||||
Node hostNode = hostNodeList.item(j);
|
||||
Element hostElement = (Element) hostNode;
|
||||
NodeList vmNodeList = hostElement.getElementsByTagName("VM");
|
||||
for (int k = 0; (!vmFound && k < vmNodeList.getLength()); k++) {
|
||||
|
||||
if(vmCounter == vm.getId()){
|
||||
dataCenterIndex = i;
|
||||
hostIndex = j;
|
||||
vmFound = true;
|
||||
}
|
||||
|
||||
vmCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(vmFound && dataCenterIndex == DataCenterIndex && hostIndex < getHostList().size()){
|
||||
Host host = getHostList().get(hostIndex);
|
||||
result = host.vmCreate(vm);
|
||||
|
||||
if (result) { // if vm were succesfully created in the host
|
||||
getVmTable().put(vm.getUid(), host);
|
||||
createdVmNum++;
|
||||
Log.formatLine("%.2f: Edge VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock());
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allocateHostForVm(Vm vm, Host host) {
|
||||
if (host.vmCreate(vm)) { // if vm has been succesfully created in the host
|
||||
getVmTable().put(vm.getUid(), host);
|
||||
createdVmNum++;
|
||||
|
||||
Log.formatLine("%.2f: Edge VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> optimizeAllocation(
|
||||
List<? extends Vm> vmList) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deallocateHostForVm(Vm vm) {
|
||||
Host host = getVmTable().remove(vm.getUid());
|
||||
if (host != null) {
|
||||
host.vmDestroy(vm);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Host getHost(Vm vm) {
|
||||
return getVmTable().get(vm.getUid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Host getHost(int vmId, int userId) {
|
||||
return getVmTable().get(Vm.getUid(userId, vmId));
|
||||
}
|
||||
|
||||
public static int getCreatedVmNum(){
|
||||
return createdVmNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the vm table.
|
||||
*
|
||||
* @return the vm table
|
||||
*/
|
||||
public Map<String, Host> getVmTable() {
|
||||
return vmTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the vm table.
|
||||
*
|
||||
* @param vmTable the vm table
|
||||
*/
|
||||
protected void setVmTable(Map<String, Host> vmTable) {
|
||||
this.vmTable = vmTable;
|
||||
}
|
||||
}
|
@ -1,36 +1,36 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Mobility Model
|
||||
*
|
||||
* Description:
|
||||
* MobilityModel is an abstract class which is used for calculating the
|
||||
* location of each mobile devices with respect to the time. For those who
|
||||
* wants to add a custom Mobility Model to EdgeCloudSim should extend
|
||||
* this class and provide a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.mobility;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public abstract class MobilityModel {
|
||||
protected int numberOfMobileDevices;
|
||||
protected double simulationTime;
|
||||
|
||||
public MobilityModel(int _numberOfMobileDevices, double _simulationTime){
|
||||
numberOfMobileDevices=_numberOfMobileDevices;
|
||||
simulationTime=_simulationTime;
|
||||
};
|
||||
|
||||
/*
|
||||
* calculate location of the devices according to related mobility model
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/*
|
||||
* returns location of a device at a certain time
|
||||
*/
|
||||
public abstract Location getLocation(int deviceId, double time);
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Mobility Model
|
||||
*
|
||||
* Description:
|
||||
* MobilityModel is an abstract class which is used for calculating the
|
||||
* location of each mobile devices with respect to the time. For those who
|
||||
* wants to add a custom Mobility Model to EdgeCloudSim should extend
|
||||
* this class and provide a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.mobility;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public abstract class MobilityModel {
|
||||
protected int numberOfMobileDevices;
|
||||
protected double simulationTime;
|
||||
|
||||
public MobilityModel(int _numberOfMobileDevices, double _simulationTime){
|
||||
numberOfMobileDevices=_numberOfMobileDevices;
|
||||
simulationTime=_simulationTime;
|
||||
};
|
||||
|
||||
/*
|
||||
* calculate location of the devices according to related mobility model
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/*
|
||||
* returns location of a device at a certain time
|
||||
*/
|
||||
public abstract Location getLocation(int deviceId, double time);
|
||||
}
|
||||
|
@ -1,123 +1,123 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Nomadic Mobility model implementation
|
||||
*
|
||||
* Description:
|
||||
* MobilityModel implements basic nomadic mobility model where the
|
||||
* place of the devices are changed from time to time instead of a
|
||||
* continuous location update.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.mobility;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class NomadicMobility extends MobilityModel {
|
||||
private List<TreeMap<Double, Location>> treeMapArray;
|
||||
|
||||
public NomadicMobility(int _numberOfMobileDevices, double _simulationTime) {
|
||||
super(_numberOfMobileDevices, _simulationTime);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
treeMapArray = new ArrayList<TreeMap<Double, Location>>();
|
||||
|
||||
ExponentialDistribution[] expRngList = new ExponentialDistribution[SimSettings.getInstance().getNumOfEdgeDatacenters()];
|
||||
|
||||
//create random number generator for each place
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; i < datacenterList.getLength(); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
SimSettings.PLACE_TYPES placeType = SimUtils.stringToPlace(attractiveness);
|
||||
|
||||
expRngList[i] = new ExponentialDistribution(SimSettings.getInstance().getMobilityLookUpTable()[placeType.ordinal()]);
|
||||
}
|
||||
|
||||
//initialize tree maps and position of mobile devices
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
treeMapArray.add(i, new TreeMap<Double, Location>());
|
||||
|
||||
int randDatacenterId = SimUtils.getRandomNumber(0, SimSettings.getInstance().getNumOfEdgeDatacenters()-1);
|
||||
Node datacenterNode = datacenterList.item(randDatacenterId);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
SimSettings.PLACE_TYPES placeType = SimUtils.stringToPlace(attractiveness);
|
||||
int wlan_id = Integer.parseInt(location.getElementsByTagName("wlan_id").item(0).getTextContent());
|
||||
int x_pos = Integer.parseInt(location.getElementsByTagName("x_pos").item(0).getTextContent());
|
||||
int y_pos = Integer.parseInt(location.getElementsByTagName("y_pos").item(0).getTextContent());
|
||||
|
||||
//start locating user from 10th seconds
|
||||
treeMapArray.get(i).put((double)10, new Location(placeType, wlan_id, x_pos, y_pos));
|
||||
}
|
||||
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
TreeMap<Double, Location> treeMap = treeMapArray.get(i);
|
||||
|
||||
while(treeMap.lastKey() < SimSettings.getInstance().getSimulationTime()) {
|
||||
boolean placeFound = false;
|
||||
int currentLocationId = treeMap.lastEntry().getValue().getServingWlanId();
|
||||
double waitingTime = expRngList[currentLocationId].sample();
|
||||
|
||||
while(placeFound == false){
|
||||
int newDatacenterId = SimUtils.getRandomNumber(0,SimSettings.getInstance().getNumOfEdgeDatacenters()-1);
|
||||
if(newDatacenterId != currentLocationId){
|
||||
placeFound = true;
|
||||
Node datacenterNode = datacenterList.item(newDatacenterId);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
SimSettings.PLACE_TYPES placeType = SimUtils.stringToPlace(attractiveness);
|
||||
int wlan_id = Integer.parseInt(location.getElementsByTagName("wlan_id").item(0).getTextContent());
|
||||
int x_pos = Integer.parseInt(location.getElementsByTagName("x_pos").item(0).getTextContent());
|
||||
int y_pos = Integer.parseInt(location.getElementsByTagName("y_pos").item(0).getTextContent());
|
||||
|
||||
treeMap.put(treeMap.lastKey()+waitingTime, new Location(placeType, wlan_id, x_pos, y_pos));
|
||||
}
|
||||
}
|
||||
if(!placeFound){
|
||||
SimLogger.printLine("impossible is occured! location cannot be assigned to the device!");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getLocation(int deviceId, double time) {
|
||||
TreeMap<Double, Location> treeMap = treeMapArray.get(deviceId);
|
||||
|
||||
Entry<Double, Location> e = treeMap.floorEntry(time);
|
||||
|
||||
if(e == null){
|
||||
SimLogger.printLine("impossible is occured! no location is found for the device!");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
return e.getValue();
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Nomadic Mobility model implementation
|
||||
*
|
||||
* Description:
|
||||
* MobilityModel implements basic nomadic mobility model where the
|
||||
* place of the devices are changed from time to time instead of a
|
||||
* continuous location update.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.mobility;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class NomadicMobility extends MobilityModel {
|
||||
private List<TreeMap<Double, Location>> treeMapArray;
|
||||
|
||||
public NomadicMobility(int _numberOfMobileDevices, double _simulationTime) {
|
||||
super(_numberOfMobileDevices, _simulationTime);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
treeMapArray = new ArrayList<TreeMap<Double, Location>>();
|
||||
|
||||
ExponentialDistribution[] expRngList = new ExponentialDistribution[SimSettings.getInstance().getNumOfEdgeDatacenters()];
|
||||
|
||||
//create random number generator for each place
|
||||
Document doc = SimSettings.getInstance().getEdgeDevicesDocument();
|
||||
NodeList datacenterList = doc.getElementsByTagName("datacenter");
|
||||
for (int i = 0; i < datacenterList.getLength(); i++) {
|
||||
Node datacenterNode = datacenterList.item(i);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
int placeTypeIndex = Integer.parseInt(attractiveness);
|
||||
|
||||
expRngList[i] = new ExponentialDistribution(SimSettings.getInstance().getMobilityLookUpTable()[placeTypeIndex]);
|
||||
}
|
||||
|
||||
//initialize tree maps and position of mobile devices
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
treeMapArray.add(i, new TreeMap<Double, Location>());
|
||||
|
||||
int randDatacenterId = SimUtils.getRandomNumber(0, SimSettings.getInstance().getNumOfEdgeDatacenters()-1);
|
||||
Node datacenterNode = datacenterList.item(randDatacenterId);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
int placeTypeIndex = Integer.parseInt(attractiveness);
|
||||
int wlan_id = Integer.parseInt(location.getElementsByTagName("wlan_id").item(0).getTextContent());
|
||||
int x_pos = Integer.parseInt(location.getElementsByTagName("x_pos").item(0).getTextContent());
|
||||
int y_pos = Integer.parseInt(location.getElementsByTagName("y_pos").item(0).getTextContent());
|
||||
|
||||
//start locating user shortly after the simulation started (e.g. 10 seconds)
|
||||
treeMapArray.get(i).put(SimSettings.CLIENT_ACTIVITY_START_TIME, new Location(placeTypeIndex, wlan_id, x_pos, y_pos));
|
||||
}
|
||||
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
TreeMap<Double, Location> treeMap = treeMapArray.get(i);
|
||||
|
||||
while(treeMap.lastKey() < SimSettings.getInstance().getSimulationTime()) {
|
||||
boolean placeFound = false;
|
||||
int currentLocationId = treeMap.lastEntry().getValue().getServingWlanId();
|
||||
double waitingTime = expRngList[currentLocationId].sample();
|
||||
|
||||
while(placeFound == false){
|
||||
int newDatacenterId = SimUtils.getRandomNumber(0,SimSettings.getInstance().getNumOfEdgeDatacenters()-1);
|
||||
if(newDatacenterId != currentLocationId){
|
||||
placeFound = true;
|
||||
Node datacenterNode = datacenterList.item(newDatacenterId);
|
||||
Element datacenterElement = (Element) datacenterNode;
|
||||
Element location = (Element)datacenterElement.getElementsByTagName("location").item(0);
|
||||
String attractiveness = location.getElementsByTagName("attractiveness").item(0).getTextContent();
|
||||
int placeTypeIndex = Integer.parseInt(attractiveness);
|
||||
int wlan_id = Integer.parseInt(location.getElementsByTagName("wlan_id").item(0).getTextContent());
|
||||
int x_pos = Integer.parseInt(location.getElementsByTagName("x_pos").item(0).getTextContent());
|
||||
int y_pos = Integer.parseInt(location.getElementsByTagName("y_pos").item(0).getTextContent());
|
||||
|
||||
treeMap.put(treeMap.lastKey()+waitingTime, new Location(placeTypeIndex, wlan_id, x_pos, y_pos));
|
||||
}
|
||||
}
|
||||
if(!placeFound){
|
||||
SimLogger.printLine("impossible is occured! location cannot be assigned to the device!");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getLocation(int deviceId, double time) {
|
||||
TreeMap<Double, Location> treeMap = treeMapArray.get(deviceId);
|
||||
|
||||
Entry<Double, Location> e = treeMap.floorEntry(time);
|
||||
|
||||
if(e == null){
|
||||
SimLogger.printLine("impossible is occured! no location is found for the device '" + deviceId + "' at " + time);
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
return e.getValue();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,222 +1,223 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - M/M/1 Queue model implementation
|
||||
*
|
||||
* Description:
|
||||
* MM1Queue implements M/M/1 Queue model for WLAN and WAN communication
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.network;
|
||||
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeHost;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public class MM1Queue extends NetworkModel {
|
||||
private double WlanPoissonMean; //seconds
|
||||
private double WanPoissonMean; //seconds
|
||||
private double avgTaskInputSize; //bytes
|
||||
private double avgTaskOutputSize; //bytes
|
||||
private int maxNumOfClientsInPlace;
|
||||
|
||||
public MM1Queue(int _numberOfMobileDevices) {
|
||||
super(_numberOfMobileDevices);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
WlanPoissonMean=0;
|
||||
WanPoissonMean=0;
|
||||
avgTaskInputSize=0;
|
||||
avgTaskOutputSize=0;
|
||||
maxNumOfClientsInPlace=0;
|
||||
|
||||
//Calculate interarrival time and task sizes
|
||||
double numOfTaskType = 0;
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
for (SimSettings.APP_TYPES taskType : SimSettings.APP_TYPES.values()) {
|
||||
double weight = SS.getTaskLookUpTable()[taskType.ordinal()][0]/(double)100;
|
||||
if(weight != 0) {
|
||||
WlanPoissonMean += (SS.getTaskLookUpTable()[taskType.ordinal()][2])*weight;
|
||||
|
||||
double percentageOfCloudCommunication = SS.getTaskLookUpTable()[taskType.ordinal()][1];
|
||||
WanPoissonMean += (WlanPoissonMean)*((double)100/percentageOfCloudCommunication)*weight;
|
||||
|
||||
avgTaskInputSize += SS.getTaskLookUpTable()[taskType.ordinal()][5]*weight;
|
||||
|
||||
avgTaskOutputSize += SS.getTaskLookUpTable()[taskType.ordinal()][6]*weight;
|
||||
|
||||
numOfTaskType++;
|
||||
}
|
||||
}
|
||||
|
||||
WlanPoissonMean = WlanPoissonMean/numOfTaskType;
|
||||
avgTaskInputSize = avgTaskInputSize/numOfTaskType;
|
||||
avgTaskOutputSize = avgTaskOutputSize/numOfTaskType;
|
||||
}
|
||||
|
||||
/**
|
||||
* source device is always mobile device in our simulation scenarios!
|
||||
*/
|
||||
@Override
|
||||
public double getUploadDelay(int sourceDeviceId, int destDeviceId, double dataSize) {
|
||||
double delay = 0;
|
||||
Location accessPointLocation = SimManager.getInstance().getMobilityModel().getLocation(sourceDeviceId,CloudSim.clock());
|
||||
|
||||
//mobile device to cloud server
|
||||
if(destDeviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
double wlanDelay = getWlanUploadDelay(accessPointLocation, CloudSim.clock());
|
||||
double wanDelay = getWanUploadDelay(accessPointLocation, CloudSim.clock() + wlanDelay);
|
||||
if(wlanDelay > 0 && wanDelay >0)
|
||||
delay = wlanDelay + wanDelay;
|
||||
}
|
||||
//mobile device to edge orchestrator
|
||||
else if(destDeviceId == SimSettings.EDGE_ORCHESTRATOR_ID){
|
||||
delay = getWlanUploadDelay(accessPointLocation, CloudSim.clock()) +
|
||||
SimSettings.getInstance().getInternalLanDelay();
|
||||
}
|
||||
//mobile device to edge device (wifi access point)
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID) {
|
||||
delay = getWlanUploadDelay(accessPointLocation, CloudSim.clock());
|
||||
}
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* destination device is always mobile device in our simulation scenarios!
|
||||
*/
|
||||
@Override
|
||||
public double getDownloadDelay(int sourceDeviceId, int destDeviceId, double dataSize) {
|
||||
//Special Case -> edge orchestrator to edge device
|
||||
if(sourceDeviceId == SimSettings.EDGE_ORCHESTRATOR_ID &&
|
||||
destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID){
|
||||
return SimSettings.getInstance().getInternalLanDelay();
|
||||
}
|
||||
|
||||
double delay = 0;
|
||||
Location accessPointLocation = SimManager.getInstance().getMobilityModel().getLocation(destDeviceId,CloudSim.clock());
|
||||
|
||||
//cloud server to mobile device
|
||||
if(sourceDeviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
double wlanDelay = getWlanDownloadDelay(accessPointLocation, CloudSim.clock());
|
||||
double wanDelay = getWanDownloadDelay(accessPointLocation, CloudSim.clock() + wlanDelay);
|
||||
if(wlanDelay > 0 && wanDelay >0)
|
||||
delay = wlanDelay + wanDelay;
|
||||
}
|
||||
//edge device (wifi access point) to mobile device
|
||||
else{
|
||||
delay = getWlanDownloadDelay(accessPointLocation, CloudSim.clock());
|
||||
|
||||
EdgeHost host = (EdgeHost)(SimManager.
|
||||
getInstance().
|
||||
getLocalServerManager().
|
||||
getDatacenterList().get(sourceDeviceId).
|
||||
getHostList().get(0));
|
||||
|
||||
//if source device id is the edge server which is located in another location, add internal lan delay
|
||||
//in our scenasrio, serving wlan ID is equal to the host id, because there is only one host in one place
|
||||
if(host.getLocation().getServingWlanId() != accessPointLocation.getServingWlanId())
|
||||
delay += (SimSettings.getInstance().getInternalLanDelay() * 2);
|
||||
}
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
public int getMaxNumOfClientsInPlace(){
|
||||
return maxNumOfClientsInPlace;
|
||||
}
|
||||
|
||||
private int getDeviceCount(Location deviceLocation, double time){
|
||||
int deviceCount = 0;
|
||||
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
Location location = SimManager.getInstance().getMobilityModel().getLocation(i,time);
|
||||
if(location.equals(deviceLocation))
|
||||
deviceCount++;
|
||||
}
|
||||
|
||||
//record max number of client just for debugging
|
||||
if(maxNumOfClientsInPlace<deviceCount)
|
||||
maxNumOfClientsInPlace = deviceCount;
|
||||
|
||||
return deviceCount;
|
||||
}
|
||||
|
||||
private double calculateMM1(double propogationDelay, int bandwidth /*Kbps*/, double PoissonMean, double avgTaskSize /*KB*/, int deviceCount){
|
||||
double Bps=0, mu=0, lamda=0;
|
||||
|
||||
avgTaskSize = avgTaskSize * (double)1000; //convert from KB to Byte
|
||||
|
||||
Bps = bandwidth * (double)1000 / (double)8; //convert from Kbps to Byte per seconds
|
||||
lamda = ((double)1/(double)PoissonMean); //task per seconds
|
||||
mu = Bps / avgTaskSize ; //task per seconds
|
||||
double result = (double)1 / (mu-lamda*(double)deviceCount);
|
||||
|
||||
result += propogationDelay;
|
||||
|
||||
return (result > 5) ? -1 : result;
|
||||
}
|
||||
|
||||
private double getWlanDownloadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(0,
|
||||
SimSettings.getInstance().getWlanBandwidth(),
|
||||
WlanPoissonMean,
|
||||
avgTaskOutputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
private double getWlanUploadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(0,
|
||||
SimSettings.getInstance().getWlanBandwidth(),
|
||||
WlanPoissonMean,
|
||||
avgTaskInputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
private double getWanDownloadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(SimSettings.getInstance().getWanPropogationDelay(),
|
||||
SimSettings.getInstance().getWanBandwidth(),
|
||||
WanPoissonMean,
|
||||
avgTaskOutputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
private double getWanUploadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(SimSettings.getInstance().getWanPropogationDelay(),
|
||||
SimSettings.getInstance().getWanBandwidth(),
|
||||
WanPoissonMean,
|
||||
avgTaskInputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadStarted(Location accessPointLocation, int destDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadFinished(Location accessPointLocation, int destDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadStarted(Location accessPointLocation, int sourceDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadFinished(Location accessPointLocation, int sourceDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - M/M/1 Queue model implementation
|
||||
*
|
||||
* Description:
|
||||
* MM1Queue implements M/M/1 Queue model for WLAN and WAN communication
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.network;
|
||||
|
||||
import org.cloudbus.cloudsim.core.CloudSim;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimManager;
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.edge_client.Task;
|
||||
import edu.boun.edgecloudsim.edge_server.EdgeHost;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public class MM1Queue extends NetworkModel {
|
||||
private double WlanPoissonMean; //seconds
|
||||
private double WanPoissonMean; //seconds
|
||||
private double avgTaskInputSize; //bytes
|
||||
private double avgTaskOutputSize; //bytes
|
||||
private int maxNumOfClientsInPlace;
|
||||
|
||||
public MM1Queue(int _numberOfMobileDevices, String _simScenario) {
|
||||
super(_numberOfMobileDevices, _simScenario);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
WlanPoissonMean=0;
|
||||
WanPoissonMean=0;
|
||||
avgTaskInputSize=0;
|
||||
avgTaskOutputSize=0;
|
||||
maxNumOfClientsInPlace=0;
|
||||
|
||||
//Calculate interarrival time and task sizes
|
||||
double numOfTaskType = 0;
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
for (int i=0; i<SimSettings.getInstance().getTaskLookUpTable().length; i++) {
|
||||
double weight = SS.getTaskLookUpTable()[i][0]/(double)100;
|
||||
if(weight != 0) {
|
||||
WlanPoissonMean += (SS.getTaskLookUpTable()[i][2])*weight;
|
||||
|
||||
double percentageOfCloudCommunication = SS.getTaskLookUpTable()[i][1];
|
||||
WanPoissonMean += (WlanPoissonMean)*((double)100/percentageOfCloudCommunication)*weight;
|
||||
|
||||
avgTaskInputSize += SS.getTaskLookUpTable()[i][5]*weight;
|
||||
|
||||
avgTaskOutputSize += SS.getTaskLookUpTable()[i][6]*weight;
|
||||
|
||||
numOfTaskType++;
|
||||
}
|
||||
}
|
||||
|
||||
WlanPoissonMean = WlanPoissonMean/numOfTaskType;
|
||||
avgTaskInputSize = avgTaskInputSize/numOfTaskType;
|
||||
avgTaskOutputSize = avgTaskOutputSize/numOfTaskType;
|
||||
}
|
||||
|
||||
/**
|
||||
* source device is always mobile device in our simulation scenarios!
|
||||
*/
|
||||
@Override
|
||||
public double getUploadDelay(int sourceDeviceId, int destDeviceId, Task task) {
|
||||
double delay = 0;
|
||||
Location accessPointLocation = SimManager.getInstance().getMobilityModel().getLocation(sourceDeviceId,CloudSim.clock());
|
||||
|
||||
//mobile device to cloud server
|
||||
if(destDeviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
double wlanDelay = getWlanUploadDelay(accessPointLocation, CloudSim.clock());
|
||||
double wanDelay = getWanUploadDelay(accessPointLocation, CloudSim.clock() + wlanDelay);
|
||||
if(wlanDelay > 0 && wanDelay >0)
|
||||
delay = wlanDelay + wanDelay;
|
||||
}
|
||||
//mobile device to edge orchestrator
|
||||
else if(destDeviceId == SimSettings.EDGE_ORCHESTRATOR_ID){
|
||||
delay = getWlanUploadDelay(accessPointLocation, CloudSim.clock()) +
|
||||
SimSettings.getInstance().getInternalLanDelay();
|
||||
}
|
||||
//mobile device to edge device (wifi access point)
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID) {
|
||||
delay = getWlanUploadDelay(accessPointLocation, CloudSim.clock());
|
||||
}
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* destination device is always mobile device in our simulation scenarios!
|
||||
*/
|
||||
@Override
|
||||
public double getDownloadDelay(int sourceDeviceId, int destDeviceId, Task task) {
|
||||
//Special Case -> edge orchestrator to edge device
|
||||
if(sourceDeviceId == SimSettings.EDGE_ORCHESTRATOR_ID &&
|
||||
destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID){
|
||||
return SimSettings.getInstance().getInternalLanDelay();
|
||||
}
|
||||
|
||||
double delay = 0;
|
||||
Location accessPointLocation = SimManager.getInstance().getMobilityModel().getLocation(destDeviceId,CloudSim.clock());
|
||||
|
||||
//cloud server to mobile device
|
||||
if(sourceDeviceId == SimSettings.CLOUD_DATACENTER_ID){
|
||||
double wlanDelay = getWlanDownloadDelay(accessPointLocation, CloudSim.clock());
|
||||
double wanDelay = getWanDownloadDelay(accessPointLocation, CloudSim.clock() + wlanDelay);
|
||||
if(wlanDelay > 0 && wanDelay >0)
|
||||
delay = wlanDelay + wanDelay;
|
||||
}
|
||||
//edge device (wifi access point) to mobile device
|
||||
else{
|
||||
delay = getWlanDownloadDelay(accessPointLocation, CloudSim.clock());
|
||||
|
||||
EdgeHost host = (EdgeHost)(SimManager.
|
||||
getInstance().
|
||||
getEdgeServerManager().
|
||||
getDatacenterList().get(sourceDeviceId).
|
||||
getHostList().get(0));
|
||||
|
||||
//if source device id is the edge server which is located in another location, add internal lan delay
|
||||
//in our scenasrio, serving wlan ID is equal to the host id, because there is only one host in one place
|
||||
if(host.getLocation().getServingWlanId() != accessPointLocation.getServingWlanId())
|
||||
delay += (SimSettings.getInstance().getInternalLanDelay() * 2);
|
||||
}
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
public int getMaxNumOfClientsInPlace(){
|
||||
return maxNumOfClientsInPlace;
|
||||
}
|
||||
|
||||
private int getDeviceCount(Location deviceLocation, double time){
|
||||
int deviceCount = 0;
|
||||
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
Location location = SimManager.getInstance().getMobilityModel().getLocation(i,time);
|
||||
if(location.equals(deviceLocation))
|
||||
deviceCount++;
|
||||
}
|
||||
|
||||
//record max number of client just for debugging
|
||||
if(maxNumOfClientsInPlace<deviceCount)
|
||||
maxNumOfClientsInPlace = deviceCount;
|
||||
|
||||
return deviceCount;
|
||||
}
|
||||
|
||||
private double calculateMM1(double propogationDelay, int bandwidth /*Kbps*/, double PoissonMean, double avgTaskSize /*KB*/, int deviceCount){
|
||||
double Bps=0, mu=0, lamda=0;
|
||||
|
||||
avgTaskSize = avgTaskSize * (double)1000; //convert from KB to Byte
|
||||
|
||||
Bps = bandwidth * (double)1000 / (double)8; //convert from Kbps to Byte per seconds
|
||||
lamda = ((double)1/(double)PoissonMean); //task per seconds
|
||||
mu = Bps / avgTaskSize ; //task per seconds
|
||||
double result = (double)1 / (mu-lamda*(double)deviceCount);
|
||||
|
||||
result += propogationDelay;
|
||||
|
||||
return (result > 5) ? -1 : result;
|
||||
}
|
||||
|
||||
private double getWlanDownloadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(0,
|
||||
SimSettings.getInstance().getWlanBandwidth(),
|
||||
WlanPoissonMean,
|
||||
avgTaskOutputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
private double getWlanUploadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(0,
|
||||
SimSettings.getInstance().getWlanBandwidth(),
|
||||
WlanPoissonMean,
|
||||
avgTaskInputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
private double getWanDownloadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(SimSettings.getInstance().getWanPropogationDelay(),
|
||||
SimSettings.getInstance().getWanBandwidth(),
|
||||
WanPoissonMean,
|
||||
avgTaskOutputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
private double getWanUploadDelay(Location accessPointLocation, double time) {
|
||||
return calculateMM1(SimSettings.getInstance().getWanPropogationDelay(),
|
||||
SimSettings.getInstance().getWanBandwidth(),
|
||||
WanPoissonMean,
|
||||
avgTaskInputSize,
|
||||
getDeviceCount(accessPointLocation, time));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadStarted(Location accessPointLocation, int destDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadFinished(Location accessPointLocation, int destDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadStarted(Location accessPointLocation, int sourceDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadFinished(Location accessPointLocation, int sourceDeviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,48 +1,51 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Network Model
|
||||
*
|
||||
* Description:
|
||||
* NetworkModel is an abstract class which is used for calculating the
|
||||
* network delay from device to device. For those who wants to add a
|
||||
* custom Network Model to EdgeCloudSim should extend this class and
|
||||
* provide a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.network;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public abstract class NetworkModel {
|
||||
protected int numberOfMobileDevices;
|
||||
|
||||
public NetworkModel(int _numberOfMobileDevices){
|
||||
numberOfMobileDevices=_numberOfMobileDevices;
|
||||
};
|
||||
|
||||
/**
|
||||
* initializes costom network model
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/**
|
||||
* calculates the upload delay from source to destination device
|
||||
*/
|
||||
public abstract double getUploadDelay(int sourceDeviceId, int destDeviceId, double dataSize);
|
||||
|
||||
/**
|
||||
* calculates the download delay from source to destination device
|
||||
*/
|
||||
public abstract double getDownloadDelay(int sourceDeviceId, int destDeviceId, double dataSize);
|
||||
|
||||
/**
|
||||
* Mobile device manager should inform network manager about the network operation
|
||||
* This information may be important for some network delay models
|
||||
*/
|
||||
public abstract void uploadStarted(Location accessPointLocation, int destDeviceId);
|
||||
public abstract void uploadFinished(Location accessPointLocation, int destDeviceId);
|
||||
public abstract void downloadStarted(Location accessPointLocation, int sourceDeviceId);
|
||||
public abstract void downloadFinished(Location accessPointLocation, int sourceDeviceId);
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Network Model
|
||||
*
|
||||
* Description:
|
||||
* NetworkModel is an abstract class which is used for calculating the
|
||||
* network delay from device to device. For those who wants to add a
|
||||
* custom Network Model to EdgeCloudSim should extend this class and
|
||||
* provide a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.network;
|
||||
|
||||
import edu.boun.edgecloudsim.edge_client.Task;
|
||||
import edu.boun.edgecloudsim.utils.Location;
|
||||
|
||||
public abstract class NetworkModel {
|
||||
protected int numberOfMobileDevices;
|
||||
protected String simScenario;
|
||||
|
||||
public NetworkModel(int _numberOfMobileDevices, String _simScenario){
|
||||
numberOfMobileDevices=_numberOfMobileDevices;
|
||||
simScenario = _simScenario;
|
||||
};
|
||||
|
||||
/**
|
||||
* initializes custom network model
|
||||
*/
|
||||
public abstract void initialize();
|
||||
|
||||
/**
|
||||
* calculates the upload delay from source to destination device
|
||||
*/
|
||||
public abstract double getUploadDelay(int sourceDeviceId, int destDeviceId, Task task);
|
||||
|
||||
/**
|
||||
* calculates the download delay from source to destination device
|
||||
*/
|
||||
public abstract double getDownloadDelay(int sourceDeviceId, int destDeviceId, Task task);
|
||||
|
||||
/**
|
||||
* Mobile device manager should inform network manager about the network operation
|
||||
* This information may be important for some network delay models
|
||||
*/
|
||||
public abstract void uploadStarted(Location accessPointLocation, int destDeviceId);
|
||||
public abstract void uploadFinished(Location accessPointLocation, int destDeviceId);
|
||||
public abstract void downloadStarted(Location accessPointLocation, int sourceDeviceId);
|
||||
public abstract void downloadFinished(Location accessPointLocation, int sourceDeviceId);
|
||||
}
|
||||
|
@ -1,94 +1,104 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Idle/Active Load Generator implementation
|
||||
*
|
||||
* Description:
|
||||
* IdleActiveLoadGenerator implements basic load generator model where the
|
||||
* mobile devices generate task in active period and waits in idle period.
|
||||
* Task interarrival time (load generation period), Idle and active periods
|
||||
* are defined in the configuration file.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.task_generator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.core.SimSettings.APP_TYPES;
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class IdleActiveLoadGenerator extends LoadGeneratorModel{
|
||||
|
||||
public IdleActiveLoadGenerator(int _numberOfMobileDevices, double _simulationTime, String _simScenario) {
|
||||
super(_numberOfMobileDevices, _simulationTime, _simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeModel() {
|
||||
taskList = new ArrayList<EdgeTask>();
|
||||
|
||||
//exponential number generator for file input size, file output size and task length
|
||||
ExponentialDistribution[][] expRngList = new ExponentialDistribution[SimSettings.APP_TYPES.values().length][3];
|
||||
|
||||
//create random number generator for each place
|
||||
for(int i=0; i<SimSettings.APP_TYPES.values().length; i++) {
|
||||
if(SimSettings.getInstance().getTaskLookUpTable()[i][0] ==0)
|
||||
continue;
|
||||
|
||||
expRngList[i][0] = new ExponentialDistribution(SimSettings.getInstance().getTaskLookUpTable()[i][5]);
|
||||
expRngList[i][1] = new ExponentialDistribution(SimSettings.getInstance().getTaskLookUpTable()[i][6]);
|
||||
expRngList[i][2] = new ExponentialDistribution(SimSettings.getInstance().getTaskLookUpTable()[i][7]);
|
||||
}
|
||||
|
||||
//Each mobile device utilizes an app type (task type)
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
APP_TYPES randomTaskType = null;
|
||||
double taskTypeSelector = SimUtils.getRandomDoubleNumber(0,100);
|
||||
double taskTypePercentage = 0;
|
||||
for (SimSettings.APP_TYPES taskType : SimSettings.APP_TYPES.values()) {
|
||||
taskTypePercentage += SimSettings.getInstance().getTaskLookUpTable()[taskType.ordinal()][0];
|
||||
if(taskTypeSelector <= taskTypePercentage){
|
||||
randomTaskType = taskType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(randomTaskType == null){
|
||||
SimLogger.printLine("Impossible is occured! no random task type!");
|
||||
continue;
|
||||
}
|
||||
|
||||
double poissonMean = SimSettings.getInstance().getTaskLookUpTable()[randomTaskType.ordinal()][2];
|
||||
double activePeriod = SimSettings.getInstance().getTaskLookUpTable()[randomTaskType.ordinal()][3];
|
||||
double idlePeriod = SimSettings.getInstance().getTaskLookUpTable()[randomTaskType.ordinal()][4];
|
||||
double activePeriodStartTime = SimUtils.getRandomDoubleNumber(10, 10+activePeriod); //start from 10th seconds
|
||||
double virtualTime = activePeriodStartTime; //start from 10th seconds
|
||||
|
||||
ExponentialDistribution rng = new ExponentialDistribution(poissonMean);
|
||||
while(virtualTime < simulationTime) {
|
||||
double interval = rng.sample();
|
||||
|
||||
if(interval <= 0){
|
||||
SimLogger.printLine("Impossible is occured! interval is " + interval + " for device " + i + " time " + virtualTime);
|
||||
continue;
|
||||
}
|
||||
//SimLogger.printLine(virtualTime + " -> " + interval + " for device " + i + " time ");
|
||||
virtualTime += interval;
|
||||
|
||||
if(virtualTime > activePeriodStartTime + activePeriod){
|
||||
activePeriodStartTime = activePeriodStartTime + activePeriod + idlePeriod;
|
||||
virtualTime = activePeriodStartTime;
|
||||
continue;
|
||||
}
|
||||
|
||||
taskList.add(new EdgeTask(i,randomTaskType, virtualTime, expRngList));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Idle/Active Load Generator implementation
|
||||
*
|
||||
* Description:
|
||||
* IdleActiveLoadGenerator implements basic load generator model where the
|
||||
* mobile devices generate task in active period and waits in idle period.
|
||||
* Task interarrival time (load generation period), Idle and active periods
|
||||
* are defined in the configuration file.
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.task_generator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
import edu.boun.edgecloudsim.utils.SimLogger;
|
||||
import edu.boun.edgecloudsim.utils.SimUtils;
|
||||
|
||||
public class IdleActiveLoadGenerator extends LoadGeneratorModel{
|
||||
int taskTypeOfDevices[];
|
||||
public IdleActiveLoadGenerator(int _numberOfMobileDevices, double _simulationTime, String _simScenario) {
|
||||
super(_numberOfMobileDevices, _simulationTime, _simScenario);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeModel() {
|
||||
taskList = new ArrayList<EdgeTask>();
|
||||
|
||||
//exponential number generator for file input size, file output size and task length
|
||||
ExponentialDistribution[][] expRngList = new ExponentialDistribution[SimSettings.getInstance().getTaskLookUpTable().length][3];
|
||||
|
||||
//create random number generator for each place
|
||||
for(int i=0; i<SimSettings.getInstance().getTaskLookUpTable().length; i++) {
|
||||
if(SimSettings.getInstance().getTaskLookUpTable()[i][0] ==0)
|
||||
continue;
|
||||
|
||||
expRngList[i][0] = new ExponentialDistribution(SimSettings.getInstance().getTaskLookUpTable()[i][5]);
|
||||
expRngList[i][1] = new ExponentialDistribution(SimSettings.getInstance().getTaskLookUpTable()[i][6]);
|
||||
expRngList[i][2] = new ExponentialDistribution(SimSettings.getInstance().getTaskLookUpTable()[i][7]);
|
||||
}
|
||||
|
||||
//Each mobile device utilizes an app type (task type)
|
||||
taskTypeOfDevices = new int[numberOfMobileDevices];
|
||||
for(int i=0; i<numberOfMobileDevices; i++) {
|
||||
int randomTaskType = -1;
|
||||
double taskTypeSelector = SimUtils.getRandomDoubleNumber(0,100);
|
||||
double taskTypePercentage = 0;
|
||||
for (int j=0; j<SimSettings.getInstance().getTaskLookUpTable().length; j++) {
|
||||
taskTypePercentage += SimSettings.getInstance().getTaskLookUpTable()[j][0];
|
||||
if(taskTypeSelector <= taskTypePercentage){
|
||||
randomTaskType = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(randomTaskType == -1){
|
||||
SimLogger.printLine("Impossible is occured! no random task type!");
|
||||
continue;
|
||||
}
|
||||
|
||||
taskTypeOfDevices[i] = randomTaskType;
|
||||
|
||||
double poissonMean = SimSettings.getInstance().getTaskLookUpTable()[randomTaskType][2];
|
||||
double activePeriod = SimSettings.getInstance().getTaskLookUpTable()[randomTaskType][3];
|
||||
double idlePeriod = SimSettings.getInstance().getTaskLookUpTable()[randomTaskType][4];
|
||||
double activePeriodStartTime = SimUtils.getRandomDoubleNumber(
|
||||
SimSettings.CLIENT_ACTIVITY_START_TIME,
|
||||
SimSettings.CLIENT_ACTIVITY_START_TIME + activePeriod); //active period starts shortly after the simulation started (e.g. 10 seconds)
|
||||
double virtualTime = activePeriodStartTime;
|
||||
|
||||
ExponentialDistribution rng = new ExponentialDistribution(poissonMean);
|
||||
while(virtualTime < simulationTime) {
|
||||
double interval = rng.sample();
|
||||
|
||||
if(interval <= 0){
|
||||
SimLogger.printLine("Impossible is occured! interval is " + interval + " for device " + i + " time " + virtualTime);
|
||||
continue;
|
||||
}
|
||||
//SimLogger.printLine(virtualTime + " -> " + interval + " for device " + i + " time ");
|
||||
virtualTime += interval;
|
||||
|
||||
if(virtualTime > activePeriodStartTime + activePeriod){
|
||||
activePeriodStartTime = activePeriodStartTime + activePeriod + idlePeriod;
|
||||
virtualTime = activePeriodStartTime;
|
||||
continue;
|
||||
}
|
||||
|
||||
taskList.add(new EdgeTask(i,randomTaskType, virtualTime, expRngList));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTaskTypeOfDevice(int deviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
return taskTypeOfDevices[deviceId];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,44 +1,49 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Load Generator Model
|
||||
*
|
||||
* Description:
|
||||
* LoadGeneratorModel is an abstract class which is used for
|
||||
* deciding task generation pattern via a task list. For those who
|
||||
* wants to add a custom Load Generator Model to EdgeCloudSim should
|
||||
* extend this class and provide a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.task_generator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
|
||||
public abstract class LoadGeneratorModel {
|
||||
protected List<EdgeTask> taskList;
|
||||
protected int numberOfMobileDevices;
|
||||
protected double simulationTime;
|
||||
protected String simScenario;
|
||||
|
||||
public LoadGeneratorModel(int _numberOfMobileDevices, double _simulationTime, String _simScenario){
|
||||
numberOfMobileDevices=_numberOfMobileDevices;
|
||||
simulationTime=_simulationTime;
|
||||
simScenario=_simScenario;
|
||||
};
|
||||
|
||||
/*
|
||||
* each task has a virtual start time
|
||||
* it will be used while generating task
|
||||
*/
|
||||
public List<EdgeTask> getTaskList() {
|
||||
return taskList;
|
||||
}
|
||||
|
||||
/*
|
||||
* fill task list according to related task generation model
|
||||
*/
|
||||
public abstract void initializeModel();
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Load Generator Model
|
||||
*
|
||||
* Description:
|
||||
* LoadGeneratorModel is an abstract class which is used for
|
||||
* deciding task generation pattern via a task list. For those who
|
||||
* wants to add a custom Load Generator Model to EdgeCloudSim should
|
||||
* extend this class and provide a concreate instance via ScenarioFactory
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.task_generator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import edu.boun.edgecloudsim.utils.EdgeTask;
|
||||
|
||||
public abstract class LoadGeneratorModel {
|
||||
protected List<EdgeTask> taskList;
|
||||
protected int numberOfMobileDevices;
|
||||
protected double simulationTime;
|
||||
protected String simScenario;
|
||||
|
||||
public LoadGeneratorModel(int _numberOfMobileDevices, double _simulationTime, String _simScenario){
|
||||
numberOfMobileDevices=_numberOfMobileDevices;
|
||||
simulationTime=_simulationTime;
|
||||
simScenario=_simScenario;
|
||||
};
|
||||
|
||||
/*
|
||||
* each task has a virtual start time
|
||||
* it will be used while generating task
|
||||
*/
|
||||
public List<EdgeTask> getTaskList() {
|
||||
return taskList;
|
||||
}
|
||||
|
||||
/*
|
||||
* fill task list according to related task generation model
|
||||
*/
|
||||
public abstract void initializeModel();
|
||||
|
||||
/*
|
||||
* returns the task type (index) that the mobile device uses
|
||||
*/
|
||||
public abstract int getTaskTypeOfDevice(int deviceId);
|
||||
}
|
||||
|
@ -1,36 +1,35 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeTask
|
||||
*
|
||||
* Description:
|
||||
* A custom class used in Load Generator Model to store tasks information
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
import edu.boun.edgecloudsim.core.SimSettings.APP_TYPES;
|
||||
|
||||
public class EdgeTask {
|
||||
public APP_TYPES taskType;
|
||||
public double startTime;
|
||||
public long length, inputFileSize, outputFileSize;
|
||||
public int pesNumber;
|
||||
public int mobileDeviceId;
|
||||
|
||||
public EdgeTask(int _mobileDeviceId, APP_TYPES _taskType, double _startTime, ExponentialDistribution[][] expRngList) {
|
||||
mobileDeviceId=_mobileDeviceId;
|
||||
startTime=_startTime;
|
||||
taskType=_taskType;
|
||||
|
||||
inputFileSize = (long)expRngList[_taskType.ordinal()][0].sample();
|
||||
outputFileSize =(long)expRngList[_taskType.ordinal()][1].sample();
|
||||
length = (long)expRngList[_taskType.ordinal()][2].sample();
|
||||
|
||||
pesNumber = (int)SimSettings.getInstance().getTaskLookUpTable()[_taskType.ordinal()][8];
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeTask
|
||||
*
|
||||
* Description:
|
||||
* A custom class used in Load Generator Model to store tasks information
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class EdgeTask {
|
||||
public double startTime;
|
||||
public long length, inputFileSize, outputFileSize;
|
||||
public int taskType;
|
||||
public int pesNumber;
|
||||
public int mobileDeviceId;
|
||||
|
||||
public EdgeTask(int _mobileDeviceId, int _taskType, double _startTime, ExponentialDistribution[][] expRngList) {
|
||||
mobileDeviceId=_mobileDeviceId;
|
||||
startTime=_startTime;
|
||||
taskType=_taskType;
|
||||
|
||||
inputFileSize = (long)expRngList[_taskType][0].sample();
|
||||
outputFileSize =(long)expRngList[_taskType][1].sample();
|
||||
length = (long)expRngList[_taskType][2].sample();
|
||||
|
||||
pesNumber = (int)SimSettings.getInstance().getTaskLookUpTable()[_taskType][8];
|
||||
}
|
||||
}
|
||||
|
@ -1,55 +1,53 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Location
|
||||
*
|
||||
* Description: Location class used in EdgeCloudSim
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class Location {
|
||||
private int xPos;
|
||||
private int yPos;
|
||||
private int servingWlanId;
|
||||
SimSettings.PLACE_TYPES placeType;
|
||||
public Location(SimSettings.PLACE_TYPES _placeType, int _servingWlanId, int _xPos, int _yPos){
|
||||
servingWlanId = _servingWlanId;
|
||||
placeType=_placeType;
|
||||
xPos = _xPos;
|
||||
yPos = _yPos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other){
|
||||
boolean result = false;
|
||||
if (other == null) return false;
|
||||
if (!(other instanceof Location))return false;
|
||||
if (other == this) return true;
|
||||
|
||||
Location otherLocation = (Location)other;
|
||||
if(this.xPos == otherLocation.xPos && this.yPos == otherLocation.yPos)
|
||||
result = true;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public int getServingWlanId(){
|
||||
return servingWlanId;
|
||||
}
|
||||
|
||||
public SimSettings.PLACE_TYPES getPlaceType(){
|
||||
return placeType;
|
||||
}
|
||||
|
||||
public int getXPos(){
|
||||
return xPos;
|
||||
}
|
||||
|
||||
public int getYPos(){
|
||||
return yPos;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Location
|
||||
*
|
||||
* Description: Location class used in EdgeCloudSim
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
public class Location {
|
||||
private int xPos;
|
||||
private int yPos;
|
||||
private int servingWlanId;
|
||||
private int placeTypeIndex;
|
||||
public Location(int _placeTypeIndex, int _servingWlanId, int _xPos, int _yPos){
|
||||
servingWlanId = _servingWlanId;
|
||||
placeTypeIndex=_placeTypeIndex;
|
||||
xPos = _xPos;
|
||||
yPos = _yPos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other){
|
||||
boolean result = false;
|
||||
if (other == null) return false;
|
||||
if (!(other instanceof Location))return false;
|
||||
if (other == this) return true;
|
||||
|
||||
Location otherLocation = (Location)other;
|
||||
if(this.xPos == otherLocation.xPos && this.yPos == otherLocation.yPos)
|
||||
result = true;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public int getServingWlanId(){
|
||||
return servingWlanId;
|
||||
}
|
||||
|
||||
public int getPlaceTypeIndex(){
|
||||
return placeTypeIndex;
|
||||
}
|
||||
|
||||
public int getXPos(){
|
||||
return xPos;
|
||||
}
|
||||
|
||||
public int getYPos(){
|
||||
return yPos;
|
||||
}
|
||||
}
|
||||
|
@ -1,50 +1,50 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Poisson Distribution
|
||||
*
|
||||
* Description: Wrapper class for colt Poisson Distribution
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import cern.jet.random.Poisson;
|
||||
import cern.jet.random.engine.MersenneTwister;
|
||||
import cern.jet.random.engine.RandomEngine;
|
||||
|
||||
public class PoissonDistr {
|
||||
Poisson poisson;
|
||||
RandomEngine engine;
|
||||
|
||||
/**
|
||||
* Creates a new exponential number generator.
|
||||
*
|
||||
* @param mean the mean for the distribution.
|
||||
*/
|
||||
public PoissonDistr(double mean) {
|
||||
engine = new MersenneTwister(new Date());
|
||||
poisson = new Poisson(mean, engine);
|
||||
|
||||
//always sleep for some milliseconds in order not to have same seed for iterative PoissonDistr contruction
|
||||
try {
|
||||
TimeUnit.MILLISECONDS.sleep(10);
|
||||
} catch (InterruptedException e) {
|
||||
SimLogger.printLine("impossible is occured! Poisson random number cannot be created!");
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a new random number.
|
||||
*
|
||||
* @return the next random number in the sequence
|
||||
*/
|
||||
public double sample() {
|
||||
return poisson.nextDouble();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Poisson Distribution
|
||||
*
|
||||
* Description: Wrapper class for colt Poisson Distribution
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import cern.jet.random.Poisson;
|
||||
import cern.jet.random.engine.MersenneTwister;
|
||||
import cern.jet.random.engine.RandomEngine;
|
||||
|
||||
public class PoissonDistr {
|
||||
Poisson poisson;
|
||||
RandomEngine engine;
|
||||
|
||||
/**
|
||||
* Creates a new exponential number generator.
|
||||
*
|
||||
* @param mean the mean for the distribution.
|
||||
*/
|
||||
public PoissonDistr(double mean) {
|
||||
engine = new MersenneTwister(new Date());
|
||||
poisson = new Poisson(mean, engine);
|
||||
|
||||
//always sleep for some milliseconds in order not to have same seed for iterative PoissonDistr contruction
|
||||
try {
|
||||
TimeUnit.MILLISECONDS.sleep(10);
|
||||
} catch (InterruptedException e) {
|
||||
SimLogger.printLine("impossible is occured! Poisson random number cannot be created!");
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a new random number.
|
||||
*
|
||||
* @return the next random number in the sequence
|
||||
*/
|
||||
public double sample() {
|
||||
return poisson.nextDouble();
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,103 +1,85 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - Simulation Utils
|
||||
*
|
||||
* Description: Utility class providing helper functions
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class SimUtils {
|
||||
|
||||
public static final Random RNG = new Random(System.currentTimeMillis());
|
||||
|
||||
public static int getRandomNumber(int start, int end) {
|
||||
//return pd.sample();
|
||||
long range = (long)end - (long)start + 1;
|
||||
long fraction = (long)(range * RNG.nextDouble());
|
||||
return (int)(fraction + start);
|
||||
}
|
||||
public static double getRandomDoubleNumber(double start, double end) {
|
||||
//return pd.sample();
|
||||
double range = end - start;
|
||||
double fraction = (range * RNG.nextDouble());
|
||||
return (fraction + start);
|
||||
}
|
||||
public static long getRandomLongNumber(int start, int end) {
|
||||
//return pd.sample();
|
||||
long range = (long)end - (long)start + 1;
|
||||
long fraction = (long)(range * RNG.nextDouble());
|
||||
return (fraction + start);
|
||||
}
|
||||
|
||||
public static void cleanOutputFolder(String outputFolder){
|
||||
//clean the folder where the result files will be saved
|
||||
File dir = new File(outputFolder);
|
||||
if(dir.exists() && dir.isDirectory())
|
||||
{
|
||||
for (File f: dir.listFiles())
|
||||
{
|
||||
if (f.exists() && f.isFile())
|
||||
{
|
||||
if(!f.delete())
|
||||
{
|
||||
SimLogger.printLine("file cannot be cleared: " + f.getAbsolutePath());
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Output folder is not available: " + outputFolder);
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
public static String getTimeDifference(Date startDate, Date endDate){
|
||||
String result = "";
|
||||
long duration = endDate.getTime() - startDate.getTime();
|
||||
|
||||
long diffInMilli = TimeUnit.MILLISECONDS.toMillis(duration);
|
||||
long diffInSeconds = TimeUnit.MILLISECONDS.toSeconds(duration);
|
||||
long diffInMinutes = TimeUnit.MILLISECONDS.toMinutes(duration);
|
||||
long diffInHours = TimeUnit.MILLISECONDS.toHours(duration);
|
||||
long diffInDays = TimeUnit.MILLISECONDS.toDays(duration);
|
||||
|
||||
if(diffInDays>0)
|
||||
result += diffInDays + ((diffInDays>1 == true) ? " Days " : " Day ");
|
||||
if(diffInHours>0)
|
||||
result += diffInHours % 24 + ((diffInHours>1 == true) ? " Hours " : " Hour ");
|
||||
if(diffInMinutes>0)
|
||||
result += diffInMinutes % 60 + ((diffInMinutes>1 == true) ? " Minutes " : " Minute ");
|
||||
if(diffInSeconds>0)
|
||||
result += diffInSeconds % 60 + ((diffInSeconds>1 == true) ? " Seconds" : " Second");
|
||||
if(diffInMilli>0 && result.isEmpty())
|
||||
result += diffInMilli + ((diffInMilli>1 == true) ? " Milli Seconds" : " Milli Second");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static SimSettings.PLACE_TYPES stringToPlace(String attractiveness){
|
||||
SimSettings.PLACE_TYPES placeType = null;
|
||||
if(attractiveness.equals("1"))
|
||||
placeType = SimSettings.PLACE_TYPES.ATTRACTIVENESS_L1;
|
||||
else if(attractiveness.equals("2"))
|
||||
placeType = SimSettings.PLACE_TYPES.ATTRACTIVENESS_L2;
|
||||
else if(attractiveness.equals("3"))
|
||||
placeType = SimSettings.PLACE_TYPES.ATTRACTIVENESS_L3;
|
||||
else{
|
||||
SimLogger.printLine("Unknown attractiveness level! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
return placeType;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Title: EdgeCloudSim - Simulation Utils
|
||||
*
|
||||
* Description: Utility class providing helper functions
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class SimUtils {
|
||||
|
||||
public static final Random RNG = new Random(System.currentTimeMillis());
|
||||
|
||||
public static int getRandomNumber(int start, int end) {
|
||||
//return pd.sample();
|
||||
long range = (long)end - (long)start + 1;
|
||||
long fraction = (long)(range * RNG.nextDouble());
|
||||
return (int)(fraction + start);
|
||||
}
|
||||
public static double getRandomDoubleNumber(double start, double end) {
|
||||
//return pd.sample();
|
||||
double range = end - start;
|
||||
double fraction = (range * RNG.nextDouble());
|
||||
return (fraction + start);
|
||||
}
|
||||
public static long getRandomLongNumber(int start, int end) {
|
||||
//return pd.sample();
|
||||
long range = (long)end - (long)start + 1;
|
||||
long fraction = (long)(range * RNG.nextDouble());
|
||||
return (fraction + start);
|
||||
}
|
||||
|
||||
public static void cleanOutputFolder(String outputFolder){
|
||||
//clean the folder where the result files will be saved
|
||||
File dir = new File(outputFolder);
|
||||
if(dir.exists() && dir.isDirectory())
|
||||
{
|
||||
for (File f: dir.listFiles())
|
||||
{
|
||||
if (f.exists() && f.isFile())
|
||||
{
|
||||
if(!f.delete())
|
||||
{
|
||||
SimLogger.printLine("file cannot be cleared: " + f.getAbsolutePath());
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Output folder is not available: " + outputFolder);
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
public static String getTimeDifference(Date startDate, Date endDate){
|
||||
String result = "";
|
||||
long duration = endDate.getTime() - startDate.getTime();
|
||||
|
||||
long diffInMilli = TimeUnit.MILLISECONDS.toMillis(duration);
|
||||
long diffInSeconds = TimeUnit.MILLISECONDS.toSeconds(duration);
|
||||
long diffInMinutes = TimeUnit.MILLISECONDS.toMinutes(duration);
|
||||
long diffInHours = TimeUnit.MILLISECONDS.toHours(duration);
|
||||
long diffInDays = TimeUnit.MILLISECONDS.toDays(duration);
|
||||
|
||||
if(diffInDays>0)
|
||||
result += diffInDays + ((diffInDays>1 == true) ? " Days " : " Day ");
|
||||
if(diffInHours>0)
|
||||
result += diffInHours % 24 + ((diffInHours>1 == true) ? " Hours " : " Hour ");
|
||||
if(diffInMinutes>0)
|
||||
result += diffInMinutes % 60 + ((diffInMinutes>1 == true) ? " Minutes " : " Minute ");
|
||||
if(diffInSeconds>0)
|
||||
result += diffInSeconds % 60 + ((diffInSeconds>1 == true) ? " Seconds" : " Second");
|
||||
if(diffInMilli>0 && result.isEmpty())
|
||||
result += diffInMilli + ((diffInMilli>1 == true) ? " Milli Seconds" : " Milli Second");
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user