diff --git a/runtime/include/scheduler.h b/runtime/include/scheduler.h index 0c0064a..bb3ace2 100644 --- a/runtime/include/scheduler.h +++ b/runtime/include/scheduler.h @@ -34,7 +34,9 @@ enum SCHEDULER extern enum SCHEDULER scheduler; extern _Atomic uint32_t scheduling_counter; extern uint64_t system_start_timestamp; - +extern __thread uint32_t local_workload_count; +extern __thread uint32_t local_runqueue_count; +extern uint32_t runtime_processor_speed_MHz; static inline struct sandbox * scheduler_edf_get_next() { @@ -47,7 +49,8 @@ scheduler_edf_get_next() /* Try to pull and allocate from the global queue if earlier * This will be placed at the head of the local runqueue */ - if (global_deadline < local_deadline) { + //if (global_deadline < local_deadline) { + if (global_deadline < local_deadline && (local_workload_count <=2 || local_runqueue_count == 0)) { if (global_request_scheduler_remove_if_earlier(&request, local_deadline) == 0) { assert(request != NULL); assert(request->absolute_deadline < local_deadline); @@ -81,7 +84,8 @@ scheduler_srsf_get_next() /* Try to pull and allocate from the global queue if earlier * This will be placed at the head of the local runqueue */ - if (global_remaining_slack < local_remaining_slack) { + if (global_remaining_slack < local_remaining_slack && (local_workload_count <=2 || local_runqueue_count == 0)) { + //if (global_remaining_slack < local_remaining_slack) { if (global_request_scheduler_remove_if_earlier(&request, local_remaining_slack) == 0) { //uint64_t pop_time = __getcycles() - system_start_timestamp; @@ -208,6 +212,9 @@ scheduler_preempt(ucontext_t *user_context) assert(current != NULL); assert(current->state == SANDBOX_RUNNING); + if (current-> remaining_slack <= 5000 * runtime_processor_speed_MHz) { + return; + } /* This is for better state-change bookkeeping */ uint64_t now = __getcycles(); uint64_t duration_of_last_state = now - current->last_state_change_timestamp; diff --git a/runtime/src/local_runqueue.c b/runtime/src/local_runqueue.c index 1980d04..69a3ac8 100644 --- a/runtime/src/local_runqueue.c +++ b/runtime/src/local_runqueue.c @@ -11,8 +11,8 @@ extern uint32_t runtime_processor_speed_MHz; extern uint64_t system_start_timestamp; static struct local_runqueue_config local_runqueue; -#ifdef LOG_LOCAL_RUNQUEUE __thread uint32_t local_runqueue_count = 0; +#ifdef LOG_LOCAL_RUNQUEUE #endif __thread uint32_t local_workload_count = 0; @@ -35,8 +35,8 @@ void local_runqueue_add(struct sandbox *sandbox) { assert(local_runqueue.add_fn != NULL); -#ifdef LOG_LOCAL_RUNQUEUE local_runqueue_count++; +#ifdef LOG_LOCAL_RUNQUEUE #endif return local_runqueue.add_fn(sandbox); } @@ -49,8 +49,8 @@ void local_runqueue_delete(struct sandbox *sandbox) { assert(local_runqueue.delete_fn != NULL); -#ifdef LOG_LOCAL_RUNQUEUE local_runqueue_count--; +#ifdef LOG_LOCAL_RUNQUEUE #endif local_runqueue.delete_fn(sandbox); } diff --git a/runtime/tests/generate_json.sh b/runtime/tests/generate_json.sh index 754880d..eff62bc 100755 --- a/runtime/tests/generate_json.sh +++ b/runtime/tests/generate_json.sh @@ -14,7 +14,7 @@ json_file="test_multiple_image_processing4.json" rm -rf $json_file touch $json_file -base_exec_time=(49444 124753 10799 29602) +base_exec_time=(39287 96381 8173 23912) base_port=10000 base_m_index=1 func1_base_name="resize" @@ -27,7 +27,9 @@ for ((i=1; i <=$loop_count; i++)) do for ((j=1; j <=4; j++)) do - new_deadline=$((${base_exec_time[$j-1]} * ($i+1))) + #new_deadline=$((${base_exec_time[$j-1]} * ($i+1))) + new_deadline=$((${base_exec_time[$j-1]} * (2**$i))) + #new_deadline=$((${base_exec_time[$j-1]} * 4)) func1_new_name=$func1_base_name$base_m_index func1_new_port=$base_port base_port=$(($base_port + 1)) diff --git a/runtime/tests/generate_json_2d.sh b/runtime/tests/generate_json_2d.sh new file mode 100755 index 0000000..1a85b11 --- /dev/null +++ b/runtime/tests/generate_json_2d.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +function usage { + echo "$0 [loop count]" + exit 1 +} + +if [ $# != 1 ] ; then + usage + exit 1; +fi + +json_file="test_multiple_image_processing4.json" +rm -rf $json_file +touch $json_file + +base_exec_time=(39287 96381 8173 23912) +base_port=10000 +base_m_index=1 +func1_base_name="resize" +func2_base_name="png2bmp" +func3_base_name="cifar10_" + +deadline_times=(2 10) +loop_count=$1 + +for ((i=0; i <$loop_count; i++)) +do + for ((j=1; j <=4; j++)) + do + #new_deadline=$((${base_exec_time[$j-1]} * ($i+1))) + #new_deadline=$((${base_exec_time[$j-1]} * (2**$i))) + #new_deadline=$((${base_exec_time[$j-1]} * (2**($i*2 + 1)))) + #new_deadline=$((${base_exec_time[$j-1]} * 4)) + new_deadline=$((${base_exec_time[$j-1]} * ${deadline_times[$i]})) + func1_new_name=$func1_base_name$base_m_index + func1_new_port=$base_port + base_port=$(($base_port + 1)) + + cat >> $json_file << EOF +{ + "active": true, + "name": "$func1_new_name", + "path": "resize_wasm.so", + "port": $func1_new_port, + "relative-deadline-us": $new_deadline, + "argsize": 1, + "http-req-headers": [], + "http-req-content-type": "image/jpeg", + "http-req-size": 1024000, + "http-resp-headers": [], + "http-resp-size": 1024000, + "http-resp-content-type": "image/png" +}, + +EOF + func2_new_name=$func2_base_name$base_m_index + func2_new_port=$base_port + base_port=$(($base_port + 1)) + + cat >> $json_file << EOF +{ + "active": true, + "name": "$func2_new_name", + "path": "C-Image-Manip_wasm.so", + "port": $func2_new_port, + "relative-deadline-us": $new_deadline, + "argsize": 1, + "http-req-headers": [], + "http-req-content-type": "image/png", + "http-req-size": 4096000, + "http-resp-headers": [], + "http-resp-size": 4096000, + "http-resp-content-type": "image/bmp" +}, + +EOF + func3_new_name=$func3_base_name$base_m_index + func3_new_port=$base_port + base_port=$(($base_port + 1)) + + cat >> $json_file << EOF +{ + "active": true, + "name": "$func3_new_name", + "path": "cifar10_wasm.so", + "port": $func3_new_port, + "relative-deadline-us": $new_deadline, + "argsize": 1, + "http-req-headers": [], + "http-req-content-type": "image/bmp", + "http-req-size": 4096000, + "http-resp-headers": [], + "http-resp-size": 1024, + "http-resp-content-type": "text/plain", + "tail-module": true +}, + +EOF + echo "$func1_new_name, $func1_new_port, $func2_new_name, $func2_new_port, $func3_new_name, $func3_new_port, $new_deadline" + base_m_index=$(($base_m_index + 1)) + done +done + diff --git a/runtime/tests/generate_json_p80.sh b/runtime/tests/generate_json_p80.sh new file mode 100755 index 0000000..a672663 --- /dev/null +++ b/runtime/tests/generate_json_p80.sh @@ -0,0 +1,107 @@ +#!/bin/bash + +function usage { + echo "$0 [loop count]" + exit 1 +} + +if [ $# != 1 ] ; then + usage + exit 1; +fi + +json_file="test_multiple_image_processing5.json" +rm -rf $json_file +touch $json_file + +base_exec_time=(39287 96381 8173 23912) +base_port=10000 +base_m_index=1 +func1_base_name="resize" +func2_base_name="png2bmp" +func3_base_name="cifar10_" + +deadline_times=(2 10) +loop_count=$1 + +for ((i=0; i <$loop_count; i++)) +do + for ((j=1; j <=4; j++)) + do + #new_deadline=$((${base_exec_time[$j-1]} * ($i+1))) + #new_deadline=$((${base_exec_time[$j-1]} * (2**$i))) + #new_deadline=$((${base_exec_time[$j-1]} * 4)) + #new_deadline=$((${base_exec_time[$j-1]} * (2**($i*2 + 1)))) + new_deadline=$((${base_exec_time[$j-1]} * ${deadline_times[$i]})) + func1_new_name=$func1_base_name$base_m_index + func1_new_port=$base_port + base_port=$(($base_port + 1)) + + cat >> $json_file << EOF +{ + "active": true, + "name": "$func1_new_name", + "path": "resize_wasm.so", + "port": $func1_new_port, + "relative-deadline-us": $new_deadline, + "argsize": 1, + "admissions-percentile": 80, + "http-req-headers": [], + "http-req-content-type": "image/jpeg", + "http-req-size": 1024000, + "http-resp-headers": [], + "http-resp-size": 1024000, + "http-resp-content-type": "image/png" +}, + +EOF + func2_new_name=$func2_base_name$base_m_index + func2_new_port=$base_port + base_port=$(($base_port + 1)) + + cat >> $json_file << EOF +{ + "active": true, + "name": "$func2_new_name", + "path": "C-Image-Manip_wasm.so", + "port": $func2_new_port, + "relative-deadline-us": $new_deadline, + "argsize": 1, + "admissions-percentile": 80, + "http-req-headers": [], + "http-req-content-type": "image/png", + "http-req-size": 4096000, + "http-resp-headers": [], + "http-resp-size": 4096000, + "http-resp-content-type": "image/bmp" +}, + +EOF + func3_new_name=$func3_base_name$base_m_index + func3_new_port=$base_port + base_port=$(($base_port + 1)) + + cat >> $json_file << EOF +{ + "active": true, + "name": "$func3_new_name", + "path": "cifar10_wasm.so", + "port": $func3_new_port, + "relative-deadline-us": $new_deadline, + "argsize": 1, + "admissions-percentile": 80, + "http-req-headers": [], + "http-req-content-type": "image/bmp", + "http-req-size": 4096000, + "http-resp-headers": [], + "http-resp-size": 1024, + "http-resp-content-type": "text/plain", + "tail-module": true +}, + +EOF + echo "$func1_new_name, $func1_new_port, $func2_new_name, $func2_new_port, $func3_new_name, $func3_new_port, $new_deadline" + base_m_index=$(($base_m_index + 1)) + done +done + diff --git a/runtime/tests/meet_deadline_percentage.py b/runtime/tests/meet_deadline_percentage.py index bc51a3a..599d073 100644 --- a/runtime/tests/meet_deadline_percentage.py +++ b/runtime/tests/meet_deadline_percentage.py @@ -20,6 +20,7 @@ def count_miss_or_meet_deadline_requests(file_dir, percentage): initializing_times_dict = defaultdict(def_value) execution_times_dict = defaultdict(def_value) + ### init overhead ### queuelength queuelength_dict = defaultdict(list) ### @@ -102,8 +103,8 @@ def count_miss_or_meet_deadline_requests(file_dir, percentage): if "memory" in line or "total_time" in line or "min" in line or "miss" in line or "meet" in line or "time " in line or "scheduling count" in line or "thread id" in line: continue t = line.split(",") - id = t[1] - func_idx = t[2][-9] + id = t[1] #request id + func_idx = t[2][-9] #function id if t[2][-10] == "1": #func_idx = t[2][-10:-9] func_idx = t[2][-10] + t[2][-9] @@ -129,37 +130,133 @@ def count_miss_or_meet_deadline_requests(file_dir, percentage): print("miss deadline percentage:", miss_deadline_percentage) print("scheduling counter:", max_sc) +# func_name_dict = { +# "cifar10_1": "105k-2", +# "cifar10_2": "305k-2", +# "cifar10_3": "5k-2", +# "cifar10_4": "545k-2", +# "cifar10_5": "105k-4", +# "cifar10_6": "305k-4", +# "cifar10_7": "5k-4", +# "cifar10_8": "545k-4", +# "cifar10_9": "105k-8", +# "cifar10_10": "305k-8", +# "cifar10_11": "5k-8", +# "cifar10_12": "545k-8", +# "resize": "resize", +# "fibonacci": "fibonacci", +# "resize3": "resize3" +# } + func_name_with_id = { + "1": "105k-2", + "2": "305k-2", + "3": "5k-2", + "4": "40k-2", + "5": "105k-10", + "6": "305k-10", + "7": "5k-10", + "8": "40k-10", + "9": "105k-8", + "10": "305k-8", + "11": "5k-8", + "12": "40k-8", + "noop1" : "noop1", + "noop2" : "noop2", + "noop3" : "noop3", + "noop4" : "noop4", + "noop5" : "noop5" + } + func_name_dict = { - "cifar10_1": "105k", - "cifar10_2": "305k", - "cifar10_3": "5k", - "cifar10_4": "40k", - "cifar10_5": "105k-2", - "cifar10_6": "305k-2", - "cifar10_7": "5k-2", - "cifar10_8": "40k-2", - "cifar10_9": "105k-3", - "cifar10_10": "305k-3", - "cifar10_11": "5k-3", - "cifar10_12": "40k-3", + "cifar10_1": "105k-2", + "cifar10_2": "305k-2", + "cifar10_3": "5k-2", + "cifar10_4": "40k-2", + "cifar10_5": "105k-10", + "cifar10_6": "305k-10", + "cifar10_7": "5k-10", + "cifar10_8": "40k-10", + "cifar10_9": "105k-8", + "cifar10_10": "305k-8", + "cifar10_11": "5k-8", + "cifar10_12": "40k-8", "resize": "resize", "fibonacci": "fibonacci", - "resize3": "resize3" + "fibonacci5": "fibonacci5", + "resize3": "resize3", + "noop1" : "noop1", + "noop2" : "noop2", + "noop3" : "noop3", + "noop4" : "noop4", + "noop5" : "noop5" } - func_name_with_id = { - "1": "105k", - "2": "305k", - "3": "5k", - "4": "40k", - "5": "105k-2", - "6": "305k-2", - "7": "5k-2", - "8": "40k-2", - "9": "105k-3", - "10": "305k-3", - "11": "5k-3", - "12": "40k-3" +# func_name_dict = { +# "cifar10_1": "105k-2", +# "cifar10_2": "305k-2", +# "cifar10_3": "5k-2", +# "cifar10_4": "40k-2", +# "cifar10_5": "105k-8", +# "cifar10_6": "305k-8", +# "cifar10_7": "5k-8", +# "cifar10_8": "40k-4", +# "cifar10_9": "105k-8", +# "cifar10_10": "305k-8", +# "cifar10_11": "5k-8", +# "cifar10_12": "40k-8", +# "resize": "resize", +# "fibonacci": "fibonacci", +# "resize3": "resize3" +# } + fun_execution_time = { + "cifar10_1": 39786, + "cifar10_2": 98794, + "cifar10_3": 8985, + "cifar10_4": 23826, + "cifar10_5": 39786, + "cifar10_6": 98794, + "cifar10_7": 8985, + "cifar10_8": 23826, + "cifar10_9": 39786, + "cifar10_10": 98794, + "cifar10_11": 8985, + "cifar10_12": 23826, + "fibonacci5": 0, + "fibonacci4": 0, + "noop1" : 0, + "noop2" : 0, + "noop3" : 0, + "noop4" : 0, + "noop5" : 0 + } +# func_name_with_id = { +# "1": "105k-2", +# "2": "305k-2", +# "3": "5k-2", +# "4": "40k-2", +# "5": "305k-4", +# "6": "5k-4", +# "7": "105k-8", +# "8": "305k-8", +# "9": "5k-8", +# "10": "305k-8", +# "11": "5k-8", +# "12": "40k-8" +# } +# func_name_with_id = { +# "1": "105k-2", +# "2": "305k-2", +# "3": "5k-2", +# "4": "40k-2", +# "5": "105k-8", +# "6": "305k-8", +# "7": "5k-8", +# "8": "305k-8", +# "9": "5k-8", +# "10": "305k-8", +# "11": "5k-8", +# "12": "40k-8" +# } ### get execution time for key,value in running_time_dict.items(): func_idx = key.split("_")[1] @@ -186,17 +283,21 @@ def count_miss_or_meet_deadline_requests(file_dir, percentage): a = np.array(value) p = np.percentile(a, int(percentage)) print(func_name_dict[key] + " " + percentage + " percentage is:" + str(p) + " mean is:" + str(np.mean(value)) + " max latency is:" + str(max_latency_dist[key])) + total_cpu_times = 0 for key,value in meet_deadline_dist.items(): + total_cpu_times += value * fun_execution_time[key] miss_value = miss_deadline_dist[key] total_request = miss_value + value miss_rate = (miss_value * 100) / total_request print(func_name_dict[key] + " miss deadline rate:" + str(miss_rate) + " miss count is:" + str(miss_value) + " total request:" + str(total_request)) + print("effective total cpu times:", total_cpu_times) for key,value in real_time_workload_times_dist.items(): real_time_workload_times_dist[key] = [x - min_time for x in value] for key,value in running_times.items(): - print("function times:", func_name_with_id[key], np.median(total_times[key]), np.median(running_times[key]), np.median(queuing_times[key]), np.median(runnable_times[key]), np.median(blocked_times[key]), np.median(initializing_times[key])) + #print("function times:", func_name_with_id[key], np.median(total_times[key]), np.median(running_times[key]), np.median(queuing_times[key]), np.median(runnable_times[key]), np.median(blocked_times[key]), np.median(initializing_times[key])) + print("function times:", func_name_with_id[key], np.median(total_times[key]), np.median(running_times[key]), np.median(queuing_times[key]), np.median(runnable_times[key]), np.median(blocked_times[key]), np.mean(initializing_times[key])) for key, value in delays_dict.items(): new_value = [i/1000 for i in value] p99 = np.percentile(new_value, 99) diff --git a/runtime/tests/parse_parse_python.py b/runtime/tests/parse_parse_python.py index 64dda1f..7f7613e 100644 --- a/runtime/tests/parse_parse_python.py +++ b/runtime/tests/parse_parse_python.py @@ -20,6 +20,7 @@ def file_name(file_dir, key_str): print("percentage is ______________", percentage) file_table[key].append(file_i) for key,value in file_table.items(): + print(value) s_value = sorted(value, key = lambda x: int(x.split('_')[-1].split(".")[0])) file_table[key] = s_value #print("key is:", key, " value is:", value) @@ -28,12 +29,17 @@ def file_name(file_dir, key_str): return file_table -def get_values(key, value, miss_deadline_rate, total_latency, preemption_count, total_miss_deadline_rate): +def get_values(key, value, miss_deadline_rate, total_latency, running_times, preemption_count, total_miss_deadline_rate): for i in range(len(value)): file_name = value[i] print("file name++++++++++++++++++++++++++", file_name) + before_dot = file_name.split(".")[0] + joint_f_name = before_dot + "_total_time.txt" + cmd='python3 ~/sledge-serverless-framework/runtime/tests/meet_deadline_percentage.py %s 50' % file_name rt=os.popen(cmd).read().strip() + cmd2='mv total_time.txt %s' % joint_f_name + os.popen(cmd2) #print(rt) rule=r'(.*?) miss deadline rate:(.*?) miss count is' finds=re.findall(rule, rt) @@ -51,9 +57,11 @@ def get_values(key, value, miss_deadline_rate, total_latency, preemption_count, for j in range(len(finds)): func_name=finds[j].split(" ")[0] latency=finds[j].split(" ")[1] + running_time=finds[j].split(" ")[2] key1=key+"_"+func_name print("total latency:", func_name, latency) total_latency[key1][percentage]=latency + running_times[key1][percentage]=running_time rule3=r'scheduling counter: (.*)' finds=re.findall(rule3, rt) @@ -71,6 +79,7 @@ if __name__ == "__main__": import json miss_deadline_rate = defaultdict(defaultdict) total_latency = defaultdict(defaultdict) + running_times = defaultdict(defaultdict) preemption_count = defaultdict(defaultdict) total_miss_deadline_rate = defaultdict(defaultdict) @@ -85,7 +94,7 @@ if __name__ == "__main__": i = 0 for key, value in files_tables.items(): - get_values(key, value, miss_deadline_rate, total_latency, preemption_count, total_miss_deadline_rate) + get_values(key, value, miss_deadline_rate, total_latency, running_times, preemption_count, total_miss_deadline_rate) for key, value in miss_deadline_rate.items(): print("miss deadline rate:", key, value) @@ -118,3 +127,8 @@ if __name__ == "__main__": f4.write(js4) f4.close() + js5 = json.dumps(running_times) + f5 = open("execution_time.txt", "w") + f5.write(js5) + f5.close() + diff --git a/runtime/tests/start-edf.sh b/runtime/tests/start-edf.sh new file mode 100755 index 0000000..757b3ec --- /dev/null +++ b/runtime/tests/start-edf.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +function usage { + echo "$0 [perf output file, chain_function_perf.log or single_function_perf.log or opt_function_perf.log]" + exit 1 +} + +if [ $# != 1 ] ; then + usage + exit 1; +fi + +output=$1 + + +declare project_path="$( + cd "$(dirname "$0")/../.." + pwd +)" +echo $project_path +path=`pwd` +#export SLEDGE_DISABLE_PREEMPTION=true +export SLEDGE_CPU_SPEED=3300 +#export SLEDGE_SCHEDULER=SRSF +export SLEDGE_SIGALRM_HANDLER=BROADCAST +#export SLEDGE_SIGALRM_HANDLER=TRIAGED +#export SLEDGE_NWORKERS=1 +export SLEDGE_SCHEDULER=EDF +export SLEDGE_SANDBOX_PERF_LOG=$path/$output +echo $SLEDGE_SANDBOX_PERF_LOG +cd $project_path/runtime/bin +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_big_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_armcifar10.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_png2bmp.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_image_processing.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/mulitple_linear_chain.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing3.json +LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing4.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/my_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_sodresize.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/my_sodresize.json diff --git a/runtime/tests/start-srsf-p80.sh b/runtime/tests/start-srsf-p80.sh new file mode 100755 index 0000000..15b1d25 --- /dev/null +++ b/runtime/tests/start-srsf-p80.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +function usage { + echo "$0 [perf output file, chain_function_perf.log or single_function_perf.log or opt_function_perf.log]" + exit 1 +} + +if [ $# != 1 ] ; then + usage + exit 1; +fi + +output=$1 + + +declare project_path="$( + cd "$(dirname "$0")/../.." + pwd +)" +echo $project_path +path=`pwd` +#export SLEDGE_DISABLE_PREEMPTION=true +export SLEDGE_CPU_SPEED=3300 +export SLEDGE_SCHEDULER=SRSF +export SLEDGE_SIGALRM_HANDLER=BROADCAST +#export SLEDGE_SIGALRM_HANDLER=TRIAGED +#export SLEDGE_NWORKERS=1 +#export SLEDGE_SCHEDULER=EDF +export SLEDGE_SANDBOX_PERF_LOG=$path/$output +echo $SLEDGE_SANDBOX_PERF_LOG +cd $project_path/runtime/bin +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_big_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_armcifar10.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_png2bmp.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_image_processing.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/mulitple_linear_chain.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing3.json +LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing5.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/my_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_sodresize.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/my_sodresize.json diff --git a/runtime/tests/start-srsf.sh b/runtime/tests/start-srsf.sh new file mode 100755 index 0000000..72093a4 --- /dev/null +++ b/runtime/tests/start-srsf.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +function usage { + echo "$0 [perf output file, chain_function_perf.log or single_function_perf.log or opt_function_perf.log]" + exit 1 +} + +if [ $# != 1 ] ; then + usage + exit 1; +fi + +output=$1 + + +declare project_path="$( + cd "$(dirname "$0")/../.." + pwd +)" +echo $project_path +path=`pwd` +#export SLEDGE_DISABLE_PREEMPTION=true +export SLEDGE_CPU_SPEED=3300 +export SLEDGE_SCHEDULER=SRSF +export SLEDGE_SIGALRM_HANDLER=BROADCAST +#export SLEDGE_SIGALRM_HANDLER=TRIAGED +#export SLEDGE_NWORKERS=1 +#export SLEDGE_SCHEDULER=EDF +export SLEDGE_SANDBOX_PERF_LOG=$path/$output +echo $SLEDGE_SANDBOX_PERF_LOG +cd $project_path/runtime/bin +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_big_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_armcifar10.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_png2bmp.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_image_processing.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/mulitple_linear_chain.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing3.json +LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_multiple_image_processing4.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/my_fibonacci.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_sodresize.json +#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/my_sodresize.json