diff --git a/artifact/common_util.py b/artifact/common_util.py index 7bddc1b..50b09ed 100644 --- a/artifact/common_util.py +++ b/artifact/common_util.py @@ -3,7 +3,7 @@ import asyncio import time -pwd = "/mnt1/MVVM" +pwd = "/mnt/MVVM" def get_func_index(func, file): @@ -40,8 +40,7 @@ def get_func_index(func, file): ".aot", "-pure.aot", "-stack.aot", - "-ckpt.aot", - "-ckpt-br.aot", + "-ckpt-every-dirty.aot", "-ckpt-loop.aot", "-ckpt-loop-dirty.aot", ] @@ -281,8 +280,39 @@ def run_qemu_checkpoint( return (exec, output) -def run(aot_file: str, arg: list[str], env: str) -> tuple[str, str]: - cmd = f"./MVVM_checkpoint -t ../build/bench/{aot_file} {' '.join(['-a ' + str(x) for x in arg])} -e {env}" +def run(aot_file: str, arg: list[str], env: str, extra:str="") -> tuple[str, str]: + cmd = f"./MVVM_checkpoint -t ../build/bench/{aot_file} {' '.join(['-a ' + str(x) for x in arg])} -e {env} {extra}" + print(cmd) + cmd = cmd.split() + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + try: + output = result.stdout.decode("utf-8") + except: + output = result.stdout + exec = " ".join([env] + [aot_file] + arg) + # print(exec) + # print(output) + return (exec, output) + +def run_checkpoint_restore_slowtier( + aot_file: str, folder, arg: list[str], env: str, extra:str="" +) -> tuple[str, str, str, str]: + # Execute run_checkpoint and capture its result + res = [] + for _ in range(trial): + checkpoint_result = run(aot_file, folder, arg, env,extra) + + # Execute run_restore with the same arguments (or modify as needed) + restore_result = run_criu_restore(aot_file, arg, env) + # print(checkpoint_result, restore_result) + # Return a combined result or just the checkpoint result as needed + + res.append(checkpoint_result[1] + restore_result[1]) + return (checkpoint_result[0], res) + + +def run_slowtier(aot_file: str, arg: list[str], env: str, extra:str="") -> tuple[str, str]: + cmd = f"ssh epyc {pwd}/MVVM_checkpoint -t {pwd}/build/bench/{aot_file} {' '.join(['-a ' + str(x) for x in arg])} -e {env} {extra}" print(cmd) cmd = cmd.split() result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -333,7 +363,7 @@ def run_native(file: str, folder: str, arg: list[str], env: str) -> tuple[str, s def run_qemu_x86_64( file: str, folder: str, arg: list[str], env: str ) -> tuple[str, str]: - cmd = f"/usr/bin/time /usr/bin/qemu-x86_64 {pwd}/bench/{folder}/build/{file} {' '.join(arg)}" + cmd = f"/usr/bin/time /usr/bin/qemu-x86_64 -E {env} {pwd}/bench/{folder}/build/{file} {' '.join(arg)}" print(cmd) cmd = cmd.split() result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -350,7 +380,7 @@ def run_qemu_x86_64( def run_qemu_aarch64( file: str, folder: str, arg: list[str], env: str ) -> tuple[str, str]: - cmd = f"/usr/bin/time /usr/bin/qemu-aarch64 {pwd}/bench/{folder}/build_aarch64_native/{file} {' '.join(arg)}" + cmd = f"/usr/bin/time /usr/bin/qemu-aarch64 -E {env} {pwd}/bench/{folder}/build_aarch64_native/{file} {' '.join(arg)}" print(cmd) cmd = cmd.split() result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) diff --git a/artifact/result/performance_comparison.pdf b/artifact/result/performance_comparison.pdf index 72aa613..827306e 100644 Binary files a/artifact/result/performance_comparison.pdf and b/artifact/result/performance_comparison.pdf differ diff --git a/artifact/result/policy_multithread.csv b/artifact/result/policy_multithread.csv index 6d7b44a..de97499 100644 --- a/artifact/result/policy_multithread.csv +++ b/artifact/result/policy_multithread.csv @@ -1,19 +1,181 @@ name,aot,pure.aot,stack.aot,ckpt-every-dirty.aot,ckpt-loop.aot,ckpt-loop-dirty.aot -OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,14.5963,12.812015,13.699772,13.699772,65.36097,60.106478 -OMP_NUM_THREADS=4 bc.aot -g20 -vn300,359.709446,359.709446,298.675246,298.675246,2127.650568,2145.700998 -OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,106.879639,106.879639,93.334658,93.334658,720.844827,856.513604 -OMP_NUM_THREADS=4 cc.aot -g20 -vn300,230.975482,230.975482,171.475179,171.475179,831.639095,871.120946 -OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,258.028583,258.028583,188.356389,188.356389,1193.973139,1429.556867 -OMP_NUM_THREADS=4 pr.aot -g20 -vn300,76.301909,76.301909,69.720581,69.720581,1307.134211,1313.297207 -OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,105.883278,105.883278,93.995209,93.995209,1283.563528,1285.292838 -OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,361.080028,361.080028,313.895867,313.895867,1538.667979,1477.450417 -OMP_NUM_THREADS=4 tc.aot -g20 -n1,45.019151,45.019151,26.695467,26.695467,184.657363,192.357612 -OMP_NUM_THREADS=4 bt.aot,101.446567,60.852957,71.079194,71.079194,171.828062,171.147518 -OMP_NUM_THREADS=4 cg.aot,40.125329,30.14231,30.014517,30.014517,242.833629,247.801786 -OMP_NUM_THREADS=4 ep.aot,0.006942,0.006505,0.002316,0.002316,0.003443,0.003858 -OMP_NUM_THREADS=4 ft.aot,21.8823,20.953326,21.708614,21.708614,194.725659,192.790959 -OMP_NUM_THREADS=4 lu.aot,0.084495,0.057258,0.04803,0.04803,0.120409,0.115161 -OMP_NUM_THREADS=4 mg.aot,40.292697,25.700802,23.616245,23.616245,129.772729,131.149166 -OMP_NUM_THREADS=4 sp.aot,46.831243,24.061054,36.231818,36.231818,78.63207,77.65184 -OMP_NUM_THREADS=4 redis.aot,63.897573,12.152266,23.619647,23.619647,86.61949,90.949312 -a=b hdastar.aot maze-6404.txt 8,13.713945,7.618424,6.05143,6.05143,13.373997,12.162823 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,10.017898,10.538071,9.551293,9.551293,52.572907,58.174687 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,231.541847,231.541847,197.232313,197.232313,1630.789125,1642.650659 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,65.096905,65.096905,56.080233,56.080233,519.08394,512.712417 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,165.967726,165.967726,104.077259,104.077259,583.955076,637.09575 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,185.382474,185.382474,129.455157,129.455157,873.077472,889.527948 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,59.505688,59.505688,51.44526,51.44526,801.815683,814.781761 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,78.739079,78.739079,64.305969,64.305969,932.059638,937.161274 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,276.183438,276.183438,234.0212,234.0212,1042.837332,1086.634561 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,39.949079,39.949079,22.501251,22.501251,161.282844,163.515375 +OMP_NUM_THREADS=4 bt.aot,70.475124,53.32907,59.691541,59.691541,130.768544,137.916229 +OMP_NUM_THREADS=4 cg.aot,32.625126,18.603542,18.894772,18.894772,206.37486,211.096798 +OMP_NUM_THREADS=4 ep.aot,0.003015,0.001876,0.002612,0.002612,0.005063,0.002794 +OMP_NUM_THREADS=4 ft.aot,16.043054,13.759922,14.225016,14.225016,155.341532,156.453344 +OMP_NUM_THREADS=4 lu.aot,0.039933,0.049057,0.035829,0.035829,0.1047,0.099759 +OMP_NUM_THREADS=4 mg.aot,29.936622,19.958747,20.884183,20.884183,106.603824,114.759174 +OMP_NUM_THREADS=4 sp.aot,33.832973,20.002695,22.167469,22.167469,70.783177,63.685357 +OMP_NUM_THREADS=4 redis.aot,57.495774,9.580163,18.098083,18.098083,77.271008,78.862054 +a=b hdastar.aot maze-6404.txt 8,10.9408,3.20139,5.495154,5.495154,11.946834,8.968433 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,11.285482,8.696805,8.719069,8.719069,45.587062,54.595998 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,228.180862,228.180862,196.644105,196.644105,1703.040742,1736.204013 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,64.901881,64.901881,53.423697,53.423697,496.595615,518.28573 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,156.226125,156.226125,96.384282,96.384282,598.375946,595.620608 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,172.1208,172.1208,117.084912,117.084912,838.12775,891.836542 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,59.804795,59.804795,48.629867,48.629867,742.457012,743.669954 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,80.962334,80.962334,61.994429,61.994429,980.537201,936.869386 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,273.989241,273.989241,224.864193,224.864193,1064.527767,1067.949112 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,39.78107,39.78107,22.121677,22.121677,166.89708,168.807898 +OMP_NUM_THREADS=4 bt.aot,81.000707,53.906011,59.455827,59.455827,132.262379,134.614112 +OMP_NUM_THREADS=4 cg.aot,26.566948,25.623014,17.822263,17.822263,208.72334,208.652902 +OMP_NUM_THREADS=4 ep.aot,0.004101,0.003475,0.003786,0.003786,0.005356,0.003773 +OMP_NUM_THREADS=4 ft.aot,15.002259,15.630616,14.760759,14.760759,158.338649,155.379575 +OMP_NUM_THREADS=4 lu.aot,0.062055,0.024446,0.0405,0.0405,0.099567,0.097056 +OMP_NUM_THREADS=4 mg.aot,30.585384,18.628778,18.124699,18.124699,114.088661,102.032073 +OMP_NUM_THREADS=4 sp.aot,40.105214,23.724932,27.745403,27.745403,65.620997,62.128954 +OMP_NUM_THREADS=4 redis.aot,56.354405,10.119493,17.909284,17.909284,77.499407,79.835904 +a=b hdastar.aot maze-6404.txt 8,9.35697,7.024824,6.778998,6.778998,10.939126,10.388784 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,11.876132,8.922248,9.69194,9.69194,47.601604,47.685453 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,214.770088,214.770088,200.993059,200.993059,1737.181198,1841.921895 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,69.683795,69.683795,57.97691,57.97691,479.21154,497.166874 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,151.560553,151.560553,98.569124,98.569124,578.294962,604.293522 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,171.754246,171.754246,116.552469,116.552469,856.158443,901.033594 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,55.452224,55.452224,52.557448,52.557448,756.836125,763.669305 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,65.320206,65.320206,56.402029,56.402029,960.368081,976.701841 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,273.388615,273.388615,224.002082,224.002082,1134.207162,1189.01097 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,30.579374,30.579374,22.442656,22.442656,28.126748,29.122663 +OMP_NUM_THREADS=4 bt.aot,74.62627,57.594137,53.934058,53.934058,64.171541,61.391608 +OMP_NUM_THREADS=4 cg.aot,21.262384,21.131603,20.910612,20.910612,35.209194,35.883791 +OMP_NUM_THREADS=4 ep.aot,0.002265,0.002804,0.002634,0.002634,0.002462,0.002571 +OMP_NUM_THREADS=4 ft.aot,14.439449,13.430229,14.243589,14.243589,24.267449,28.891808 +OMP_NUM_THREADS=4 lu.aot,0.054306,0.038539,0.03546,0.03546,0.051181,0.052417 +OMP_NUM_THREADS=4 mg.aot,17.88104,19.578546,21.113502,21.113502,26.102983,34.509171 +OMP_NUM_THREADS=4 sp.aot,24.318857,27.967577,21.065164,21.065164,24.113757,26.228236 +OMP_NUM_THREADS=4 redis.aot,22.92621,10.171869,17.93138,17.93138,22.818408,24.522828 +a=b hdastar.aot maze-6404.txt 8,9.343366,6.257246,7.95168,7.95168,8.826389,9.692145 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,9.777629,9.002316,8.278268,8.278268,11.776923,10.077228 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,235.962264,235.962264,205.165808,205.165808,288.253252,341.204129 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,67.984061,67.984061,57.501841,57.501841,72.718786,89.771209 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,122.803746,122.803746,106.310353,106.310353,120.990941,163.339619 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,143.091037,143.091037,133.284075,133.284075,158.061767,189.91327 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,59.748513,59.748513,53.937368,53.937368,66.821285,72.30385 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,67.034258,67.034258,61.442655,61.442655,79.29407,83.131412 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,241.71688,241.71688,235.149493,235.149493,324.518891,363.782055 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,33.787081,33.787081,23.356678,23.356678,27.642114,31.873019 +OMP_NUM_THREADS=4 bt.aot,62.364929,47.88175,52.030866,52.030866,65.66581,64.08111 +OMP_NUM_THREADS=4 cg.aot,23.270052,28.346962,20.408725,20.408725,34.173764,39.765871 +OMP_NUM_THREADS=4 ep.aot,0.003548,0.002436,0.003632,0.003632,0.002712,0.01104 +OMP_NUM_THREADS=4 ft.aot,15.564863,16.604796,15.692545,15.692545,26.891502,28.209096 +OMP_NUM_THREADS=4 lu.aot,0.03894,0.029211,0.032026,0.032026,0.057157,0.03826 +OMP_NUM_THREADS=4 mg.aot,23.915128,22.982616,18.870103,18.870103,32.612852,26.182612 +OMP_NUM_THREADS=4 sp.aot,28.361577,20.423793,21.841462,21.841462,23.803076,29.12847 +OMP_NUM_THREADS=4 redis.aot,23.579298,9.745268,17.117385,17.117385,21.50173,24.1784 +a=b hdastar.aot maze-6404.txt 8,7.179282,5.584931,5.22663,5.22663,10.211974,5.764305 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,10.556836,8.763748,9.176185,9.176185,8.955083,10.748084 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,240.918014,240.918014,222.408358,222.408358,296.080085,360.382607 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,66.227314,66.227314,63.116356,63.116356,71.580176,87.619515 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,125.336034,125.336034,102.708246,102.708246,130.23309,163.484791 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,149.00573,149.00573,129.957419,129.957419,170.504324,215.127575 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,61.769827,61.769827,52.931184,52.931184,70.571418,83.982077 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,67.661531,67.661531,66.219016,66.219016,75.836829,86.32563 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,269.016395,269.016395,248.506964,248.506964,340.271317,417.288693 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,35.043157,35.043157,25.536846,25.536846,31.011852,33.615038 +OMP_NUM_THREADS=4 bt.aot,60.608269,55.285906,58.692748,58.692748,64.743661,66.686157 +OMP_NUM_THREADS=4 cg.aot,21.012917,25.068409,22.748177,22.748177,40.979058,41.911543 +OMP_NUM_THREADS=4 ep.aot,0.004083,0.001653,0.002413,0.002413,0.002904,0.002047 +OMP_NUM_THREADS=4 ft.aot,18.465617,18.475384,18.602792,18.602792,36.381457,34.788869 +OMP_NUM_THREADS=4 lu.aot,0.038189,0.03304,0.041738,0.041738,0.069466,0.047683 +OMP_NUM_THREADS=4 mg.aot,26.51681,24.299339,25.70265,25.70265,32.507309,31.096238 +OMP_NUM_THREADS=4 sp.aot,30.008949,20.127822,23.97537,23.97537,29.492236,26.251705 +OMP_NUM_THREADS=4 redis.aot,24.264871,11.354447,18.39246,18.39246,23.500784,27.574937 +a=b hdastar.aot maze-6404.txt 8,10.482027,8.2684,7.54298,7.54298,8.765654,9.837615 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,9.908752,10.48247,9.232124,9.232124,11.829309,10.815756 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,256.484499,256.484499,222.196373,222.196373,319.501263,383.250463 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,64.546664,64.546664,63.03137,63.03137,77.485777,89.812901 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,128.434786,128.434786,104.737453,104.737453,128.798963,169.93154 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,154.556419,154.556419,137.911615,137.911615,184.71292,216.766781 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,66.46428,66.46428,51.017912,51.017912,63.409876,80.292184 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,69.944373,69.944373,63.368701,63.368701,78.379231,94.840139 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,271.685109,271.685109,260.718017,260.718017,318.845784,421.281836 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,32.163135,32.163135,24.097101,24.097101,28.806223,32.374663 +OMP_NUM_THREADS=4 bt.aot,61.012268,50.714504,58.566507,58.566507,63.298748,77.57422 +OMP_NUM_THREADS=4 cg.aot,25.838748,23.148281,24.620858,24.620858,37.90417,40.868128 +OMP_NUM_THREADS=4 ep.aot,0.002333,0.002377,0.002264,0.002264,0.002209,0.002919 +OMP_NUM_THREADS=4 ft.aot,18.347525,21.212243,19.00111,19.00111,30.954286,34.010393 +OMP_NUM_THREADS=4 lu.aot,0.035631,0.042399,0.05106,0.05106,0.060471,0.043904 +OMP_NUM_THREADS=4 mg.aot,30.851053,20.183595,21.850666,21.850666,31.018976,32.125953 +OMP_NUM_THREADS=4 sp.aot,25.602366,19.764139,18.833222,18.833222,28.071709,38.586909 +OMP_NUM_THREADS=4 redis.aot,23.618858,10.632358,19.548547,19.548547,24.008548,26.568505 +a=b hdastar.aot maze-6404.txt 8,11.52202,7.384746,8.439873,8.439873,9.656676,9.171918 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,10.450674,10.373996,8.727034,8.727034,11.114678,11.698355 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,277.798857,277.798857,226.400759,226.400759,315.22744,379.973677 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,64.506582,64.506582,60.214117,60.214117,73.989757,99.890517 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,131.843614,131.843614,111.167978,111.167978,133.019656,170.921823 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,162.284433,162.284433,134.772481,134.772481,172.419212,207.173519 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,59.430071,59.430071,55.43075,55.43075,65.154986,82.137504 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,67.976575,67.976575,68.608525,68.608525,79.569412,95.290172 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,262.87282,262.87282,251.558825,251.558825,332.994496,405.140538 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,32.352684,32.352684,24.380902,24.380902,27.943186,30.254229 +OMP_NUM_THREADS=4 bt.aot,61.283924,59.939225,52.329247,52.329247,71.491986,71.092607 +OMP_NUM_THREADS=4 cg.aot,28.418268,24.73598,24.875225,24.875225,40.982641,43.734437 +OMP_NUM_THREADS=4 ep.aot,0.002538,0.003298,0.012851,0.012851,0.003923,0.002796 +OMP_NUM_THREADS=4 ft.aot,17.95022,14.909875,18.273977,18.273977,37.87855,35.982202 +OMP_NUM_THREADS=4 lu.aot,0.04736,0.032257,0.040788,0.040788,0.046898,0.083944 +OMP_NUM_THREADS=4 mg.aot,24.311284,22.566357,22.933375,22.933375,35.497749,30.594937 +OMP_NUM_THREADS=4 sp.aot,30.137474,23.946128,20.833545,20.833545,25.494493,25.15803 +OMP_NUM_THREADS=4 redis.aot,24.564991,11.447297,19.668027,19.668027,23.699458,26.389496 +a=b hdastar.aot maze-6404.txt 8,10.73702,6.585046,5.536101,5.536101,8.601526,10.705701 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,11.129548,9.005376,9.320199,9.320199,11.143496,11.358973 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,253.168737,253.168737,227.06009,227.06009,313.907779,370.179216 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,67.5488,67.5488,61.745861,61.745861,79.395261,88.288852 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,126.773417,126.773417,111.224648,111.224648,125.51943,176.883593 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,164.023086,164.023086,141.576971,141.576971,175.662874,214.396746 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,58.961162,58.961162,53.635583,53.635583,74.959302,92.060076 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,73.261637,73.261637,65.867055,65.867055,85.590317,92.218915 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,265.241022,265.241022,252.992736,252.992736,346.5179,402.470816 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,33.379436,33.379436,22.881941,22.881941,29.802467,31.455855 +OMP_NUM_THREADS=4 bt.aot,64.155481,58.686974,61.958932,61.958932,65.110386,66.105423 +OMP_NUM_THREADS=4 cg.aot,25.85421,25.105423,24.849638,24.849638,42.418741,37.374964 +OMP_NUM_THREADS=4 ep.aot,0.002989,0.002345,0.002602,0.002602,0.003826,0.003245 +OMP_NUM_THREADS=4 ft.aot,19.260273,17.809207,18.533498,18.533498,33.952135,38.676475 +OMP_NUM_THREADS=4 lu.aot,0.050605,0.025683,0.041169,0.041169,0.073535,0.044437 +OMP_NUM_THREADS=4 mg.aot,22.488045,21.701445,25.265718,25.265718,28.610367,36.209763 +OMP_NUM_THREADS=4 sp.aot,26.960556,18.718879,20.583702,20.583702,30.466118,23.716131 +OMP_NUM_THREADS=4 redis.aot,23.254312,10.631727,18.406652,18.406652,22.844819,25.737818 +a=b hdastar.aot maze-6404.txt 8,12.132523,6.893947,6.198094,6.198094,11.371654,10.849636 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,10.211041,9.733969,9.978159,9.978159,10.95014,9.705135 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,256.066532,256.066532,225.468698,225.468698,293.835124,369.470685 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,66.176791,66.176791,62.940816,62.940816,77.67994,93.085728 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,129.286867,129.286867,107.594127,107.594127,136.001582,173.065607 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,163.435515,163.435515,132.312464,132.312464,178.793023,207.040057 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,62.713107,62.713107,57.503783,57.503783,68.871821,81.680782 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,70.181327,70.181327,64.754161,64.754161,75.879953,93.594157 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,277.183132,277.183132,253.650146,253.650146,329.85879,430.978065 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,33.56007,33.56007,24.092439,24.092439,29.576322,30.83976 +OMP_NUM_THREADS=4 bt.aot,60.039598,52.201994,53.478338,53.478338,70.353293,74.848716 +OMP_NUM_THREADS=4 cg.aot,24.602588,21.0747,23.155512,23.155512,46.517888,40.113963 +OMP_NUM_THREADS=4 ep.aot,0.005703,0.00244,0.00237,0.00237,0.002199,0.001959 +OMP_NUM_THREADS=4 ft.aot,18.464476,16.78426,20.239912,20.239912,32.275391,34.767951 +OMP_NUM_THREADS=4 lu.aot,0.067899,0.031804,0.029221,0.029221,0.04819,0.044805 +OMP_NUM_THREADS=4 mg.aot,21.843722,23.275039,19.774591,19.774591,37.005966,33.2798 +OMP_NUM_THREADS=4 sp.aot,33.229369,25.507441,24.300644,24.300644,23.134424,31.434913 +OMP_NUM_THREADS=4 redis.aot,22.928657,10.607199,18.12376,18.12376,24.180952,25.74947 +a=b hdastar.aot maze-6404.txt 8,11.396952,3.20205,7.946684,7.946684,8.238406,8.196208 +OMP_NUM_THREADS=4 llama.aot stories110M.bin -z tokenizer.bin -t 0.0,10.576445,9.987949,10.147242,10.147242,11.202188,10.67788 +OMP_NUM_THREADS=4 bc.aot -g20 -vn300,250.33076,250.33076,229.354492,229.354492,304.401343,372.299041 +OMP_NUM_THREADS=4 bfs.aot -g20 -vn300,71.986166,71.986166,54.920037,54.920037,80.551576,93.928005 +OMP_NUM_THREADS=4 cc.aot -g20 -vn300,129.519476,129.519476,105.634257,105.634257,137.870708,175.903874 +OMP_NUM_THREADS=4 cc_sv.aot -g20 -vn300,157.795599,157.795599,141.799119,141.799119,175.437564,212.710306 +OMP_NUM_THREADS=4 pr.aot -g20 -vn300,60.061285,60.061285,53.264729,53.264729,71.728823,79.425696 +OMP_NUM_THREADS=4 pr_spmv.aot -g20 -vn300,67.248053,67.248053,65.516582,65.516582,82.038471,93.869952 +OMP_NUM_THREADS=4 sssp.aot -g20 -vn300,234.995989,234.995989,221.049833,221.049833,278.21499,309.926351 +OMP_NUM_THREADS=4 tc.aot -g20 -n1,31.864133,31.864133,24.026022,24.026022,29.599846,32.70325 +OMP_NUM_THREADS=4 bt.aot,73.188099,65.755987,50.695754,50.695754,75.894983,68.379084 +OMP_NUM_THREADS=4 cg.aot,23.729701,19.875611,25.460301,25.460301,40.46568,35.30915 +OMP_NUM_THREADS=4 ep.aot,0.002055,0.00297,0.002319,0.002319,0.010522,0.002769 +OMP_NUM_THREADS=4 ft.aot,21.728819,16.847616,20.438296,20.438296,32.667428,33.918371 +OMP_NUM_THREADS=4 lu.aot,0.036554,0.043269,0.038107,0.038107,0.038174,0.043912 +OMP_NUM_THREADS=4 mg.aot,24.722335,19.408619,19.692295,19.692295,28.86707,34.2663 +OMP_NUM_THREADS=4 sp.aot,27.106845,24.672942,22.994674,22.994674,26.336311,28.794859 +OMP_NUM_THREADS=4 redis.aot,24.799415,11.456758,18.389991,18.389991,21.839316,23.447284 +a=b hdastar.aot maze-6404.txt 8,11.791569,8.640311,8.630685,8.630685,10.94215,9.315662 diff --git a/artifact/usecase_burst_computing.py b/artifact/usecase_burst_computing.py new file mode 100644 index 0000000..20654db --- /dev/null +++ b/artifact/usecase_burst_computing.py @@ -0,0 +1,106 @@ +import csv +import common_util +from multiprocessing import Pool +from matplotlib import pyplot as plt +import numpy as np +from collections import defaultdict + + +cmd = [ + "redis", # low priority task + "rgbd_tum", # high priority task +] +folder = [ + "redis", + "ORB_SLAM2", # networkbound? +] +arg = [ + [], + ["./ORBvoc.txt", "./TUM3.yaml", "./", "./associations/fr1_xyz.txt"], +] +envs = [ + "OMP_NUM_THREADS=1", + "OMP_NUM_THREADS=1", +] + +pool = Pool(processes=20) + +def get_fasttier_result(): + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Execution time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + +def get_slowtier_result(): + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run_slowtier, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Execution time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + +def get_snapshot_overhead(): + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run_checkpoint_restore_slowtier, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Snapshot time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + +def get_burst_compute(): + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run_checkpoint_restore_slowtier, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Snapshot time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + + +def plot(): + fasttier = get_fasttier_result() + slowtier = get_slowtier_result() + snapshot = get_snapshot_overhead() + reu = get_burst_compute() + # plot skew + write_to_csv("burst_computing.csv") + + results = read_from_csv("burst_computing.csv") + plot(results) \ No newline at end of file diff --git a/artifact/usecase_optimistic_computing.py b/artifact/usecase_optimistic_computing.py new file mode 100644 index 0000000..0c8238a --- /dev/null +++ b/artifact/usecase_optimistic_computing.py @@ -0,0 +1,102 @@ +import csv +import common_util +from multiprocessing import Pool +from matplotlib import pyplot as plt +import numpy as np +from collections import defaultdict + + +cmd = [ + "bc", # low priority task + "bfs", # high priority task +] +folder = [ + "gapbs", + "gapbs", +] +arg = [ + ["-g20", "-n100"], + ["-g20", "-n1000"], +] +envs = [ + "OMP_NUM_THREADS=1", + "OMP_NUM_THREADS=1", +] + +pool = Pool(processes=20) + +def get_avx512_result(): + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Execution time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + +def get_arm_result(): + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run_slowtier, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Execution time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + +def get_snapshot_overhead(): + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run_checkpoint_restore_slowtier, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Snapshot time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + +def optimistic_snapshot_overhead(): # monitoring CPU + results = [] + results1 = [] + for _ in range(common_util.trial): + for i in range(len(cmd)): + aot = cmd[i] + ".aot" + results1.append(pool.apply_async(common_util.run_checkpoint_restore_slowtier, (aot, arg[i], envs[i]))) + # print the results + results1 = [x.get() for x in results1] + for exec, output in results1: + lines = output.split("\n") + for line in lines: + if line.__contains__("Snapshot time:"): + exec_time = line.split(" ")[-2] + print(exec, exec_time) + results.append((exec, exec_time)) # discover 4 aot_variant + +def plot(): + avx512 = get_avx512_result() + arm = get_arm_result() + snapshot = get_snapshot_overhead() + res= get_optimiztic_compute_overhead() + # plot avx512 and avx2 + \ No newline at end of file