From 4d98cac8b53d7a96fc720edaff15e5dbb6d537d0 Mon Sep 17 00:00:00 2001 From: Cagatay Sonmez Date: Mon, 19 Jun 2017 22:41:07 +0300 Subject: [PATCH] configuration files and runner scripts are reorganized --- config/applications.xml | 63 ------- config/default_config.properties | 29 --- scripts/compile.sh | 4 - scripts/runner.sh | 18 -- scripts/sample_application/compile.sh | 4 + .../config/applications.xml | 55 ++++++ .../config/default_config.properties | 30 ++++ .../config}/edge_devices.xml | 168 ------------------ .../{ => sample_application}/run_scenarios.sh | 0 scripts/sample_application/runner.sh | 18 ++ .../{ => sample_application}/simulation.list | 0 11 files changed, 107 insertions(+), 282 deletions(-) delete mode 100644 config/applications.xml delete mode 100644 config/default_config.properties delete mode 100644 scripts/compile.sh delete mode 100644 scripts/runner.sh create mode 100644 scripts/sample_application/compile.sh create mode 100644 scripts/sample_application/config/applications.xml create mode 100644 scripts/sample_application/config/default_config.properties rename {config => scripts/sample_application/config}/edge_devices.xml (74%) rename scripts/{ => sample_application}/run_scenarios.sh (100%) create mode 100644 scripts/sample_application/runner.sh rename scripts/{ => sample_application}/simulation.list (100%) diff --git a/config/applications.xml b/config/applications.xml deleted file mode 100644 index 99fd627..0000000 --- a/config/applications.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - 100 - 10 - 3 - 45 - 15 - 1500 - 16 - 1500 - 2 - 10 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - \ No newline at end of file diff --git a/config/default_config.properties b/config/default_config.properties deleted file mode 100644 index 541b1d7..0000000 --- a/config/default_config.properties +++ /dev/null @@ -1,29 +0,0 @@ -#default config file -simulation_time=2 -warm_up_period=1200 -vm_load_check_interval=30 -vm_location_check_interval=30 -basic_file_log_enabled=false -deep_file_log_enabled=false - -min_number_of_mobile_devices=50 -max_number_of_mobile_devices=250 -mobile_device_counter_size=25 - -wan_propogation_delay=0.1 -lan_internal_delay=0.004 -wlan_bandwidth=300 -wan_bandwidth=20 -gsm_bandwidth=10 - -mips_for_cloud=20000 - -#use ',' for multiple values -orchestrator_policies=NEXT_FIT - -#use ',' for multiple values -simulation_scenarios=SINGLE_TIER,TWO_TIER,TWO_TIER_WITH_EO - -attractiveness_L1_mean_waiting_time=60 -attractiveness_L2_mean_waiting_time=30 -attractiveness_L3_mean_waiting_time=15 diff --git a/scripts/compile.sh b/scripts/compile.sh deleted file mode 100644 index bd7ce89..0000000 --- a/scripts/compile.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -rm -rf ../bin -mkdir ../bin -javac -classpath "../lib/cloudsim-4.0.jar:../lib/commons-math3-3.6.1.jar" -sourcepath ../src ../src/edu/boun/edgecloudsim/sample_application/mainApp.java -d ../bin diff --git a/scripts/runner.sh b/scripts/runner.sh deleted file mode 100644 index 9fe3bbb..0000000 --- a/scripts/runner.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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' 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 -tar -czf ${scenario_out_folder}.tar.gz -C $simulation_out_folder/${scenario_name} ite${iteration_number} -rm -rf $scenario_out_folder \ No newline at end of file diff --git a/scripts/sample_application/compile.sh b/scripts/sample_application/compile.sh new file mode 100644 index 0000000..59219aa --- /dev/null +++ b/scripts/sample_application/compile.sh @@ -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/sample_application/mainApp.java -d ../../bin diff --git a/scripts/sample_application/config/applications.xml b/scripts/sample_application/config/applications.xml new file mode 100644 index 0000000..bbd559f --- /dev/null +++ b/scripts/sample_application/config/applications.xml @@ -0,0 +1,55 @@ + + + + 30 + 20 + 5 + 0.90 + 45 + 15 + 1500 + 25 + 2000 + 1 + 20 + + + 20 + 20 + 30 + 0.05 + 10 + 20 + 1250 + 20 + 400 + 1 + 5 + + + 20 + 40 + 60 + 0.15 + 60 + 60 + 2500 + 250 + 3000 + 1 + 30 + + + 30 + 15 + 7 + 0.5 + 15 + 45 + 25 + 2000 + 750 + 1 + 10 + + \ No newline at end of file diff --git a/scripts/sample_application/config/default_config.properties b/scripts/sample_application/config/default_config.properties new file mode 100644 index 0000000..e1a5e8e --- /dev/null +++ b/scripts/sample_application/config/default_config.properties @@ -0,0 +1,30 @@ +#default config file +simulation_time=20 +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=100 +max_number_of_mobile_devices=1000 +mobile_device_counter_size=100 + +wan_propogation_delay=0.1 +lan_internal_delay=0.005 +wlan_bandwidth=200 +wan_bandwidth=15 +gsm_bandwidth=10 + +mips_for_cloud=20000 + +#use ',' for multiple values +orchestrator_policies=NEXT_FIT + +#use ',' for multiple values +simulation_scenarios=SINGLE_TIER,TWO_TIER,TWO_TIER_WITH_EO + +#mean waiting time in seconds +attractiveness_L1_mean_waiting_time=500 +attractiveness_L2_mean_waiting_time=300 +attractiveness_L3_mean_waiting_time=120 diff --git a/config/edge_devices.xml b/scripts/sample_application/config/edge_devices.xml similarity index 74% rename from config/edge_devices.xml rename to scripts/sample_application/config/edge_devices.xml index b840394..3eabe40 100644 --- a/config/edge_devices.xml +++ b/scripts/sample_application/config/edge_devices.xml @@ -30,18 +30,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -76,18 +64,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -122,18 +98,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -168,18 +132,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -214,18 +166,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -260,18 +200,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -306,18 +234,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -352,18 +268,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -398,18 +302,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -444,18 +336,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -490,18 +370,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -536,18 +404,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -582,18 +438,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - @@ -628,18 +472,6 @@ 2000 50000 - - 2 - 1000 - 2000 - 50000 - - - 2 - 1000 - 2000 - 50000 - diff --git a/scripts/run_scenarios.sh b/scripts/sample_application/run_scenarios.sh similarity index 100% rename from scripts/run_scenarios.sh rename to scripts/sample_application/run_scenarios.sh diff --git a/scripts/sample_application/runner.sh b/scripts/sample_application/runner.sh new file mode 100644 index 0000000..10d6b35 --- /dev/null +++ b/scripts/sample_application/runner.sh @@ -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.sample_application.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 \ No newline at end of file diff --git a/scripts/simulation.list b/scripts/sample_application/simulation.list similarity index 100% rename from scripts/simulation.list rename to scripts/sample_application/simulation.list