diff --git a/K8S_VERSION b/K8S_VERSION new file mode 100644 index 0000000..82a5f3b --- /dev/null +++ b/K8S_VERSION @@ -0,0 +1 @@ +1.28.5 diff --git a/README.md b/README.md index 91c82c6..c2a4bbb 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,10 @@ # Granny Experiments -This repo contains the experiments for the [Granny paper]( -https://arxiv.org/abs/2302.11358). +This repo contains the experiments for the [Granny paper](https://arxiv.org/abs/2302.11358). -When following any instructions in this repository, it is recommended to -have two open terminals: -* One on the [`experiment-base`](https://github.com/faasm/experiment-base) repo - with the virtual environment activated (`source ./bin/workon.sh`). From now - onward, we will refer to this shell by its venv name: `faasm-exp-base`. -* One with this repo and the virtual environment activated - (`source ./bin/workon.sh`). From now onward, we will refer to this shell by - its venv name: `faasm-exp-faabric`. +When following any instructions in this repository, it is recommended to have a dedicated terminal with virtual environment of this repo activated: (`source ./bin/workon.sh`). -The former is used to provision/deprovision K8s clusters on Azure (with AKS), -and also to access low-level monitoring tools (we recommend `k9s`). - -The latter is used to deploy Faabric clusters, run the experiments, and plot -the results. +This virtual environment provides commands for provision/deprovision K8s clusters on Azure (with AKS), accessing low-level monitoring tools (we recommend `k9s`), and also commands for deploy Faabric clusters, run the experiments, and plot the results. ## Experiments in this repository diff --git a/config/granny_aks_kubelet_config.json b/config/granny_aks_kubelet_config.json new file mode 100644 index 0000000..0b11bb8 --- /dev/null +++ b/config/granny_aks_kubelet_config.json @@ -0,0 +1 @@ +{ "allowedUnsafeSysctls": ["net.*"] } diff --git a/config/granny_aks_os_config.json b/config/granny_aks_os_config.json new file mode 100644 index 0000000..84e27c7 --- /dev/null +++ b/config/granny_aks_os_config.json @@ -0,0 +1,13 @@ +{ + "sysctls": { + "netCoreRmemMax": 16777216, + "netCoreWmemMax": 16777216, + "netIpv4TcpRmem": "4096 87380 16777216", + "netIpv4TcpWmem": "4096 65536 16777216", + "netCoreNetdevMaxBacklog": "30000", + "netCoreRmemDefault": 16777216, + "netCoreWmemDefault": 16777216, + "netIpv4TcpMem": "16777216 16777216 16777216", + "netIpv4RouteFlush": 1 + } +} diff --git a/plots/elastic/elastic_speedup.png b/plots/elastic/elastic_speedup.png deleted file mode 100644 index 88c6272..0000000 Binary files a/plots/elastic/elastic_speedup.png and /dev/null differ diff --git a/plots/kernels-mpi/mpi_kernels_slowdown.png b/plots/kernels-mpi/mpi_kernels_slowdown.png deleted file mode 100644 index e21359b..0000000 Binary files a/plots/kernels-mpi/mpi_kernels_slowdown.png and /dev/null differ diff --git a/plots/kernels-omp/openmp_kernels_slowdown.png b/plots/kernels-omp/openmp_kernels_slowdown.png deleted file mode 100644 index ecd8a41..0000000 Binary files a/plots/kernels-omp/openmp_kernels_slowdown.png and /dev/null differ diff --git a/plots/migration/migration_speedup_all-to-all.png b/plots/migration/migration_speedup_all-to-all.png deleted file mode 100644 index 4957276..0000000 Binary files a/plots/migration/migration_speedup_all-to-all.png and /dev/null differ diff --git a/plots/migration/migration_speedup_very-network.png b/plots/migration/migration_speedup_very-network.png deleted file mode 100644 index b541840..0000000 Binary files a/plots/migration/migration_speedup_very-network.png and /dev/null differ diff --git a/results/elastic/openmp_elastic_granny.csv b/results/elastic/openmp_elastic_granny.csv deleted file mode 100755 index 3dce98a..0000000 --- a/results/elastic/openmp_elastic_granny.csv +++ /dev/null @@ -1,9 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,39.152 -2,0,24.21 -3,0,19.185 -4,0,16.112 -5,0,14.932 -6,0,14.122 -7,0,13.619 -8,0,12.582 diff --git a/results/elastic/openmp_no-elastic_granny.csv b/results/elastic/openmp_no-elastic_granny.csv deleted file mode 100755 index a00d154..0000000 --- a/results/elastic/openmp_no-elastic_granny.csv +++ /dev/null @@ -1,9 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,65.416 -2,0,34.829 -3,0,25.939 -4,0,20.568 -5,0,17.156 -6,0,17.019 -7,0,13.841 -8,0,12.806 diff --git a/results/kernels-mpi/kernels_granny_nstream.csv b/results/kernels-mpi/kernels_granny_nstream.csv deleted file mode 100755 index bf66e2f..0000000 --- a/results/kernels-mpi/kernels_granny_nstream.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,155.422 -4,0,47.38 -6,0,61.267 -8,0,51.265 -10,0,41.075 -12,0,34.013 -14,0,29.439 -16,0,25.82 -2,1,134.033 -4,1,47.378 -6,1,52.715 -8,1,51.308 -10,1,41.394 -12,1,34.111 -14,1,29.231 -16,1,25.865 -2,2,125.489 -4,2,46.86 -6,2,57.118 -8,2,51.329 -10,2,40.922 -12,2,34.252 -14,2,29.45 -16,2,25.58 -2,3,149.199 -4,3,49.333 -6,3,57.095 -8,3,51.363 -10,3,40.985 -12,3,34.288 -14,3,29.294 -16,3,25.835 -2,4,147.232 -4,4,48.434 -6,4,51.675 -8,4,51.256 -10,4,41.096 -12,4,34.074 -14,4,29.486 -16,4,25.881 diff --git a/results/kernels-mpi/kernels_granny_p2p.csv b/results/kernels-mpi/kernels_granny_p2p.csv deleted file mode 100755 index 78a98df..0000000 --- a/results/kernels-mpi/kernels_granny_p2p.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,1.514 -4,0,1.129 -6,0,1.09 -8,0,1.095 -10,0,10.852 -12,0,10.701 -14,0,10.823 -16,0,10.369 -2,1,1.508 -4,1,1.124 -6,1,1.11 -8,1,1.107 -10,1,10.757 -12,1,10.742 -14,1,10.816 -16,1,10.501 -2,2,1.486 -4,2,1.114 -6,2,1.066 -8,2,1.079 -10,2,10.274 -12,2,10.45 -14,2,10.323 -16,2,10.553 -2,3,1.549 -4,3,1.154 -6,3,1.067 -8,3,1.033 -10,3,10.347 -12,3,10.505 -14,3,10.617 -16,3,10.909 -2,4,1.517 -4,4,1.071 -6,4,1.049 -8,4,0.952 -10,4,10.689 -12,4,10.673 -14,4,10.625 -16,4,10.71 diff --git a/results/kernels-mpi/kernels_granny_reduce.csv b/results/kernels-mpi/kernels_granny_reduce.csv deleted file mode 100755 index 1deea1b..0000000 --- a/results/kernels-mpi/kernels_granny_reduce.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,0.124 -4,0,0.425 -6,0,0.97 -8,0,1.371 -10,0,1.987 -12,0,1.853 -14,0,1.801 -16,0,2.351 -2,1,0.147 -4,1,0.538 -6,1,0.978 -8,1,1.459 -10,1,1.855 -12,1,1.851 -14,1,2.038 -16,1,2.134 -2,2,0.129 -4,2,0.412 -6,2,0.895 -8,2,1.371 -10,2,1.983 -12,2,1.825 -14,2,2.034 -16,2,2.311 -2,3,0.136 -4,3,0.582 -6,3,0.899 -8,3,1.426 -10,3,1.984 -12,3,2.074 -14,3,2.063 -16,3,2.315 -2,4,0.124 -4,4,0.417 -6,4,1.019 -8,4,1.387 -10,4,2.101 -12,4,2.003 -14,4,2.092 -16,4,2.382 diff --git a/results/kernels-mpi/kernels_granny_sparse.csv b/results/kernels-mpi/kernels_granny_sparse.csv deleted file mode 100755 index 353db30..0000000 --- a/results/kernels-mpi/kernels_granny_sparse.csv +++ /dev/null @@ -1,21 +0,0 @@ -WorldSize,Run,ActualTime -2,0,19.147 -4,0,12.854 -8,0,13.553 -16,0,12.928 -2,1,18.818 -4,1,12.921 -8,1,14.094 -16,1,12.854 -2,2,18.828 -4,2,13.307 -8,2,14.46 -16,2,12.896 -2,3,18.152 -4,3,13.409 -8,3,14.613 -16,3,13.11 -2,4,18.402 -4,4,13.028 -8,4,14.142 -16,4,13.889 diff --git a/results/kernels-mpi/kernels_granny_stencil.csv b/results/kernels-mpi/kernels_granny_stencil.csv deleted file mode 100755 index 02011ca..0000000 --- a/results/kernels-mpi/kernels_granny_stencil.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,20.212 -4,0,11.406 -6,0,15.483 -8,0,11.657 -10,0,10.918 -12,0,12.031 -14,0,10.185 -16,0,10.167 -2,1,20.508 -4,1,11.495 -6,1,15.319 -8,1,11.695 -10,1,11.046 -12,1,11.699 -14,1,8.826 -16,1,9.922 -2,2,20.533 -4,2,11.321 -6,2,15.31 -8,2,11.736 -10,2,10.98 -12,2,11.095 -14,2,8.758 -16,2,9.395 -2,3,20.494 -4,3,11.371 -6,3,15.424 -8,3,12.098 -10,3,11.091 -12,3,11.263 -14,3,9.367 -16,3,9.949 -2,4,20.268 -4,4,11.388 -6,4,15.449 -8,4,11.653 -10,4,10.845 -12,4,11.513 -14,4,9.286 -16,4,9.877 diff --git a/results/kernels-mpi/kernels_granny_transpose.csv b/results/kernels-mpi/kernels_granny_transpose.csv deleted file mode 100755 index 3e2ac79..0000000 --- a/results/kernels-mpi/kernels_granny_transpose.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,4.421 -4,0,2.126 -6,0,2.208 -8,0,1.576 -10,0,2.887 -12,0,2.756 -14,0,2.736 -16,0,2.986 -2,1,4.572 -4,1,2.123 -6,1,2.165 -8,1,1.711 -10,1,2.886 -12,1,2.831 -14,1,2.475 -16,1,2.726 -2,2,4.32 -4,2,1.978 -6,2,2.053 -8,2,1.654 -10,2,2.886 -12,2,3.043 -14,2,2.764 -16,2,2.982 -2,3,4.61 -4,3,2.11 -6,3,2.033 -8,3,1.613 -10,3,2.867 -12,3,3.009 -14,3,2.736 -16,3,2.797 -2,4,4.594 -4,4,1.977 -6,4,2.049 -8,4,1.59 -10,4,2.998 -12,4,3.147 -14,4,2.757 -16,4,3.008 diff --git a/results/kernels-mpi/kernels_native_nstream.csv b/results/kernels-mpi/kernels_native_nstream.csv deleted file mode 100755 index c52aea7..0000000 --- a/results/kernels-mpi/kernels_native_nstream.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,211.80240845680237 -4,0,50.70300316810608 -6,0,74.18139553070068 -8,0,45.91553807258606 -10,0,36.96965837478638 -12,0,30.79936957359314 -14,0,26.56351089477539 -16,0,23.30944538116455 -2,1,211.2990322113037 -4,1,45.38427472114563 -6,1,60.00726628303528 -8,1,47.265791177749634 -10,1,36.79808259010315 -12,1,30.628745794296265 -14,1,26.52407145500183 -16,1,23.410788774490356 -2,2,211.14375948905945 -4,2,49.23323917388916 -6,2,73.67288994789124 -8,2,46.63195252418518 -10,2,36.83924150466919 -12,2,30.615288019180298 -14,2,26.592950105667114 -16,2,23.318421840667725 -2,3,210.9948353767395 -4,3,46.89555215835571 -6,3,79.65575861930847 -8,3,49.10797095298767 -10,3,36.69231963157654 -12,3,30.93598747253418 -14,3,26.449821710586548 -16,3,23.374608278274536 -2,4,207.72968411445618 -4,4,47.820003032684326 -6,4,57.41533017158508 -8,4,59.936208963394165 -10,4,36.6309711933136 -12,4,30.83677053451538 -14,4,26.444123029708862 -16,4,23.54766869544983 diff --git a/results/kernels-mpi/kernels_native_p2p.csv b/results/kernels-mpi/kernels_native_p2p.csv deleted file mode 100755 index e4c514c..0000000 --- a/results/kernels-mpi/kernels_native_p2p.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,1.8275446891784668 -4,0,1.6021056175231934 -6,0,1.6116538047790527 -8,0,1.6758580207824707 -10,0,9.951421976089478 -12,0,10.237882852554321 -14,0,9.807735681533813 -16,0,10.446318864822388 -2,1,1.7834811210632324 -4,1,1.6172304153442383 -6,1,1.652186393737793 -8,1,1.5778076648712158 -10,1,10.204224586486816 -12,1,9.694399118423462 -14,1,9.935903787612915 -16,1,10.94922924041748 -2,2,1.7559447288513184 -4,2,1.5802686214447021 -6,2,1.596501350402832 -8,2,1.6116304397583008 -10,2,9.991573333740234 -12,2,9.852302312850952 -14,2,10.24347186088562 -16,2,10.291944980621338 -2,3,1.7971758842468262 -4,3,1.5568616390228271 -6,3,1.5839636325836182 -8,3,1.5862820148468018 -10,3,9.88243055343628 -12,3,10.252933025360107 -14,3,10.004428625106812 -16,3,10.406328916549683 -2,4,1.7527241706848145 -4,4,1.576845645904541 -6,4,1.5824618339538574 -8,4,1.6136491298675537 -10,4,9.458833932876587 -12,4,10.16277289390564 -14,4,10.213975429534912 -16,4,10.434766054153442 diff --git a/results/kernels-mpi/kernels_native_reduce.csv b/results/kernels-mpi/kernels_native_reduce.csv deleted file mode 100755 index f5fff66..0000000 --- a/results/kernels-mpi/kernels_native_reduce.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,1.3006765842437744 -4,0,1.4821159839630127 -6,0,1.5666041374206543 -8,0,1.8244519233703613 -10,0,2.651923179626465 -12,0,2.7560596466064453 -14,0,2.8214452266693115 -16,0,3.0188097953796387 -2,1,1.318660020828247 -4,1,1.4767401218414307 -6,1,1.551201581954956 -8,1,1.8242247104644775 -10,1,2.815175771713257 -12,1,2.7875349521636963 -14,1,2.6900227069854736 -16,1,2.9060306549072266 -2,2,1.3303911685943604 -4,2,1.5205707550048828 -6,2,1.6374084949493408 -8,2,1.727043867111206 -10,2,2.776304244995117 -12,2,2.867478847503662 -14,2,2.7892520427703857 -16,2,3.059666872024536 -2,3,1.316744327545166 -4,3,1.509899377822876 -6,3,1.5766303539276123 -8,3,1.7922968864440918 -10,3,3.0703768730163574 -12,3,2.9876925945281982 -14,3,2.6913206577301025 -16,3,2.9684088230133057 -2,4,1.337737798690796 -4,4,1.4962162971496582 -6,4,1.596050500869751 -8,4,1.8612620830535889 -10,4,2.687384843826294 -12,4,2.823078155517578 -14,4,2.8163084983825684 -16,4,2.952660322189331 diff --git a/results/kernels-mpi/kernels_native_sparse.csv b/results/kernels-mpi/kernels_native_sparse.csv deleted file mode 100755 index 1bbbda7..0000000 --- a/results/kernels-mpi/kernels_native_sparse.csv +++ /dev/null @@ -1,21 +0,0 @@ -WorldSize,Run,ActualTime -2,0,14.524915933609009 -4,0,9.02392315864563 -8,0,10.741777420043945 -16,0,31.540650844573975 -2,1,14.061089038848877 -4,1,9.269188404083252 -8,1,10.398407936096191 -16,1,36.188287019729614 -2,2,14.066649436950684 -4,2,8.995222806930542 -8,2,10.35243558883667 -16,2,12.227359533309937 -2,3,14.171435117721558 -4,3,9.047401428222656 -8,3,10.570420742034912 -16,3,12.347669124603271 -2,4,14.185197114944458 -4,4,8.884148120880127 -8,4,10.396169662475586 -16,4,36.883479595184326 diff --git a/results/kernels-mpi/kernels_native_stencil.csv b/results/kernels-mpi/kernels_native_stencil.csv deleted file mode 100755 index e2e0670..0000000 --- a/results/kernels-mpi/kernels_native_stencil.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,17.950014114379883 -4,0,10.292688369750977 -6,0,12.9479079246521 -8,0,12.045936822891235 -10,0,11.777157545089722 -12,0,11.92081332206726 -14,0,11.86931300163269 -16,0,11.799824714660645 -2,1,17.989519357681274 -4,1,10.237369537353516 -6,1,12.907056093215942 -8,1,12.199209213256836 -10,1,11.709601402282715 -12,1,12.070431232452393 -14,1,10.396161794662476 -16,1,11.668048858642578 -2,2,17.878674268722534 -4,2,10.290180921554565 -6,2,13.326467990875244 -8,2,12.26327657699585 -10,2,11.687624454498291 -12,2,11.423378944396973 -14,2,10.90947675704956 -16,2,11.649436712265015 -2,3,18.052199602127075 -4,3,10.284363985061646 -6,3,12.928906202316284 -8,3,12.500142574310303 -10,3,11.51399564743042 -12,3,11.42465090751648 -14,3,11.132980346679688 -16,3,12.068653583526611 -2,4,17.936007976531982 -4,4,10.213274478912354 -6,4,12.915429830551147 -8,4,11.761768579483032 -10,4,11.291627645492554 -12,4,11.778459787368774 -14,4,10.494813919067383 -16,4,12.487107038497925 diff --git a/results/kernels-mpi/kernels_native_transpose.csv b/results/kernels-mpi/kernels_native_transpose.csv deleted file mode 100755 index 88c7bcb..0000000 --- a/results/kernels-mpi/kernels_native_transpose.csv +++ /dev/null @@ -1,41 +0,0 @@ -WorldSize,Run,ActualTime -2,0,5.06306004524231 -4,0,2.742102861404419 -6,0,2.8263349533081055 -8,0,2.7286407947540283 -10,0,5.68834662437439 -12,0,5.895431995391846 -14,0,5.997303009033203 -16,0,7.568700551986694 -2,1,4.815793514251709 -4,1,2.8279168605804443 -6,1,2.8087923526763916 -8,1,2.544917583465576 -10,1,5.357943296432495 -12,1,5.9433653354644775 -14,1,6.439666748046875 -16,1,7.5846569538116455 -2,2,4.870222091674805 -4,2,2.8053648471832275 -6,2,2.9146316051483154 -8,2,2.6600706577301025 -10,2,5.780741214752197 -12,2,5.965420722961426 -14,2,6.76208758354187 -16,2,7.517779111862183 -2,3,4.909365892410278 -4,3,2.8190712928771973 -6,3,2.8729705810546875 -8,3,2.752438545227051 -10,3,5.8181586265563965 -12,3,6.0327372550964355 -14,3,6.223717927932739 -16,3,7.460334300994873 -2,4,4.90281867980957 -4,4,2.795665979385376 -6,4,2.900256872177124 -8,4,2.7458693981170654 -10,4,5.834019660949707 -12,4,5.943347692489624 -14,4,6.297256708145142 -16,4,7.490770578384399 diff --git a/results/kernels-omp/openmp_dgemm_granny.csv b/results/kernels-omp/openmp_dgemm_granny.csv deleted file mode 100755 index d3231c3..0000000 --- a/results/kernels-omp/openmp_dgemm_granny.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,467.302 -1,1,464.967 -1,2,465.363 -1,3,466.04 -1,4,477.056 -2,0,232.556 -2,1,240.458 -2,2,249.738 -2,3,238.388 -2,4,232.342 -3,0,166.951 -3,1,160.208 -3,2,160.227 -3,3,160.396 -3,4,160.345 -4,0,120.886 -4,1,118.926 -4,2,124.828 -4,3,118.896 -4,4,118.426 -5,0,154.862 -5,1,153.478 -5,2,154.009 -5,3,153.693 -5,4,153.539 -6,0,134.75 -6,1,134.432 -6,2,135.319 -6,3,134.067 -6,4,135.806 -7,0,144.396 -7,1,144.158 -7,2,143.875 -7,3,143.864 -7,4,145.247 -8,0,152.74 -8,1,152.629 -8,2,152.565 -8,3,152.552 -8,4,152.733 diff --git a/results/kernels-omp/openmp_dgemm_native.csv b/results/kernels-omp/openmp_dgemm_native.csv deleted file mode 100755 index f84fd73..0000000 --- a/results/kernels-omp/openmp_dgemm_native.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,257.0 -2,0,129.25 -3,0,89.14 -4,0,65.7 -5,0,96.61 -6,0,87.38 -7,0,92.02 -8,0,81.01 -1,1,260.67 -2,1,128.1 -3,1,88.2 -4,1,66.77 -5,1,96.24 -6,1,88.15 -7,1,91.97 -8,1,80.57 -1,2,260.28 -2,2,130.94 -3,2,88.18 -4,2,66.21 -5,2,96.0 -6,2,86.24 -7,2,92.35 -8,2,80.64 -1,3,260.55 -2,3,128.26 -3,3,88.98 -4,3,65.99 -5,3,96.8 -6,3,86.95 -7,3,91.55 -8,3,80.84 -1,4,255.42 -2,4,127.91 -3,4,88.54 -4,4,66.46 -5,4,96.93 -6,4,86.41 -7,4,92.14 -8,4,80.8 diff --git a/results/kernels-omp/openmp_nstream_granny.csv b/results/kernels-omp/openmp_nstream_granny.csv deleted file mode 100755 index eb69435..0000000 --- a/results/kernels-omp/openmp_nstream_granny.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,78.3 -1,1,77.626 -1,2,77.274 -1,3,79.512 -1,4,79.214 -2,0,42.199 -2,1,42.067 -2,2,42.176 -2,3,42.083 -2,4,42.007 -3,0,30.345 -3,1,30.442 -3,2,30.576 -3,3,30.164 -3,4,30.441 -4,0,25.226 -4,1,25.379 -4,2,25.006 -4,3,25.094 -4,4,25.006 -5,0,28.428 -5,1,28.596 -5,2,28.5 -5,3,28.465 -5,4,28.451 -6,0,24.839 -6,1,24.849 -6,2,24.829 -6,3,24.765 -6,4,24.822 -7,0,22.08 -7,1,22.173 -7,2,22.176 -7,3,22.227 -7,4,22.13 -8,0,20.75 -8,1,20.748 -8,2,20.718 -8,3,20.709 -8,4,20.647 diff --git a/results/kernels-omp/openmp_nstream_native.csv b/results/kernels-omp/openmp_nstream_native.csv deleted file mode 100755 index abcc57d..0000000 --- a/results/kernels-omp/openmp_nstream_native.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,82.02 -2,0,43.61 -3,0,32.13 -4,0,25.67 -5,0,30.72 -6,0,26.61 -7,0,23.57 -8,0,22.19 -1,1,80.97 -2,1,43.16 -3,1,31.39 -4,1,25.4 -5,1,30.18 -6,1,25.83 -7,1,23.13 -8,1,21.8 -1,2,78.8 -2,2,42.62 -3,2,30.34 -4,2,25.27 -5,2,29.02 -6,2,25.67 -7,2,23.1 -8,2,21.44 -1,3,81.75 -2,3,42.09 -3,3,30.74 -4,3,25.2 -5,3,30.06 -6,3,26.37 -7,3,23.88 -8,3,22.38 -1,4,80.03 -2,4,42.29 -3,4,30.87 -4,4,25.26 -5,4,30.56 -6,4,26.05 -7,4,24.85 -8,4,22.65 diff --git a/results/kernels-omp/openmp_p2p_granny.csv b/results/kernels-omp/openmp_p2p_granny.csv deleted file mode 100755 index 7e34bc2..0000000 --- a/results/kernels-omp/openmp_p2p_granny.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,46.658 -1,1,46.791 -1,2,46.612 -1,3,46.64 -1,4,46.683 -2,0,23.781 -2,1,23.765 -2,2,23.782 -2,3,23.842 -2,4,23.776 -3,0,16.054 -3,1,16.075 -3,2,16.165 -3,3,16.085 -3,4,16.074 -4,0,12.215 -4,1,12.197 -4,2,12.192 -4,3,12.206 -4,4,12.201 -5,0,10.168 -5,1,9.914 -5,2,10.018 -5,3,9.954 -5,4,9.962 -6,0,8.637 -6,1,8.662 -6,2,8.721 -6,3,8.749 -6,4,8.722 -7,0,7.718 -7,1,7.658 -7,2,7.638 -7,3,7.613 -7,4,7.814 -8,0,7.251 -8,1,7.39 -8,2,7.417 -8,3,7.485 -8,4,7.344 diff --git a/results/kernels-omp/openmp_p2p_native.csv b/results/kernels-omp/openmp_p2p_native.csv deleted file mode 100755 index 94a5e92..0000000 --- a/results/kernels-omp/openmp_p2p_native.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,47.48 -2,0,24.65 -3,0,16.89 -4,0,13.09 -5,0,10.97 -6,0,9.54 -7,0,8.59 -8,0,8.12 -1,1,47.5 -2,1,24.69 -3,1,16.86 -4,1,13.02 -5,1,10.85 -6,1,9.52 -7,1,8.57 -8,1,8.13 -1,2,47.5 -2,2,24.68 -3,2,16.89 -4,2,13.0 -5,2,10.81 -6,2,9.41 -7,2,8.6 -8,2,8.12 -1,3,47.49 -2,3,24.65 -3,3,16.87 -4,3,13.37 -5,3,11.49 -6,3,9.37 -7,3,8.69 -8,3,8.08 -1,4,47.47 -2,4,24.66 -3,4,16.9 -4,4,13.05 -5,4,10.83 -6,4,9.38 -7,4,8.57 -8,4,8.27 diff --git a/results/kernels-omp/openmp_reduce_granny.csv b/results/kernels-omp/openmp_reduce_granny.csv deleted file mode 100755 index 62fb50d..0000000 --- a/results/kernels-omp/openmp_reduce_granny.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,5.159 -1,1,4.992 -1,2,5.137 -1,3,5.105 -1,4,4.998 -2,0,7.878 -2,1,8.11 -2,2,7.666 -2,3,7.751 -2,4,8.029 -3,0,10.509 -3,1,10.48 -3,2,10.605 -3,3,10.633 -3,4,10.613 -4,0,11.671 -4,1,11.81 -4,2,11.871 -4,3,11.865 -4,4,11.787 -5,0,14.849 -5,1,14.473 -5,2,14.87 -5,3,15.312 -5,4,15.031 -6,0,16.166 -6,1,16.531 -6,2,16.706 -6,3,16.437 -6,4,16.421 -7,0,17.66 -7,1,17.646 -7,2,17.672 -7,3,17.497 -7,4,17.595 -8,0,18.478 -8,1,18.681 -8,2,18.491 -8,3,18.536 -8,4,18.764 diff --git a/results/kernels-omp/openmp_reduce_native.csv b/results/kernels-omp/openmp_reduce_native.csv deleted file mode 100755 index 1d91b7d..0000000 --- a/results/kernels-omp/openmp_reduce_native.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,6.3 -2,0,10.22 -3,0,12.79 -4,0,11.99 -5,0,17.71 -6,0,17.49 -7,0,20.13 -8,0,20.23 -1,1,6.42 -2,1,8.68 -3,1,11.27 -4,1,11.81 -5,1,14.66 -6,1,18.03 -7,1,19.68 -8,1,20.33 -1,2,6.01 -2,2,8.5 -3,2,11.04 -4,2,11.83 -5,2,14.47 -6,2,17.62 -7,2,19.32 -8,2,20.15 -1,3,5.97 -2,3,8.56 -3,3,11.04 -4,3,11.82 -5,3,14.93 -6,3,18.86 -7,3,20.91 -8,3,22.06 -1,4,6.18 -2,4,8.56 -3,4,10.98 -4,4,11.88 -5,4,14.76 -6,4,17.38 -7,4,19.15 -8,4,19.16 diff --git a/results/kernels-omp/openmp_sparse_granny.csv b/results/kernels-omp/openmp_sparse_granny.csv deleted file mode 100755 index 44de297..0000000 --- a/results/kernels-omp/openmp_sparse_granny.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,184.536 -1,1,189.332 -1,2,195.222 -1,3,193.087 -1,4,194.758 -2,0,95.398 -2,1,95.422 -2,2,93.84 -2,3,92.897 -2,4,89.968 -3,0,62.339 -3,1,62.638 -3,2,62.371 -3,3,62.946 -3,4,62.077 -4,0,48.573 -4,1,46.507 -4,2,49.072 -4,3,49.043 -4,4,48.349 -5,0,60.82 -5,1,60.852 -5,2,59.442 -5,3,62.715 -5,4,61.494 -6,0,54.497 -6,1,53.623 -6,2,54.644 -6,3,57.133 -6,4,54.955 -7,0,51.212 -7,1,51.225 -7,2,51.835 -7,3,51.425 -7,4,49.159 -8,0,44.213 -8,1,42.235 -8,2,41.755 -8,3,44.634 -8,4,44.354 diff --git a/results/kernels-omp/openmp_sparse_native.csv b/results/kernels-omp/openmp_sparse_native.csv deleted file mode 100755 index 578ee29..0000000 --- a/results/kernels-omp/openmp_sparse_native.csv +++ /dev/null @@ -1,41 +0,0 @@ -NumThreads,Run,ExecTimeSecs -1,0,89.87 -2,0,96.24 -3,0,62.43 -4,0,49.68 -5,0,63.35 -6,0,52.71 -7,0,49.38 -8,0,42.73 -1,1,188.58 -2,1,87.09 -3,1,60.26 -4,1,48.0 -5,1,62.51 -6,1,53.29 -7,1,49.28 -8,1,40.0 -1,2,192.32 -2,2,90.86 -3,2,62.83 -4,2,49.1 -5,2,63.41 -6,2,55.95 -7,2,50.28 -8,2,42.13 -1,3,183.06 -2,3,91.37 -3,3,64.63 -4,3,45.48 -5,3,59.29 -6,3,53.56 -7,3,48.5 -8,3,40.34 -1,4,183.36 -2,4,89.56 -3,4,62.5 -4,4,47.28 -5,4,65.42 -6,4,51.41 -7,4,49.98 -8,4,45.85 diff --git a/results/lammps/lammps_granny_compute.csv b/results/lammps/lammps_granny_compute.csv deleted file mode 100755 index 015f8a1..0000000 --- a/results/lammps/lammps_granny_compute.csv +++ /dev/null @@ -1,46 +0,0 @@ -WorldSize,Run,Time -2,0,154.20 -2,1,154.33 -2,2,154.18 -3,0,105.80 -3,1,104.69 -3,2,104.16 -4,0,79.16 -4,1,79.18 -4,2,79.10 -5,0,86.73 -5,1,86.95 -5,2,87.56 -6,0,74.48 -6,1,74.32 -6,2,74.35 -7,0,69.78 -7,1,69.56 -7,2,69.65 -8,0,62.24 -8,1,62.66 -8,2,62.25 -9,0,54.68 -9,1,54.79 -9,2,54.68 -10,0,50.58 -10,1,50.12 -10,2,50.25 -11,0,45.43 -11,1,45.30 -11,2,45.33 -12,0,42.35 -12,1,42.09 -12,2,42.39 -13,0,40.77 -13,1,41.37 -13,2,42.19 -14,0,38.74 -14,1,38.62 -14,2,38.40 -15,0,35.91 -15,1,34.45 -15,2,34.44 -16,0,33.20 -16,1,33.25 -16,2,33.10 diff --git a/results/lammps/lammps_granny_network.csv b/results/lammps/lammps_granny_network.csv deleted file mode 100755 index 01d771d..0000000 --- a/results/lammps/lammps_granny_network.csv +++ /dev/null @@ -1,46 +0,0 @@ -WorldSize,Run,Time -2,0,152.91 -2,1,153.02 -2,2,152.84 -3,0,104.87 -3,1,104.89 -3,2,104.88 -4,0,80.08 -4,1,81.13 -4,2,80.13 -5,0,89.88 -5,1,90.54 -5,2,90.18 -6,0,78.32 -6,1,77.97 -6,2,78.05 -7,0,73.86 -7,1,73.84 -7,2,73.93 -8,0,67.68 -8,1,67.46 -8,2,67.60 -9,0,75.92 -9,1,76.42 -9,2,75.47 -10,0,76.71 -10,1,76.14 -10,2,76.63 -11,0,84.14 -11,1,83.91 -11,2,83.84 -12,0,93.51 -12,1,93.87 -12,2,93.18 -13,0,105.23 -13,1,106.09 -13,2,105.84 -14,0,114.37 -14,1,115.00 -14,2,115.84 -15,0,125.84 -15,1,125.12 -15,2,126.61 -16,0,142.10 -16,1,142.68 -16,2,138.43 diff --git a/results/lammps/lammps_native_compute.csv b/results/lammps/lammps_native_compute.csv deleted file mode 100755 index d6edad9..0000000 --- a/results/lammps/lammps_native_compute.csv +++ /dev/null @@ -1,16 +0,0 @@ -WorldSize,Run,Time -2,0,135.81 -3,0,92.38 -4,0,71.78 -5,0,91.44 -6,0,75.39 -7,0,67.51 -8,0,59.15 -9,0,52.57 -10,0,50.69 -11,0,44.60 -12,0,41.13 -13,0,39.96 -14,0,36.33 -15,0,34.36 -16,0,32.97 diff --git a/results/lammps/lammps_native_network.csv b/results/lammps/lammps_native_network.csv deleted file mode 100755 index 6d1dcd2..0000000 --- a/results/lammps/lammps_native_network.csv +++ /dev/null @@ -1,16 +0,0 @@ -WorldSize,Run,Time -2,0,137.71 -3,0,92.97 -4,0,73.77 -5,0,93.57 -6,0,81.61 -7,0,71.17 -8,0,64.45 -9,0,89.75 -10,0,90.79 -11,0,85.16 -12,0,93.25 -13,0,105.13 -14,0,114.31 -15,0,125.87 -16,0,136.95 diff --git a/results/migration/migration_all-to-all.csv b/results/migration/migration_all-to-all.csv deleted file mode 100755 index d506782..0000000 --- a/results/migration/migration_all-to-all.csv +++ /dev/null @@ -1,7 +0,0 @@ -WorldSize,Check,Run,Time -8,0,0,5.04 -8,2,0,11.90 -8,4,0,18.00 -8,6,0,25.85 -8,8,0,32.97 -8,10,0,38.57 diff --git a/results/migration/migration_very-network.csv b/results/migration/migration_very-network.csv deleted file mode 100755 index 446b71c..0000000 --- a/results/migration/migration_very-network.csv +++ /dev/null @@ -1,7 +0,0 @@ -WorldSize,Check,Run,Time -8,0,0,114.18 -8,2,0,149.84 -8,4,0,187.40 -8,6,0,201.21 -8,8,0,200.21 -8,10,0,198.02 diff --git a/tasks/__init__.py b/tasks/__init__.py index a25b3b8..74d8f83 100644 --- a/tasks/__init__.py +++ b/tasks/__init__.py @@ -1,7 +1,9 @@ from invoke import Collection +from . import cluster from . import docker from . import format_code +from . import k8s import logging @@ -20,8 +22,10 @@ logging.getLogger().setLevel(logging.DEBUG) ns = Collection( + cluster, docker, format_code, + k8s, ) ns.add_collection(elastic_ns, name="elastic") diff --git a/tasks/cluster.py b/tasks/cluster.py new file mode 100644 index 0000000..f1df932 --- /dev/null +++ b/tasks/cluster.py @@ -0,0 +1,143 @@ +from invoke import task +from os.path import join +from subprocess import run +from tasks.util.env import ( + ACR_NAME, + AKS_CLUSTER_NAME, + AKS_NODE_COUNT, + AKS_REGION, + AKS_VM_SIZE, + AZURE_PUB_SSH_KEY, + AZURE_RESOURCE_GROUP, + CONFIG_DIR, + KUBECTL_BIN, +) +from tasks.util.version import get_k8s_version + + +# AKS commandline reference here: +# https://docs.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest +def _run_aks_cmd(name, az_args=None): + cmd = [ + "az", + "aks {}".format(name), + "--resource-group {}".format(AZURE_RESOURCE_GROUP), + ] + + if az_args: + cmd.extend(az_args) + + cmd = " ".join(cmd) + print(cmd) + run(cmd, shell=True, check=True) + + +@task +def list(ctx): + """ + List all AKS resources + """ + _run_aks_cmd("list") + + +@task(optional=["sgx"]) +def provision( + ctx, + nodes=AKS_NODE_COUNT, + vm=AKS_VM_SIZE, + location=AKS_REGION, + name=AKS_CLUSTER_NAME, + sgx=False, + granny=True, +): + """ + Provision the AKS cluster + """ + k8s_ver = get_k8s_version() + sgx = sgx and (sgx.lower() != "false") + granny_kubelet_config = join(CONFIG_DIR, "granny_aks_kubelet_config.json") + granny_os_config = join(CONFIG_DIR, "granny_aks_os_config.json") + + if sgx and "Standard_DC" not in vm: + print( + "Error provisioning SGX cluster: only `Standard_DC` VMs are supported" + ) + return + + _run_aks_cmd( + "create", + [ + "--name {}".format(name), + "--node-count {}".format(nodes), + "--node-vm-size {}".format(vm), + "--os-sku Ubuntu", + "--kubernetes-version {}".format(k8s_ver), + "--ssh-key-value {}".format(AZURE_PUB_SSH_KEY), + "--location {}".format(location), + # Could not create a role assignment for ACR. Are you an Owner on this subscription? + # "--attach-acr {}".format(ACR_NAME.split(".")[0]), + "{}".format( + "--kubelet-config {}".format(granny_kubelet_config) + if granny + else "" + ), + "{}".format( + "--linux-os-config {}".format(granny_os_config) + if granny + else "" + ), + "{}".format( + "--enable-addons confcom --enable-sgxquotehelper" + if sgx + else "" + ), + ], + ) + + +@task +def details(ctx): + """ + Show the details of the cluster + """ + _run_aks_cmd( + "show", + [ + "--name {}".format(AKS_CLUSTER_NAME), + ], + ) + + +@task +def delete(ctx, name=AKS_CLUSTER_NAME): + """ + Delete the AKS cluster + """ + _run_aks_cmd( + "delete", + [ + "--name {}".format(name), + "--yes", + ], + ) + + +@task +def credentials(ctx, name=AKS_CLUSTER_NAME, out_file=None): + """ + Get credentials for the AKS cluster + """ + # Set up the credentials + _run_aks_cmd( + "get-credentials", + [ + "--name {}".format(name), + "--overwrite-existing", + "--file {}".format(out_file) if out_file else "", + ], + ) + + # Check we can access the cluster + cmd = "{} get nodes".format(KUBECTL_BIN) + print(cmd) + run(cmd, shell=True, check=True) diff --git a/tasks/elastic/README.md b/tasks/elastic/README.md index eab7b6c..bb95383 100644 --- a/tasks/elastic/README.md +++ b/tasks/elastic/README.md @@ -1,4 +1,4 @@ -# Elastic Scaling Micro-Benchmark +# Elastic Scaling Micro-Benchmark (Fig.12) In this experiment we measure the benefits of elastically scaling-up OpenMP applications to benefit from idle resources. We run a pipe-lined algorithm @@ -44,6 +44,11 @@ You may now plot the results using: inv elastic.plot ``` +the plot will be available in [`/plots/elastic/elastic_speedup.pdf`](/plots/elastic/elastic_speedup.pdf), we also include it below: + +![Elastic Scaling Plot](/plots/elastic/elastic_speedup.png) + + ## Clean-Up Finally, delete the Granny cluster: diff --git a/tasks/k8s.py b/tasks/k8s.py new file mode 100644 index 0000000..9e6be95 --- /dev/null +++ b/tasks/k8s.py @@ -0,0 +1,91 @@ +from invoke import task +from os.path import join, exists +from os import makedirs +from shutil import copy, rmtree +from subprocess import run + +from tasks.util.env import ( + BIN_DIR, + GLOBAL_BIN_DIR, + K9S_VERSION, +) + +from tasks.util.version import get_k8s_version + + +def _download_binary(url, binary_name): + makedirs(BIN_DIR, exist_ok=True) + cmd = "curl -LO {}".format(url) + run(cmd, shell=True, check=True, cwd=BIN_DIR) + run("chmod +x {}".format(binary_name), shell=True, check=True, cwd=BIN_DIR) + + return join(BIN_DIR, binary_name) + + +def _symlink_global_bin(binary_path, name): + global_path = join(GLOBAL_BIN_DIR, name) + if exists(global_path): + print("Removing existing binary at {}".format(global_path)) + run( + "sudo rm -f {}".format(global_path), + shell=True, + check=True, + ) + + print("Symlinking {} -> {}".format(global_path, binary_path)) + run( + "sudo ln -s {} {}".format(binary_path, name), + shell=True, + check=True, + cwd=GLOBAL_BIN_DIR, + ) + + +@task +def install_kubectl(ctx, system=False): + """ + Install the k8s CLI (kubectl) + """ + k8s_ver = get_k8s_version() + url = "https://dl.k8s.io/release/v{}/bin/linux/amd64/kubectl".format( + k8s_ver + ) + + binary_path = _download_binary(url, "kubectl") + + # Symlink for kubectl globally + if system: + _symlink_global_bin(binary_path, "kubectl") + + +@task +def install_k9s(ctx, system=False): + """ + Install the K9s CLI + """ + tar_name = "k9s_Linux_amd64.tar.gz" + url = "https://github.com/derailed/k9s/releases/download/v{}/{}".format( + K9S_VERSION, tar_name + ) + print(url) + + # Download the TAR + workdir = "/tmp/k9s-csg" + makedirs(workdir, exist_ok=True) + + cmd = "curl -LO {}".format(url) + run(cmd, shell=True, check=True, cwd=workdir) + + # Untar + run("tar -xf {}".format(tar_name), shell=True, check=True, cwd=workdir) + + # Copy k9s into place + binary_path = join(BIN_DIR, "k9s") + copy(join(workdir, "k9s"), binary_path) + + # Remove tar + rmtree(workdir) + + # Symlink for k9s command globally + if system: + _symlink_global_bin(binary_path, "k9s") diff --git a/tasks/kernels_mpi/README.md b/tasks/kernels_mpi/README.md index f0ea50e..2a7b526 100644 --- a/tasks/kernels_mpi/README.md +++ b/tasks/kernels_mpi/README.md @@ -1,14 +1,14 @@ -# ParRes Kernels Experiment (MPI) +# ParRes Kernels Experiment - MPI (Fig.9b) This experiment runs a set of the [ParRes Kernels](https://github.com/ParRes/Kernels) as a microbenchmark for Granny's MPI implementation. ## Start AKS cluster -In the `experiment-base` terminal, run: +Create a new cluster: ```bash -(faasm-exp-base) inv cluster.provision --vm Standard_D8_v5 --nodes 3 cluster.credentials +inv cluster.provision --vm Standard_D8_v5 --nodes 3 cluster.credentials ``` ## Granny @@ -16,19 +16,19 @@ In the `experiment-base` terminal, run: Deploy the cluster: ```bash -(faasm-exp-faabric) faasmctl deploy.k8s --workers=2 +faasmctl deploy.k8s --workers=2 ``` Upload the WASM file: ```bash -(faasm-exp-faabric) inv kernels-mpi.wasm.upload +inv kernels-mpi.wasm.upload ``` and run the experiment with: ```bash -(faasm-exp-faabric) inv kernels-mpi.run.wasm +inv kernels-mpi.run.wasm ``` finally, delete the Granny cluster: @@ -63,15 +63,14 @@ To plot the results, just run: inv kernels-mpi.plot ``` -the plot will be available in [`./plots/kernels-mpi/mpi_kernels_slowdown.pdf`]( -./plots/kernels-mpi/mpi_kernels_slowdown.pdf), we also include it below: +the plot will be available in [`/plots/kernels-mpi/mpi_kernels_slowdown.pdf`](/plots/kernels-mpi/mpi_kernels_slowdown.pdf), we also include it below: -![MPI Kernels Slowdown Plot](./plots/kernels-mpi/mpi_kernels_slowdown.png) +![MPI Kernels Slowdown Plot](/plots/kernels-mpi/mpi_kernels_slowdown.png) ## Clean-up Finally, delete the AKS cluster: ```bash -(faasm-exp-base) inv cluster.delete +inv cluster.delete ``` diff --git a/tasks/kernels_omp/README.md b/tasks/kernels_omp/README.md index 3d0f3ef..c176b0c 100644 --- a/tasks/kernels_omp/README.md +++ b/tasks/kernels_omp/README.md @@ -1,14 +1,14 @@ -# ParRes Kernels Experiment (OpenMP) +# ParRes Kernels Experiment - OpenMP (Fig.10) This experiment runs a set of the [ParRes Kernels](https://github.com/ParRes/Kernels) as a microbenchmark for Granny's OpenMP implementation. ## Start AKS cluster -In the `experiment-base` terminal, run: +Create a new cluster: ```bash -(faasm-exp-base) inv cluster.provision --vm Standard_D8_v5 --nodes 2 cluster.credentials +inv cluster.provision --vm Standard_D8_v5 --nodes 2 cluster.credentials ``` ## Faasm @@ -16,19 +16,19 @@ In the `experiment-base` terminal, run: Deploy the cluster: ```bash -(faasm-exp-faabric) faasmctl deploy.k8s --workers=1 +faasmctl deploy.k8s --workers=1 ``` Upload the WASM file: ```bash -(faasm-exp-faabric) inv kernels-omp.wasm.upload +inv kernels-omp.wasm.upload ``` and run the experiment with: ```bash -(faasm-exp-faabric) inv kernels-omp.run.wasm +inv kernels-omp.run.wasm ``` finally, delete the cluster: @@ -63,15 +63,14 @@ To plot the results, just run: inv kernels-omp.plot ``` -the plot will be available in [`./plots/kernels-omp/openmp_kernels_slowdown.pdf`]( -./plots/kernels-omp/openmp_kernels_slowdown.pdf), we also include it below: +the plot will be available in [`/plots/kernels-omp/openmp_kernels_slowdown.pdf`](/plots/kernels-omp/openmp_kernels_slowdown.pdf), we also include it below: -![OpenMP Kernels Slowdown Plot](./plots/kernels-omp/openmp_kernels_slowdown.png) +![OpenMP Kernels Slowdown Plot](/plots/kernels-omp/openmp_kernels_slowdown.png) ## Clean-up Finally, delete the AKS cluster: ```bash -(faasm-exp-base) inv cluster.delete +inv cluster.delete ``` diff --git a/tasks/lammps/README.md b/tasks/lammps/README.md index 132f45b..4ccd6a5 100644 --- a/tasks/lammps/README.md +++ b/tasks/lammps/README.md @@ -5,11 +5,10 @@ as part of the array experiment. ## Start AKS cluster -In the `experiment-base` terminal, run: +Create a new cluster: ```bash -inv cluster.provision --vm Standard_D8_v5 --nodes 3 -inv cluster.credentials +inv cluster.provision --vm Standard_D8_v5 --nodes 3 cluster.credentials ``` ## Granny diff --git a/tasks/lammps/run.py b/tasks/lammps/run.py index c78f838..fb50c37 100644 --- a/tasks/lammps/run.py +++ b/tasks/lammps/run.py @@ -60,7 +60,7 @@ def wasm(ctx, w, repeats=1): ) workload_config = LAMMPS_SIM_WORKLOAD_CONFIGS[workload] data_file = basename( - get_lammps_data_file(workload_config["data-file"])["data"][0] + get_lammps_data_file(workload_config["data_file"])["data"][0] ) csv_name = "lammps_granny_{}.csv".format(workload) @@ -111,7 +111,7 @@ def native(ctx, w, repeats=1): ) ) workload_config = LAMMPS_SIM_WORKLOAD_CONFIGS[workload] - data_file = get_lammps_data_file(workload_config["data-file"])["data"][ + data_file = get_lammps_data_file(workload_config["data_file"])["data"][ 0 ] diff --git a/tasks/lulesh/README.md b/tasks/lulesh/README.md index 0043969..7236088 100644 --- a/tasks/lulesh/README.md +++ b/tasks/lulesh/README.md @@ -10,11 +10,11 @@ This experiment is a single execution of the LULESH simulation using OpenMP. ## Start AKS cluster -In the `experiment-base` terminal, run: +Create a new cluster: ```bash -(faasm-exp-base) inv cluster.provision --vm Standard_D8_v5 --nodes 1 -(faasm-exp-base) inv cluster.credentials +inv cluster.provision --vm Standard_D8_v5 --nodes 1 +inv cluster.credentials ``` ## Granny @@ -22,25 +22,25 @@ In the `experiment-base` terminal, run: Deploy the cluster: ```bash -(faasm-exp-faabric) faasmctl deploy.k8s --workers=1 +faasmctl deploy.k8s --workers=1 ``` Upload the WASM file: ```bash -(faasm-exp-faabric) inv lammps.wasm.upload +inv lammps.wasm.upload ``` and run the experiment with: ```bash -(faasm-exp-faabric) inv lammps.run.granny -w compute -w network +inv lammps.run.granny -w compute -w network ``` To remove the cluster, run: ```bash -(faasm-exp-mpi) faasmctl delete +faasmctl delete ``` ## Native @@ -78,7 +78,7 @@ which will generate a plot in [`./plots/lammps/runtime.png`]( ## Clean-Up -Remember to delete the cluster. From the experiment base terminal: +Remember to delete the cluster. ```bash inv cluster.delete diff --git a/tasks/makespan/README.md b/tasks/makespan/README.md index c2d112b..573fac0 100644 --- a/tasks/makespan/README.md +++ b/tasks/makespan/README.md @@ -7,11 +7,11 @@ NOTE: we only compare to ourselves! TODO: add README for the conservative plot -First, from the `faasm-exp-base` shell, deploy the VM cluster: +Create a new cluster: ```bash -(faasm-exp-base) inv cluster.provision --vm Standard_D8_v5 --nodes 33 -(faasm-exp-base) inv cluster.credentials +inv cluster.provision --vm Standard_D8_v5 --nodes 33 +inv cluster.credentials ``` ## Native @@ -19,14 +19,14 @@ First, from the `faasm-exp-base` shell, deploy the VM cluster: First, deploy the native `k8s` cluster: ```bash -(faasm-exp-base) inv makespan.native.deploy --num-vms 32 +inv makespan.native.deploy --num-vms 32 ``` Now, you can run the different baselines: ```bash -(faasm-exp-base) inv makespan.run.native-batch --workload mpi-migrate --num-vms 32 --num-tasks 100 -(faasm-exp-base) inv makespan.run.native-slurm --workload mpi-migrate --num-vms 32 --num-tasks 100 +inv makespan.run.native-batch --workload mpi-migrate --num-vms 32 --num-tasks 100 +inv makespan.run.native-slurm --workload mpi-migrate --num-vms 32 --num-tasks 100 ``` Lastly, remove the native `k8s` cluster: @@ -46,20 +46,20 @@ faasmctl deploy.k8s --workers=32 Second, upload the corresponding WASM files: ```bash -(faasm-exp-faabric) inv makespan.wasm.upload +inv makespan.wasm.upload ``` Third, run the experiment: ```bash -(faasm-exp-faabric) inv makespan.run.granny --num-vms 32 --num-tasks 100 --workload mpi-migrate [--migrate] +inv makespan.run.granny --num-vms 32 --num-tasks 100 --workload mpi-migrate [--migrate] ``` During an experiment, you may monitor the state of the cluster (in a separete shell) by using: ```bash -(faasm-exp-faabric) faasmctl monitor.planner +faasmctl monitor.planner ``` ## Plot the results diff --git a/tasks/makespan/eviction.md b/tasks/makespan/eviction.md index b8e9c01..016af35 100644 --- a/tasks/makespan/eviction.md +++ b/tasks/makespan/eviction.md @@ -1,10 +1,10 @@ # Makespan Experiment (Eviction version) -First, from the `faasm-exp-base` shell, deploy the VM cluster: +Create a new cluster: ```bash -(faasm-exp-base) inv cluster.provision --vm Standard_D8_v5 --nodes 33 -(faasm-exp-base) inv cluster.credentials +inv cluster.provision --vm Standard_D8_v5 --nodes 33 +inv cluster.credentials ``` ## Native @@ -12,14 +12,14 @@ First, from the `faasm-exp-base` shell, deploy the VM cluster: First, deploy the native `k8s` cluster: ```bash -(faasm-exp-base) inv makespan.native.deploy --num-vms 32 +inv makespan.native.deploy --num-vms 32 ``` Now, you can run the different baselines: ```bash -(faasm-exp-base) inv makespan.run.native-batch --workload mpi-evict --num-vms 32 --num-tasks 200 -(faasm-exp-base) inv makespan.run.native-slurm --workload mpi-evict --num-vms 32 --num-tasks 200 +inv makespan.run.native-batch --workload mpi-evict --num-vms 32 --num-tasks 200 +inv makespan.run.native-slurm --workload mpi-evict --num-vms 32 --num-tasks 200 ``` Lastly, remove the native `k8s` cluster: @@ -39,24 +39,24 @@ faasmctl deploy.k8s --workers=32 Second, upload the corresponding WASM files: ```bash -(faasm-exp-faabric) inv makespan.wasm.upload +inv makespan.wasm.upload ``` Third, run the experiment: ```bash # TODO: will probably ditch --workload=mpi -# (faasm-exp-faabric) inv makespan.run.granny --workload mpi +# inv makespan.run.granny --workload mpi # Set the --migrate flag to enable migrating Granules at runtime # TODO: rename the workload to `mpi` -(faasm-exp-faabric) inv makespan.run.granny --num-vms 32 --num-tasks 100 --workload mpi-migrate [--migrate] +inv makespan.run.granny --num-vms 32 --num-tasks 100 --workload mpi-migrate [--migrate] ``` During an experiment, you may monitor the state of the cluster (in a separete shell) by using: ```bash -(faasm-exp-faabric) faasmctl monitor.planner +faasmctl monitor.planner ``` ## Plot the results diff --git a/tasks/migration/README.md b/tasks/migration/README.md index aaed8b1..afc44c1 100644 --- a/tasks/migration/README.md +++ b/tasks/migration/README.md @@ -1,4 +1,4 @@ -# Migration Experiment +# Migration Experiment (Fig.11) This experiment explores the benefits of migrating the execution of scientific applications to benefit from dynamic changes in the compute environment. @@ -6,38 +6,37 @@ applications to benefit from dynamic changes in the compute environment. First, provision the cluster: ```bash -inv cluster.provision --vm Standard_D8_v5 --nodes 3 --name ${CLUSTER_NAME} -inv cluster.credentials --name ${CLUSTER_NAME} +inv cluster.provision --vm Standard_D8_v5 --nodes 3 cluster.credentials ``` Second, deploy the cluster ```bash -(faasm-exp-faabric) faasmctl deploy.k8s --workers 2 +faasmctl deploy.k8s --workers 2 ``` Second, upload the WASM files: ```bash -(faasm-exp-faabric) inv migration.wasm.upload +inv migration.wasm.upload ``` Third, run the experiments: ```bash -(faasm-exp-faabric) inv migration.run -w compute -w network +inv migration.run -w all-to-all -w very-network ``` Lastly, plot the results: ```bash -(faasm-exp-faabric) inv migration.plot +inv migration.plot ``` and clean up: ```bash -(faasm-exp-faabric) faasmctl delete +faasmctl delete ``` ## Migration Oracle diff --git a/tasks/migration/plot.py b/tasks/migration/plot.py index 7d3133f..040907c 100644 --- a/tasks/migration/plot.py +++ b/tasks/migration/plot.py @@ -2,6 +2,7 @@ from invoke import task from matplotlib.pyplot import hlines, subplots import matplotlib.pyplot as plt +from os import makedirs from numpy import arange from os.path import join from pandas import read_csv @@ -59,6 +60,7 @@ def plot(ctx): Plot migration figure """ migration_results = _read_results() + makedirs(MIGRATION_PLOTS_DIR, exist_ok=True) do_plot("all-to-all", migration_results) # do_plot("compute", migration_results) diff --git a/tasks/openmpi/README.md b/tasks/openmpi/README.md index 85dccac..a608d8f 100644 --- a/tasks/openmpi/README.md +++ b/tasks/openmpi/README.md @@ -5,11 +5,11 @@ as part of the array experiment. ## Start AKS cluster -In the `experiment-base` terminal, run: +Create a new cluster: ```bash -(faasm-exp-base) inv cluster.provision --vm Standard_D8_v5 --nodes 3 -(faasm-exp-base) inv cluster.credentials +inv cluster.provision --vm Standard_D8_v5 --nodes 3 +inv cluster.credentials ``` ## Granny @@ -17,25 +17,25 @@ In the `experiment-base` terminal, run: Deploy the cluster: ```bash -(faasm-exp-faabric) faasmctl deploy.k8s --workers=2 +faasmctl deploy.k8s --workers=2 ``` Upload the WASM file: ```bash -(faasm-exp-faabric) inv lammps.wasm.upload +inv lammps.wasm.upload ``` and run the experiment with: ```bash -(faasm-exp-faabric) inv lammps.run.wasm -w compute -w network +inv lammps.run.wasm -w compute -w network ``` To remove the cluster, run: ```bash -(faasm-exp-mpi) faasmctl delete +faasmctl delete ``` ## Native diff --git a/tasks/polybench/README.md b/tasks/polybench/README.md index 3ecb70d..0b56c36 100644 --- a/tasks/polybench/README.md +++ b/tasks/polybench/README.md @@ -12,8 +12,8 @@ First, provision the cluster. For ease of deployment, we still deploy a K8s cluster of just one node, which we will access directly. ```bash -inv cluster.provision --vm Standard_D8_v5 --nodes 1 --name ${CLUSTER_NAME} -inv cluster.credentials --name ${CLUSTER_NAME} +inv cluster.provision --vm Standard_D8_v5 --nodes 1 +inv cluster.credentials ``` ## Native @@ -81,5 +81,5 @@ which will generate a `.pdf` file in `./plots/polybench/slowdown.pdf`. Lastly, clean the cluster: ```bash -inv cluster.delete --name ${CLUSTER_NAME} +inv cluster.delete ``` diff --git a/tasks/polybench/native.py b/tasks/polybench/native.py index 1528b15..1d292c7 100644 --- a/tasks/polybench/native.py +++ b/tasks/polybench/native.py @@ -17,8 +17,10 @@ def deploy(ctx, backend="k8s", num_vms=1, num_cores_per_vm=8, ctrs_per_vm=1): num_ctrs = int(num_vms) * int(ctrs_per_vm) num_cores_per_ctr = int(num_cores_per_vm / ctrs_per_vm) if backend == "k8s": + print('deploy_native_mpi') deploy_native_mpi( - "polybench", FAABRIC_EXP_IMAGE_NAME, num_ctrs, num_cores_per_ctr + "polybench", FAABRIC_EXP_IMAGE_NAME, num_ctrs, + # num_cores_per_ctr, ) wait_for_pods( @@ -39,7 +41,8 @@ def delete(ctx, backend="k8s", num_vms=2, num_cores_per_vm=8, ctrs_per_vm=1): if backend == "k8s": delete_native_mpi( - "polybench", FAABRIC_EXP_IMAGE_NAME, num_ctrs, num_cores_per_ctr + "polybench", FAABRIC_EXP_IMAGE_NAME, num_ctrs, + # num_cores_per_ctr, ) else: raise RuntimeError("Compose backend not implemented!") diff --git a/tasks/util/env.py b/tasks/util/env.py index d44584c..973da5d 100644 --- a/tasks/util/env.py +++ b/tasks/util/env.py @@ -1,14 +1,27 @@ from os.path import dirname, realpath, expanduser, join, exists from shutil import rmtree -from os import makedirs +from os import getenv, makedirs from subprocess import run HOME_DIR = expanduser("~") PROJ_ROOT = dirname(dirname(dirname(realpath(__file__)))) +BIN_DIR = join(PROJ_ROOT, "bin") +GLOBAL_BIN_DIR = "/usr/local/bin" +CONFIG_DIR = join(PROJ_ROOT, "config") FAASM_ROOT = join(HOME_DIR, "faasm") SYSTEM_NAME = "Granny" +K9S_VERSION = "0.32.2" + +AZURE_RESOURCE_GROUP = "faasm" ACR_NAME = "faasm.azurecr.io" +AKS_CLUSTER_NAME = getenv('USER') + "-faasm-cluster" +AKS_VM_SIZE = "Standard_DS5_v2" +AKS_NODE_COUNT = 4 +AKS_REGION = "eastus" +AZURE_PUB_SSH_KEY = "~/.ssh/id_rsa.pub" +KUBECTL_BIN = join(PROJ_ROOT, "bin", "kubectl") + FAABRIC_EXP_IMAGE_NAME = "faabric-experiments" NATIVE_BUILD_DIR = join(PROJ_ROOT, "build", "native") diff --git a/tasks/util/version.py b/tasks/util/version.py new file mode 100644 index 0000000..46baaaa --- /dev/null +++ b/tasks/util/version.py @@ -0,0 +1,23 @@ +from os.path import join + +from tasks.util.env import PROJ_ROOT + +# Note - this must match the version used by Faasm +KNATIVE_VERSION = "1.1.0" +K9S_VERSION = "0.24.15" + + +def _read_ver_file(file_path): + with open(file_path, "r") as fh: + ver = fh.read() + ver = ver.strip() + + return ver + + +def get_version(): + return _read_ver_file(join(PROJ_ROOT, "VERSION")) + + +def get_k8s_version(): + return _read_ver_file(join(PROJ_ROOT, "K8S_VERSION"))