0% found this document useful (0 votes)
14 views120 pages

EdgeCloudSim ModellingGuide

The document discusses the modeling and simulation of edge computing environments, highlighting various simulators and their functionalities, particularly focusing on EdgeCloudSim. It outlines the motivations for developing such simulators, the core modules of EdgeCloudSim, and the challenges faced by existing network and cloud computing simulators. The document also provides insights into performance evaluation methods and the characteristics of different edge/fog simulators.

Uploaded by

Silla IBRAHIM
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views120 pages

EdgeCloudSim ModellingGuide

The document discusses the modeling and simulation of edge computing environments, highlighting various simulators and their functionalities, particularly focusing on EdgeCloudSim. It outlines the motivations for developing such simulators, the core modules of EdgeCloudSim, and the challenges faced by existing network and cloud computing simulators. The document also provides insights into performance evaluation methods and the characteristics of different edge/fog simulators.

Uploaded by

Silla IBRAHIM
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Modelling and Simulation of

Edge Computing Environments


by Cagatay Sonmez, October 2025
The Primary Sources Used in This Document
• Monika Gill, Dinesh Singh, "A comprehensive study of simulation frameworks and research
directions in fog computing," Computer Science Review, Volume 40, 2021.
• Andras Markus, Attila Kertesz, "A survey and taxonomy of simulation environments
modelling fog computing", Simulation Modelling Practice and Theory, Volume 101, 2020.
• Calheiros, R. N., R. Ranjan, A. Beloglazov, C. A. F. De Rose and R. Buyya, "CloudSim: A Toolkit
for Modeling and Simulation of Cloud Computing Environments and Evaluation of
Resource Provisioning Algorithms", Softw. Pract. Exper., Vol. 41, No. 1, pp. 23–50, Jan. 2011.
• Sonmez, Cagatay, Atay Ozgovde, and Cem Ersoy. "EdgeCloudSim: An environment for
performance evaluation of edge computing systems" Transactions on Emerging
Telecommunications Technologies 29, no. 11 (2018): e3493.
Reality, Testbeds, Simulators
Motivation of Using Simulators

Real-word Deployments Testbeds

Repeatable and scalable


Design and development
experiments

Deployment of the Setting up and maintaining


datacenters testbeds

Managing mobile clients Cost


Methods of Performance Evaluation

Emulators Simulators Hybrid Models


• Duplicates all the software, • Creates an environment that • In some cases, simulators and
hardware, and operating mimics the behavior of a real emulators are used together. Here, the
systems of a real device device emulators are used to model the
• Emulators are more reliable • Suitable for rapid prototyping focused area more realistically
and suitable for debugging and testing of an idea that has • In some studies, the network topology
• However, emulators usually not yet been developed is determined with a simulation study,
runs slow • However, simulators can and then the performance of the
sometimes oversimplify the real relevant topology is evaluated through
solution emulators such as maxinet and mininet
Continuous-Time and Discrete-Event Models

Continuous-time simulation Discrete-event simulation (DES)


• Tracks system state continuously • Emphasizes events and state changes
• More granular and more accurate but require • Uses time skipping; it jumps between
more computational resources changes in the system
• Continuous-time simulation is typically • Often relies on queueing theory
applied to natural sciences phenomena like • The majority of network and cloud
biological, chemical, and environmental simulators are DES-based.
processes

Image source: Helal, Magdy. A hybrid system dynamics-discrete event simulation approach to simulating the manufacturing enterprise. University of Central Florida, 2008.
CloudSim Simulator
• CloudSim [1] is the most used cloud simulator for typical cloud computing scenarios.
• CloudSim is open-source, Java based solution, and it is built on SimJava [2].
• It is mainly designed for modeling Infrastructure as a Service (IaaS) cloud computing
environments.
• In CloudSim, users define tasks by creating so-called cloudlets.
• Cloudlets (tasks) are processed by virtual machines running on cloud resources.
• CloudSim also contains a power model, but it is only restricted to CPU energy
consumption.
CloudSim Simulator cont.
• CloudSim supports both modeling of the cloud components such as datacenters,
hosts, and VMs and the resource provisioning policies such as CPU, storage,
memory, and bandwidth utilization models.
• Using CloudSim for Edge/Fog scenarios brings some difficulties.
• Some aspects of the VM utilization model are unrealistic.
• There is no limitation while assigning tasks to VMs.
• It does not provide realistic network delay model.
• It uses fixed static variables as network delay.
• It does not provide anything related to user mobility.

There are many extensions of CloudSim, focusing on mostly insufficient features.


Extensions of CloudSim

Image source: Andras Markus, Attila Kertesz, "A survey and taxonomy of simulation environments modelling fog computing", Simulation Modelling Practice and Theory, Volume 101, 2020.
CloudSim Core Entities
Datacenter: Encapsulates a set of compute hosts that
can either be homogeneous or heterogeneous with
respect to their hardware configurations.
Host: A host is associated to a datacenter. Host
executes actions related to management of VMs.

VM: A virtual machine models which is managed and


hosted by a Cloud host component.

Cloudlet: This term is used as a task in CloudSim.


Cloudlet simply represents a task.
Image source: [Link]
DatacenterBroker: Represents a broker (user) and has started-with-cloudsim-631e7f6b85d6

two mechanisms for submitting VM provisioning


requests to data centers and submitting tasks to VMs.
CloudSim VM and Task Provisioning Policies
• VMScheduler
• VmSchedulerSpaceShared: Only one VM can run on a host’s core at a time.
• VmSchedulerTimeShared: Dynamically distribute the capacity of a core among.
• CloudletScheduler
• CloudletSchedulerSpaceShared: Only one task can run on a VM’s core at a time.
• CloudletSchedulerTimeShared: All tasks can be assigned to the same VM, and they are
dynamically context switched during their life cycle.

Space Shared -> queued and executed sequentially

Time Shared -> run simultaneously by context-switching


Time-shared and space-shared policy for VMs and jobs

(a) Space-share for VMs and jobs, (b) space-share for VMs and time-share for jobs,
(c) time-share for VMs and space-share for jobs, and (d) time-share for VMs and jobs.
Space-Shared Schedular for VMs and Tasks
➢ Jobs (tasks) j1, j2, j3, and j4 to be hosted in VM1, whereas j5, j6, j7, and j8 to be hosted in VM2

As each VM requires two cores, only one VM can run at a time.


(VM2 must wait for VM1 to finish)

Each job demands only one core, hence j1 and j2 can run simultaneously.
During this period, the j3 and j4 wait in the execution queue.
Space-Shared for VMs & Time-Shared for Tasks
➢ Jobs (tasks) j1, j2, j3, and j4 to be hosted in VM1, whereas j5, j6, j7, and j8 to be hosted in VM2

As each VM requires two cores, only one VM can run at a time.

CloudSim simplifies
context switching by
extending each task's
runtime to reflect
shared resource usage,
not by executing them
in discrete time slices.

All tasks assigned to VM1 run simultaneously and they are


dynamically context switched during their life cycle.
Time-Shared for VMs & Space-Shared for Tasks
➢ Jobs (tasks) j1, j2, j3, and j4 to be hosted in VM1, whereas j5, j6, j7, and j8 to be hosted in VM2

Each VM uses 2 cores, both can run in parallel.

Each job requires only one core and cannot run simultaneously.
Each job should wait for the preceding jobs in the queue to finish executing.
Characteristic Features of Edge/Fog Simulators
Core Mo- Scala- Energy Pub.
Simulator Lang. Type Network Modelling Infrastructure entities
simulator bility bility + Cost year

Event Link bandwidth, delay, network Sensors, Actuators, Fog devices


iFogSim [3] Java CloudSim ✗ ✗ E+C 2017
driven usage and Datacenters

FogTorch [4] Java NA NA ✗ ✗ ✗ Latency, bandwidth Things, Fog and Cloud 2017
Event
EdgeCloudSim [5] Java CloudSim ✗ ✗ WAN link model, WLAN link model Mobile client, Edge server, Cloud 2017
driven
IoT devices, Fog gw nodes, Fog
FogBus [6] Java NA NA – E Latency, network usage 2018
compute nodes, Cloud datacenter
Network Packet drop, retransmission, link Mobile end node devices, Fog
FogNetSim++ [7] C++ OMNET++ E+C 2018
driven bandwidth, bit error rate nodes, Broker nodes, Base stations

Edge-Fog Cloud [8] Python NA NA ✗ C Network cost Edge, Fog layer and Datastore 2016
MiniNet & Virtual cloud/fog/edge instance,
FogBed [9] Python Emulator ✗ ✗ – Service latency 2018
Docker Virtual switches and links
Fog nodes, Network
EmuFog [10] Java Emulator MaxiNet ✗ C Latency 2017
devices(routers)
Event
DEVS for Fog [11] C++ NA – – – – User, Broker, Fog, Cloud 2017
driven

Data source: Monika Gill, Dinesh Singh, "A comprehensive study of simulation frameworks and research directions in fog computing," Computer Science Review, Volume 40, 2021.
Citations of Simulators Distributed Over the Years
Total 2017 2018 2019 2020 2021 2022 2023 2024
DEVS for Fog 20 1 2 4 6 3 0 4 4

EdgeCloudSim 405 0 12 39 58 82 57 69 50

Edge-Fog Cloud 91 1 8 8 15 23 14 7 8

FogBed 43 0 0 1 9 8 8 7 8

FogBus 240 0 0 3 33 47 59 46 33

FogNetSim++ 123 0 0 9 27 23 23 18 16

FogTorch 335 0 24 52 56 56 55 40 33

FogTorch Pi 83 0 5 15 20 9 14 7 9

iFogSim 982 15 44 115 166 183 164 131 111

iFogSim2 112 0 0 0 0 0 5 38 43

Data Source: Web of Science (the total value includes 2025, as of November 10th)
Open Repositories of Fog/Edge Simulators
Current # of # of
Simulator Source Code Last Commit License
Release commits contrib.

iFogSim [Link] 21 Sep. 2016 v2.0 71 2 –

iFogSim2 [Link] 1 Apr. 2025 v2.0.0 66 1 –

FogTorch [Link] 22 Dec. 2016 NRP 28 1 MIT

EdgeCloudSim [Link] 2 Nov. 2020 v 4.0 42 3 GPL-3.0

FogBus [Link] 30 Mar. 2019 v 2.0 199 2 GPL-2.0

FogNetSim++ [Link] 5 Dec. 2018 NRP 9 1 GPL-3.0

Edge-Fog Cloud [Link] 17 Oct. 2016 NRP 9 1 GPL-3.0


Mininet
FogBed [Link] 11 Nov. 2018 NRP 2105 35
2.3.0d1
EmuFog [Link] 28 Sep. 2020 v 2.0 259 2 MIT

DEVS for Fog [Link] 23 Sep. 2016 NRP – – –

As of October 2025 (README updates are ignored), NRP: No Releases Published, Blank (–): Not Available.
Existing Edge/Fog Simulators & Programming Lang. Used

Image source: Monika Gill, Dinesh Singh, "A comprehensive study of simulation frameworks and research directions in fog computing," Computer Science Review, Volume 40, 2021.
A
EdgeCloudSim
C. Sonmez, A. Ozgovde and C. Ersoy, "EdgeCloudSim: An environment for
performance evaluation of edge computing systems," Transactions on
Emerging Telecommunications Technologies, Vol. 29, No. 11, p. e3493, 2018
What is EdgeCloudSim
• EdgeCloudSim is a new simulator
• Provides a simulation environment specific to edge computing scenarios
• EdgeCloudSim is based on CloudSim but adds some additional functionalities
• Extensible and easy-to-use
• Publicly available on GitHub
• [Link]
• Has high reputation; as of October 2025
• 736 citations based on Google Scholar
• A discussion forum [12] with more than 200 members
• More than 26K views on YouTube channel [13]
What is EdgeCloudSim
• EdgeCloudSim is a new simulator
• Provides a simulation environment specific to edge computing scenarios
• EdgeCloudSim is based on CloudSim but adds some additional functionalities
• Extensible and easy-to-use
• Publicly available on GitHub
• [Link]
• Has high reputation; as of October 2025
• 736 citations based on Google Scholar
• A discussion forum [12] with more than 200 members
• More than 26K views on YouTube channel [13]
Motivation of Developing a Simulator
Motivation of Developing a Simulator

❖Network simulators do
not consider cloud
computing elements
• Datacenters
• Hosts
• VMs
• Brokers
Motivation of Developing a Simulator

❖Network simulators do ❖ Cloud computing


not consider cloud oriented simulators
computing elements do not handle
• Datacenters network delay and
• Hosts mobility properly
• VMs
• Brokers
Motivation of Developing a Simulator

❖ There is no easy-to-use simulator


for Edge Computing scenarios

❖Network simulators do ❖ Cloud computing


not consider cloud oriented simulators
computing elements do not handle
• Datacenters network delay and
• Hosts mobility properly
• VMs
• Brokers
EdgeCloudSim Core Modules

Mobility Module

Networking Module

Load Generator Module

Edge Orchestrator Module


EdgeCloudSim Core Modules cont.

Mobility Module
• Manages the location of edge devices and clients

AP AP
Edge Server Edge Server
EdgeCloudSim Core Modules cont.

Networking Module
• Adds link delays between the network components
Global Cloud

WAN

Base Station
MAN

AP AP
Edge Server Edge Server

WLAN WLAN
EdgeCloudSim Core Modules cont.

Load Generator Module


• Generates tasks based on the simulated scenario

AP
Edge Server
EdgeCloudSim Core Modules cont.

Edge Orchestrator Module


• The edge orchestrator can be considered as the central nervous system
• It makes critical decisions, such as: Global Cloud

• Resource provisioning
Internet
• Scales up/down the servers Edge
• Generates/terminates VMs Orchestrator

• Migrates tasks AP AP
Edge Servers
• Coordinates services
Extensibility
Sample
Factory
Class
Extending
Network
Model…
Downloading EdgeCloudSim
• EdgeCloudSim is publicly available in GitHub.
• You should clone EdgeCloudSim repository to start development.
• $git clone [Link]
• After cloning the repository, you can use your favorite IDE such as Eclipse and NetBeans.
• Please check EdgeCloudSim wiki page for more.
• Using command line
• [Link]
• Using Eclipse IDE
• [Link]
running-sample-application
• Using Netbeans IDE
• [Link]
running-sample-application
EdgeCloudSim Folder Hierarchy

Source folder containing java source codes

Documents folder mostly used in GitHub readme files

Java libraries used by EdgeCloudSim and sample applications

Configuration files and Matlab (plotter) scripts for each sample


application is stored under scripts folder
EdgeCloudSim Core Classes

core package of EdgeCloudSim and related classes

Abstract edge orchestrator class and its default implementation

Abstract mobility model class and its default implementation

Abstract network model class and its default implementation

Abstract load generator class and its default implementation

utils package of EdgeCloudSim and related classes


EdgeCloudSim Computational Classes
cloud_server package includes classes for the cloud
datacenter and associated hosts and VMs.

edge_client package includes classes that represents a


broker (user).

mobile_processing_unit package includes classes for the


mobile datacenter and associated hosts and VMs.

edge_server package includes classes for the edge


datacenter and associated hosts and VMs.
Important Classes: SimSettings
The SimSettings class is located under core
package, and responsible for storing all
simulation settings by reading the values
in the configuration files.

SimSettings class is not designed to be


extended via the factory pattern; if you need to
store different simulation settings for your
simulation scenario, you will need to modify this
core class!
[Link] file
Simulation and warm-up time

Values to use for file logging

Number of mobile devices to be used in the simulation

Values to be used in the network model

CPU, memory and storage specifications for mobile devices

Orchestrator policies and scenarios

Any variables related to


simulation settings are kept in this file.
Important Classes: MobilityModel
The MobilityModel class is located under
mobility package, and responsible for providing
location of the devices at a specific time.

You can implement a custom mobility model


to handle your business logic. Be sure to use
memory- and CPU-optimized approaches,
such as utilizing a TreeMap, etc.
Extending
Mobility
Model…
[Link] file
How much this app is used by mobile devices
Possibility of offloading to the cloud (for some scenarios)
Interarrival time for task generation (Poisson process)
How sensitive the app is to latency (for some scenarios)
Active period for Active/Idle task generation model
Idle period for Active/Idle task generation model
Average size of data loaded by the task
Average size of data downloaded after the task execution
Average task length in millions of instructions (MI)
How much CPU core is used by tasks created by this app
CPU utilization ratio of related tasks on compute nodes

Applications create tasks to be offloaded


with the properties specified in this file.
Important Classes: LoadGeneratorModel
The LoadGeneratorModel is responsible for
generating a task list that includes task
properties, such as the task start time, etc.

Most applications use the basic


IdleActiveLoadGeneratorModel, but you can
implement your own task generation model by
preparing a custom task list.
edge_devices.xml file
Bandwidth, CPU, memory and storage cost values for
this datacenter (based on CloudSim specifications)

x, y position of the datacenter (will be important for


your mobility model)

Each WLAN should have a unique id

Attractiveness level of this location (for some scenarios)

CPU, memory and storage specifications for the


corresponding host

CPU, memory and storage specifications for the


corresponding host

Edge servers are created with


properties specified in this file
Important Classes: *ServerManager
These classes are responsible for creating
computational resources provided by
EdgeCloudSim.

Each class’s default implementation uses


the configuration values related to the
corresponding server (processing unit)
on the cloud, edge, or mobile device.

The name MobileServerManager may


not seem intuitive. It represents the
processing unit of the mobile device,
and this name was chosen to follow a
common convention.
Datacenter, Host and VM Hierarchy in EdgeCloudSim
Common Datacenter with many hosts and VMs for Cloud servers
Host 1 Host 2 Hostn

Cloud Layer VM1 VM2 VM3 VM1 VM2 VM3 VM1 VM2 VM3

VM4 VM5 VMn VM4 VM5 VMn VM4 VM5 VMn

Datacenter for Edge 1 Datacenter for Edge n


Host 1 Hostn Host 1 Hostn

VM1 VM2 VM1 VM2 VM1 VM2 VM1 VM2


Edge Layer … … …
VM3 VMn VM3 VMn VM3 VMn VM3 VMn

Datacenter for mobile devices (One datacenter is used to decrease memory usage)

Host1 Host2 Host3 Hostn


End User Layer …
VM1 VM1 VM1 VM1
Using Conf. Files
Configuration files are mostly provided via
command line arguments (especially when
running through terminal).

Sometimes developers can use static file path for


convenience (especially when running the
simulations through IDEs during development).

SimSettings is initialized with the configuration


files.
Important Classes: ScenarioFactory
The ScenarioFactory class provides extensibility. You
can provide versions of most of the important classes
with different behaviors to implement your
simulation scenario.

You have to provide a concrete implementation of


ScenarioFactory class to create the SimManager class
and run the simulation in your java main method.

Sample code snippet from Java main method


Important Classes: SimManager
SimManager provides many abstract
classes such as Network Model, Mobility
Model, Edge Orchestrator to other
modules.

You need to extend SimEntity to create


custom events!

This class was intended to be a singleton;


however, due to specific requirements for
its recreation, it could not fully maintain
singleton properties.

This class handles important events


such as task creation, simulation
termination etc.
Important Classes: EdgeOrchestrator
The edge orchestrator can be considered as the central
nervous system. Make all critical decisions here in this class.

You need to extend SimEntity to create custom events!

This generic function is mostly used to decide which task


should be sent to which datacenter.

This generic function is mostly used to decide which VM the


task should be assigned to.

You can add other helper functions in your concrete


implementation of this class to handle your business logic!
Important Classes: MobileDeviceManager
MobileDeviceManager extends CloudSim’s
DatacenterBroker class which represents a
broker (user).

CloudSim does not provide realistic VM


CPU utilization model, so that this class is
responsible for providing a CPU utilization
model based on the simulation scenario.

It is basically responsible for submitting


VM provisioning requests to data centers
(submitting tasks to VMs).

For convenience, this class often


handles (simulates) the tasks transition
between the entities.
Important Classes: SimLogger
The SimSettings class is located under util package,
and responsible for saving simulation results to files.

The first version of SimLogger was logging events to


files as they happened, but this approach requires a
lot of I/O. Therefore, it was updated to collect the
results of the events in data structures and write
them to the files at the end of the simulation!

SimLogger class is not designed to be


extended via the factory pattern; if you need to
log different simulation results, you will need to
modify this core class!
Helper Scripts
Each application has utilities in its scripts folder to run
simulations and plot results easily

Configuration files located in config folder

MATLAB scripts to plot graphs

Python scripts to plot graphs

Script to compile sample app

Script to run sample app

Used to run multiple simulations with different config files

Script to stop all simulation processes

Scripts are tested & verified on Linux


based operating systems including Mac OS.
Running Applications on Linux Terminal
1. Open Terminal: Open your terminal and navigate to
cd EdgeCloudSim/scripts/<sample_app>

2. Compile the Code: Run the compile script


./[Link]

3. Run Scenarios: Execute the simulation with


./run_scenarios.sh <num_parallel_processes> <num_iterations>

4. View the Results: Simulation outputs will be automatically generated under


EdgeCloudSim/scripts/<sample_app>/output/<date>/default_config/

5. Visualize the Results: Use the provided Python or MATLAB scripts to plot and analyze your results.

More info: [Link]


Running Applications on Your IDE

It is recommended to run the


scripts via the Linux terminal for
proper execution. However, for
fast prototyping, running them
directly through an IDE can be
more convenient.

Users who prefer this approach


can execute the main method
without providing any arguments,
but they must ensure that the
values displayed in the figures are
correctly set beforehand.

More info: [Link]


How Many Repetitions?
✓ The required number of repetitions depends on your results and your research goals.
✓ The most important factor is the variance!
✓ You should run the simulation until the desired Confidence Interval (CI) is achieved.

Start with Compute the mean and


Is CI within Yes
an initial the current Confidence
your desired Stop
number Interval (CI) for your
precision?
(e.g., n=10). key metric.

No
Increase
repetition
How Many Repetitions?
✓ The required number of repetitions depends on your results and your research goals.
✓ The most important factor is the variance!
✓ You should run the simulation until the desired Confidence Interval (CI) is achieved.

Start with Compute the mean and


Is CI within Yes
an initial the current Confidence
your desired Stop
number Interval (CI) for your
precision?
(e.g., n=10). key metric.

No
Increase
repetition
2 vs 10 Repetitions
▪ Performing only a few repetitions leads to a wider Confidence Interval, decreasing the
accuracy and reliability of the results.
2 Repetitions (Low Reliability) 10 Repetitions (Higher Reliability)
Plotting Simulation Results with MATLAB

First of all, configure getConfiguration.m file


based on your simulation scenario and preferences!

Configuration file for the other helper scripts

Helper scripts to plot graphics using generic line plotter

Plots bar graphs for delay types

Generic line plotter that generates most of the graphics

Plots a heat-map like graphics to analyze location of the clients


MATLAB - Config File (getConfiguration.m)
Folder path where simulation results are saved

Number of iterations

Scenario names used in the simulations

Corresponding legend texts in figures

Position, size and font size of graphs

Common x axis label

Number of clients used in the simulation

Option to save graph in pdf format

Option to plot graphs with 95% confidence interval error bars

Option to plot graph in color


MATLAB - Sample Plotter Script

5: Calculate percentage value based on all results


3: Label for y axis
6: Position of the legend

1: Line number of the result 4: Result of a specific application


2: Column number of the result
Plotting Simulation Results with Python
Python implementation of the MATLAB graph plotter
scripts, developed to reproduce the same figures and
analyses in a more flexible, open-source environment.

Configuration file for the other helper scripts

Helper scripts to plot graphics using generic line plotter

Plots bar graphs for delay types

Generic line plotter that generates most of the graphics

Plots a heat-map like graphics to analyze location of the clients

List of packages or libraries needed to run Python scripts


Python - Config File ([Link])
Folder path where simulation results are saved
Number of iterations
Scenario names used in the simulations
Corresponding legend texts in figures
Position, size and font size of graphs

Common x axis label

Number of clients used in the simulation

Option to save graph in pdf format

Option to use 95% confidence interval error bars

Option to plot graph in color

Line/marker styles for colorful/colorless graphs


Python - Sample Plotter Script
5: Calculate percentage value based on all results

3: Label for y axis 6: Position of the legend

1: Line number of the result 4: Result of a specific application


2: Column number of the result
Live Demo Session
A Case Study 1 – VM Scheduling
Performance Evaluation of Different VM Allocation Policies

Find the source code below:


[Link]
edgecloudsim/applications/tutorial1
Simulation Scenario
• Mobile devices can only Edge Server Edge Server
offload task to the edge
servers connected to the AP AP
serving access point
• Edge servers operates a
WLAN WLAN
variable number of VMs
• This scenario compares
different VM provisioning
algorithms
Competitor VM Provisioning Algorithms
Task
• Random (RND): A random VM is
selected
• First-Fit (FF): First available VM is
selected FF NF* BF WF

• Next-Fit (NF): The hosts are visited


in order and the first suitable VM
is selected.
• Best-Fit (BF): The VM with the
highest CPU utilization is selected
VM1 VM2 VM3 VM4 VM1 VM2 VM3 VM4 VM1 VM2 VM3 VM4
• Worst-Fit (WF): The VM with the
Host 1 Host 2 Host 3
least CPU utilization is selected
Edge Datacenter
* Assuming the previous selection of the NF algorithm was one of the VM in Host1.
Applications Used in This Simulation
Parameter Aug. Reality Health Infotainment
Usage Percentage (%) 30 20 50
Task Interarrival (sec) 2 3 7
Active/Idle Period (sec) 40/20 45/90 30/45
VM Utilization on Edge Server (%) 6 2 3.6
Task Length (GI) 15 3 9
Upload/Download Data (KB) 1500/50 50/1250 250/1000

Clients are utilizing an application that generates task according to a Poisson process.
Nomadic Mobility Model
• There is no real time walking pattern,
user location is updated at random
time intervals
• Probability of selecting a new location
is same for all locations
• We use variable locations with
different attractiveness levels in
simulations
• The attractiveness level determines
how much time the user will spend
(dwell time) in the corresponding place
Empirical WAN/WLAN Model

S L 300
AD WLAN Bandwidth
b er Amazon S3
Fi

Average Bandwidth (Mbps)


250 WAN Bandwidth
WiFi 802.11

200

WAN Bandwidth Analysis Setup 150

100

W
iF 50
.3

i8
02

Huawei HG253s 02
8

Gigabit Ethernet .1
h.

802.11n 2T × 2R antenna 1
Et

0
0 20 40 60
Number of Clients
Lenovo T550 MacBook Pro Late 2011
Intel Core i7-5600U (2.6 Ghz) Intel Core i7-2675QM (2.2 Ghz)
Gigabit Ethernet 802.11n WiFi
16 GB RAM 8 GB RAM

WLAN Bandwidth Analysis Setup


Simulation Parameters

Parameter Value
Simulation Time/Warm-up Period 30/5 minutes
Number of Repetitions 10
WLAN Delay Model Empirical
MAN Delay Fixed (10 ms)
Number of VMs per Edge Host 8
Number of Cores per Edge VM 2
VM Processor Speed per Edge CPU 10 GIPS
Mobility Model Nomadic Mobility
Number of Locations for Type 1/2/3 places 2/4/8
Mean waiting (dwell) time in Type 1/2/3 places 10/10/10 minutes
Important Simulation Results
Service Time Analysis

Processing time dominates the average service time!


Processing Time per Task Types

Task Size: 3 GI Task Size: 9 GI Task Size: 15 GI


A
Case Study 2 – What to Offload
Performance Evaluation of Different Approaches that Decide Granularity
of Task Offloading

Find the source code below:


[Link]
edgecloudsim/applications/tutorial2
Simulation Scenario
• Mobile devices can operate Edge Server Edge Server
tasks locally or offload them
to the edge servers AP AP
connected to the serving
access point
WLAN WLAN
• Edge servers operates a
variable number of VMs
• Worst-fit VM provisioning
(least loaded first) algorithm
is used
Competitor Task Offloading Algorithms
• Random: A random VM is selected
• Mobile Device Utilization Heuristic

If average mobile device CPU utilization < 75 execute task locally


Otherwise, offload to edge server

• Edge Utilization Heuristic

If average edge server CPU utilization < 90 offload task to edge server
Otherwise, execute task locally
Applications Used in This Simulation

Parameter Aug. Reality Health Infotainment


Usage Percentage (%) 30 30 40
Task Interarrival (sec) 2 3 5
Active/Idle Period (sec) 40/20 60/30 30/30
VM Utilization on Edge/Client (%) 5/20 2/8 4/16
Task Length (GI) 20 8 16
Upload/Download Data (KB) 3000/1000 900/500 2000/4000
Simulation Parameters

Parameter Value
Simulation Time/Warm-up Period 15/1 minutes
Number of Repetitions 10
WLAN Delay Model Empirical
MAN Delay Fixed (5 ms)
Number of VMs per Edge/Mobile Host 8/1
Number of Cores per Edge/Mobile VM 2/1
VM Processor Speed per Edge/Mobile CPU 10/4 GIPS
Mobility Model Nomadic Mobility
Number of locations for Type 1/2/3 places 2/4/8
Mean waiting (dwell) time in Type 1/2/3 places 10/6.6/3.3 minutes
Important Simulation Results

Graph is plotted with 95% confidence interval error bars.


VM Utilization Analysis
Complexity Analysis

These results are highly dependent to host machine load while running the simulation!
A Case Study 3 – Where to Offload
Performance Evaluation of Different Workload Orchestration Policies

Find the source code below:


[Link]
edgecloudsim/applications/tutorial3
Simulation Scenario
WAN
• Mobile can offload tasks to
edge or cloud servers
• Worst-fit VM provisioning Edge Server MAN Edge Server
(least loaded first) algorithm
is used AP AP
• If the task is sent to another
edge server outside the
WLAN WLAN
connected network, it is
transmitted via MAN
• WLAN and WAN delays are
modeled independently, so
the WLAN is not affected if
task is sent to remote server
Competitor Edge Orchestration Algorithms
• Random: A random server is selected to offload task
• Edge Server Utilization Heuristic

If average edge servers CPU utilization > 75, offload task to cloud server
Otherwise, offload task to edge servers

• Network Utilization Heuristic

If WAN bandwidth > 5 Mbps, offload task to cloud server


Otherwise, offload task to edge servers
Applications Used in This Simulation

Parameter Aug. Reality Health Infotainment


Usage Percentage (%) 30 20 50
Task Interarrival (sec) 2 3 7
Active/Idle Period (sec) 40/20 45/90 30/45
VM Utilization on Edge/Cloud (%) 6/0.6 2/0.2 3.6/0.36
Task Length (GI) 15 3 9
Upload/Download Data (KB) 1500/50 50/1250 250/1000
Simulation Parameters

Parameter Value
Simulation Time/Warm-up Period 30/5 minutes
Number of Repetitions 10
WAN/WLAN Delay Model Empirical
MAN Delay Fixed (5 ms)
Number of VMs per Edge/Cloud Host 8/4
Number of Cores per Edge/Cloud VM 2/4
VM Processor Speed per Edge/Cloud CPU 10/100 GIPS
Mobility Model Nomadic Mobility
Number of Locations for Type 1/2/3 Places 2/4/8
Mean waiting time in Type 1/2/3 Places 8/5/2 minutes
Important Simulation Results

Graph is plotted with 95% confidence interval error bars.


VM Utilization Analysis

The cloud is mostly considered to be an endless pool of resources.


Service Time Analysis

Processing time is a bottleneck for edge devices, while WAN delay is a bottleneck for cloud servers.
Network Delay Analysis

Averaging different metrics (e.g., WAN/WLAN WAN delay dominates


delays) into a single average value may lead the average network delay.
to a misleading or meaningless graph.
A Case Study 4 – Server Capacity Planning
Performance Evaluation of Different Capacity Planning Approaches

Find the source code below:


[Link]
edgecloudsim/applications/tutorial4
Simulation Scenario
• Vehicles can only offload task to the edge servers connected to the serving access point
• Edge servers run host machines of varying capacity
• This scenario compares different edge server capacity planning algorithms

Edge Server Edge Server


Edge Server
WLAN WLAN WLAN
Vehicular Mobility Model
Number of RSUs: 11

• A smart highway environment


is simulated
• 1000 to 2000 vehicles traveling
RSU Coverage: 400m on a circular road
Road length: 4.4 km • Dynamic velocity values based
60 km/h on the vehicle position is used
40 km/h Speed of the vehicles for different segments
20 km/h
Competitor Capacity Planning Algorithms
➢ RANDOM CAPACITY
• Total capacity is randomly assigned (allocated) to hosts
• Total capacity is 220 GIPS
➢ EQUAL CAPACITY
• Total capacity is equally distributed to the hosts
• 20 GIPS computing capacity for all hosts
➢ TRAFFIC DENSITY HEURISTIC
• Total capacity is distributed to the hosts in proportion to the intensity of the traffic
• 44 GIPS computing capacity for the hosts in high density areas
• 20 GIPS computing capacity for the hosts in medium density areas
• 14 GIPS computing capacity for the hosts in low density areas
Applications Used in This Simulations
Navigation Danger Infotainment
Parameter
App Assessment App
Usage Ratio (%) 50 25 25
Task Interarrival Time (sec) 3 5 15
Active/Idle Period (min) always/0 always/0 always/0
Upload/Download Data (KB) 350/350 500/350 350/500
Task Length (MI) 600 1000 1600
Min - Max Edge VM Utilization(%)* [1.3 - 4.2] [2.2 - 7.1] [3.4 - 11.4]
* This scenario uses a dynamic CPU utilization model as follows: 100 * (Task Lenght / VM CPU Speed)
Simulation Parameters

Parameter Value
Simulation Time/Warm-up Period 15/1 minutes
Number of Repetitions 10
WLAN Delay Model Empirical
MAN Delay Fixed (10 ms)
Number of VMs per Edge Host 2
Number of Cores per Edge VM 2
VM Processor Speed per Edge CPU 10-44 GIPS
Mobility Model Vehicular Mobility
Number of locations for Type 1/2/3 Places 1/4/6
Speed of Vehicles in Type 1/2/3 Places 20/40/60 km/hour
Important Simulation Results

Graph is plotted with 95% confidence interval error bars.


Task Failure Reason Analysis

Failed tasks due to mobility dominates the failure reasons!


Mobility Model Verification
Network Delay Analysis

Network delay values of different access points.


A Case Study 5 – Network & Server Capacity P.
Performance Evaluation of Different Capacity Planning Approaches

Find the source code below:


[Link]
edgecloudsim/applications/tutorial5
Which One Provides the Best Network Delay?
Case 1 Case 2 Case 3

λ/2
μ μ
λ λ

λ/2
μ μ
Which One Provides the Best Network Delay?
Case 1 Case 2 Case 3

λ/2
μ μ
λ λ

λ/2
μ μ

M/M/1 Queue M/M/2 Queue Parallel M/M/1 Queues


Case 1: M/M/1 Queue
• Arrivals occur at rate λ according to a Poisson process
• Service times have an exponential distribution with rate parameter μ
• A single server serving with first-come first-served discipline

λ
μ

1 ,μ>λ
• Response time E(T) =
μ-λ

capacity/packet length (p/s) rate of the traffic (p/s)


Case 2: M/M/2 Queue
• Arrivals occur at rate λ according to a Poisson process
• Service times have an exponential distribution with rate parameter μ
• A single queue with multiple servers

μ
λ

• Response time can be calculated with birth-death process model


Case 2: M/M/2 Queue cont.
λ λ λ λ

0 1 2 3
P0 λ = P1 μ
P1 λ + P1 μ = P0 λ + P2 2μ μ 2μ 2μ 2μ

P2 λ + P2 2μ = P1 λ + P3 2μ
Pn λ = Pn+1 2μ for n ≥ 1
After some math 4μ
ΣPn = 1 E(T) =
(2μ - λ) (2μ+ λ)
(The sum of all probabilities must equal 1)
Case 3: Two Parallel M/M/1 Queues
λ/2
μ

λ/2
μ

1
E(T) = x2
μ – λ/2

4
E(T) =
2μ – λ
Expected Network Delay for All Cases

Case 1 Case 2 Case 3

λ/2
μ μ
λ λ

λ/2
μ μ

1 4μ 4
E(T) =
2μ - λ
< E(T) =
(2μ - λ) (2μ+ λ) < E(T) =
2μ – λ
Implementation of Case1
M/M/1 Queue
Edge Server
λ

AP

WLAN Parameter Value

WLAN Bandwidth 100 Mbps


Capacity of Edge VM 20 GIPS
# of VMs per Edge Server 1
# of Cores per VM 1
Implementation of Case2
M/M/2 Queue

Edge Server Edge Server μ


λ

WLAN Parameter Value

WLAN Bandwidth * 50 Mbps


Capacity of Edge VMs ** 10 GIPS
# of VMs per Edge Server 1
# of Cores per VM 1
* Assume a 100 Mbps network is shared by 2 servers.
** Edge servers are simulated on 1 host with 2 VMs.
Implementation of Case3
Parallel M/M/1 Queues
λ/2
Edge Server Edge Server
μ

AP λ/2
AP μ

WLAN WLAN Parameter Value

WLAN Bandwidth 50 Mbps


Capacity of Edge VMs 10 GIPS
# of VMs per Edge Server 1
# of Cores per VM 1
Application Used in Simulations

Parameter Sample App


Task Interarrival (sec) 5
Active/Idle Period (sec) 30/1
VM Utilization on Edge/Cloud (%) 3
Task Length (MI) 125
Upload Data Size (KB) 30
Download Data Size (KB) 30
Simulation Parameters

Parameter Value
Simulation Time 30 minutes
Warm-up Period 5 minutes
Number of Repetitions 10
Mobility Model Nomadic Mobility
Number of Mobile Clients 1000 to 2000
Length of the Simulated Area* 6 KM
* Simulated area is a symbolic value; in the end, we have 1 or 2 places depending on the scenario.
Average WLAN Delay & Success Rate
Edge Server Side Statistics

CloudSim’s task scheduler algorithm provides results similar to our M/M/1 & M/M/2 queue models.
References
[1] Calheiros, R. N., R. Ranjan, A. Beloglazov, C. A. F. De Rose and R. Buyya, “CloudSim: A Toolkit for Modeling and Simulation of Cloud Computing Environments and
Evaluation of Resource Provisioning Algorithms”, Softw. Pract. Exper., Vol. 41, No. 1, pp. 23–50, Jan. 2011.
[2] Howell, Fred, and Ross McNab. "SimJava: A discrete event simulation library for java." Simulation Series 30 (1998): 51-56.
[3] Gupta, Harshit, Amir Vahid Dastjerdi, Soumya K. Ghosh, and Rajkumar Buyya. "iFogSim: A toolkit for modeling and simulation of resource management techniques
in the Internet of Things, Edge and Fog computing environments." Software: Practice and Experience 47, no. 9 (2017): 1275-1296.
[4] Brogi, Antonio, and Stefano Forti. "QoS-aware deployment of IoT applications through the fog." IEEE Internet of Things Journal 4, no. 5 (2017): 1185-1192.
[5] Sonmez, Cagatay, Atay Ozgovde, and Cem Ersoy. "Edgecloudsim: An environment for performance evaluation of edge computing systems." Transactions on Emerging
Telecommunications Technologies 29, no. 11 (2018): e3493.
[6] Tuli, Shreshth, Redowan Mahmud, Shikhar Tuli, and Rajkumar Buyya. "Fogbus: A blockchain-based lightweight framework for edge and fog computing." Journal of
Systems and Software 154 (2019): 22-36.
[7] Qayyum, Tariq, Asad Waqar Malik, Muazzam A. Khan Khattak, Osman Khalid, and Samee U. Khan. "FogNetSim++: A toolkit for modeling and simulation of
distributed fog environment." IEEE Access 6 (2018): 63570-63583.
[8] N. Mohan and J. Kangasharju, "Edge-Fog cloud: A distributed cloud for Internet of Things computations," 2016 Cloudification of the Internet of Things (CIoT), 2016,
pp. 1-6.
[9] A. Coutinho, F. Greve, C. Prazeres and J. Cardoso, "Fogbed: A Rapid-Prototyping Emulation Environment for Fog Computing," 2018 IEEE International Conference on
Communications (ICC), 2018, pp. 1-7.
[10] R. Mayer, L. Graser, H. Gupta, E. Saurez and U. Ramachandran, "EmuFog: Extensible and scalable emulation of large-scale fog computing infrastructures," 2017 IEEE
Fog World Congress (FWC), 2017, pp. 1-6.
[11] M. Etemad, M. Aazam and M. St-Hilaire, "Using DEVS for modeling and simulating a Fog Computing environment," 2017 International Conference on Computing,
Networking and Communications (ICNC), 2017, pp. 849-854.
[12] "EdgeCloudSim Discussion Forum", [Link] accessed in October 2025.
[13] "EdgeCloudSim YouTube Channel", [Link] accessed in October 2025.
Thank You

You might also like