This is an extension of iFogSim that makes it possible to simulate and evaluate data offloading strategies in context of Fog computing and IoT.
- Download and install Metis
- Change
IDXTYPEWIDTHandREALTYPEWIDTHto64atinclude/metis.h - Run:
make config shared=1 prefix=./precompiled && make && make install - Add to
LD_LIBRARY_PATH(e.g.:LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/metis-5.1.0/build/Linux-x86_64/precompiled/lib)
- Change
- Download and install CPLEX
- CPLEX Community
- Add to
LD_LIBRARY_PATH(e.g.:LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ibm/ILOG/CPLEX_Studio_Community201/cplex/bin/x86-64_linux) - Some constants must be exchanged at
DataPlacementclass (marked withTODO)
- Add to
- CPLEX Academic (follow licence instructions)
- Add to
LD_LIBRARY_PATH(e.g.:LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ibm/ILOG/CPLEX_Studio201/cplex/bin/x86-64_linux)
- Add to
- CPLEX Community
- Import CPLEX
/opt/ibm/ILOG/CPLEX_Studio201/cplex/lib/cplex.jarto local Maven (e.g.:mvn install:install-file -Dpackaging=jar -DgeneratePom=true -Dfile=cplex.jar -DgroupId=ilog -DartifactId=cplex -Dversion=20.1.0.0) - Build:
mvn clean install(nojarsfolder needed) - Run:
java -jar -Xmx4096m target/ifogsim-jar-with-dependencies.jar
rm.sh: removes simulation temp filesbk.sh: backup all simulation temp filesstats.py: generates simulation summaries and plotspidstat.sh: analyse CPU and memory usage withpidstat(part ofsysstattools) - needs simulation running
This is an extension of iFogSim that makes it possible to simulate and evaluate data placement strategies in context of Fog computing and IoT. This extension uses two external tools: 1- Cplex to compute the data placement which is formulated as a Generalized Assignement Problem (GAP) 2- Metis to partition a graph which models the simulated infrastructure into k-partitions. This is in order to conceive several data placement sub problems hence reducing the overall problem complexity.
This extension involves several data placement strategies: storageModes = Arrays.asList(CloudStorage,ClosestNode,FogStorage,ZoningStorage,GraphPartitionStorage);
FogStorage and ZoningStorage require CPLEX installation and setups, and GraphPartitionStorage requires Metis installation.
For test, you can set storageModes = Arrays.asList(CloudStorage,ClosestNode,FogStorage,ZoningStorage,GraphPartitionStorage);
The path of the main class is: src/org/fog/examples/DataPlacement.java
Next, various configurations and setups to reuse this extension, are shown.
1- Clone this repository in your machine.
2- Install Cplex: there is a free acadimique version.
3- Add the Cplex Jar:
4- Install Metis.