An Adaptive and Distributed Architecture for Cloud and MapReduce Algorithms and Simulations.
Cloud2Sim proposes a distributed concurrent architecture to CloudSim simulations.
The easiest way to build and run the simulation is using the automated setup script.
Run the setup script from the project root. This will compile the project with Maven and generate a run_sim.sh wrapper that handles all Java version-specific settings (like --add-opens for modern JDKs).
./setup.shUse the generated run_sim.sh script to launch any simulation class. The script automatically manages the classpath and JVM arguments.
Static Simulation:
./run_sim.sh pt.inesc_id.gsd.cloud2sim.applications.main.statics.SimulatorAdaptive Scaling:
# Master node
./run_sim.sh pt.inesc_id.gsd.cloud2sim.applications.main.dynamics.ScalableSimulator
# Worker nodes
./run_sim.sh pt.inesc_id.gsd.cloud2sim.scale.ias.IntelligentAdaptiveScalerMap-Reduce Simulations:
# Hazelcast
./run_sim.sh pt.inesc_id.gsd.cloud2sim.mapreduce.hazelcast.HzMapReduceSimulator
# Infinispan
./run_sim.sh pt.inesc_id.gsd.cloud2sim.infinispan.Initiator
./run_sim.sh pt.inesc_id.gsd.cloud2sim.mapreduce.infinispan.InfMapReduceSimulatorInitiate the ScalableSimulator on the master node:
java $JAVA_OPTS -classpath "lib/*:." pt.inesc_id.gsd.cloud2sim.applications.main.dynamics.ScalableSimulatorInitiate the IntelligentAdaptiveScaler on the worker nodes:
java $JAVA_OPTS -classpath "lib/*:." pt.inesc_id.gsd.cloud2sim.scale.ias.IntelligentAdaptiveScalerCloud2Sim leverages Infinispan's distributed data grid capabilities. You can run multiple instances of the Infinispan nodes to simulate a distributed environment.
-
Initiator: Acts as a cluster node. It can be used to hold data or serve as a persistent member of the grid.
./run_sim.sh pt.inesc_id.gsd.cloud2sim.infinispan.Initiator
-
Simulator: Joins the Infinispan cluster formed by the Initiator(s) and triggers the MapReduce tasks across all available nodes.
./run_sim.sh pt.inesc_id.gsd.cloud2sim.mapreduce.infinispan.InfMapReduceSimulator
Note: You can run one Initiator and one Simulator on the same machine, or distribute them across different machines by updating the JGroups configuration in conf/jgroups-tcp-config.xml with actual IP addresses.
Workload files and dataset configurations are managed in conf/cloud2sim.properties:
loadFolder: Path to the input text files (e.g.,conf/mapreduce/load).mapReduceSize: The number of lines to process per file.isVerbose: Set totrueto see detailed word count results.
Hazelcast supports distributed execution using an Initiator/Simulator pattern. You can form a cluster by running one or more Initiator nodes.
-
Initiator: Starts a standalone Hazelcast node to join the cluster.
./run_sim.sh pt.inesc_id.gsd.cloud2sim.hazelcast.HzInitiator
-
Simulator: Joins the Hazelcast cluster and executes the MapReduce simulation across all nodes.
./run_sim.sh pt.inesc_id.gsd.cloud2sim.mapreduce.hazelcast.HzMapReduceSimulator
Cloud2Sim is configured for Java 11 and newer. The run_sim.sh script automatically applies the necessary --add-opens flags required for Hazelcast and Infinispan to work on modern JDKs (9, 11, 17, 21+).
Follow the Initiator/Simulator pattern described above.
If you use Cloud2Sim in your research, please cite the following papers:
-
Kathiravelu, P. & L. Veiga (2014). An Adaptive Distributed Simulator for Cloud and MapReduce Algorithms and Architectures. In IEEE/ACM 7th International Conference on Utility and Cloud Computing (UCC 2014), London, UK. pp. 79 – 88. IEEE Computer Society.
-
Kathiravelu, P. & L. Veiga (2014). Concurrent and Distributed CloudSim Simulations. In IEEE 22nd International Symposium on Modeling, Analysis and Simulation of Computer and Telecommunication Systems (MASCOTS'14), Paris, France. pp. 490–493. IEEE Computer Society.