Last active
April 9, 2018 13:41
-
-
Save mpoquet/56ec34c71fbe73bc8fb6ead959bdc2e9 to your computer and use it in GitHub Desktop.
Batsim performance test on HPC2N and RICC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
pkgs ? import ( | |
fetchTarball "https://github.com/NixOS/nixpkgs/archive/17.09.tar.gz") {}, | |
dmpkgs ? import ( | |
fetchTarball "https://gitlab.inria.fr/vreis/datamove-nix/repository/7e2af348a5993de734452cd1cd8e8fafd76e308c/archive.tar.gz" | |
) { inherit pkgs;}, | |
}: | |
pkgs.stdenv.mkDerivation rec { | |
name = "expe-env"; | |
env = pkgs.buildEnv { name = name; paths = buildInputs; }; | |
buildInputs = [ | |
pkgs.curl | |
pkgs.gzip | |
pkgs.python35 | |
pkgs.python35Packages.sortedcontainers | |
dmpkgs.batsim | |
dmpkgs.batsched | |
dmpkgs.batexpe | |
pkgs.R | |
pkgs.rPackages.dplyr | |
pkgs.rPackages.readr | |
]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make run | |
nix-shell --pure ./default.nix --command ./run_instances.bash | |
downloading ‘https://gitlab.inria.fr/vreis/datamove-nix/repository/7e2af348a5993de734452cd1cd8e8fafd76e308c/archive.tar.gz’... [0/0 KiB, 0.0 KiB/s] | |
+ robin --quiet ./instances/hpc2n-fcfs.robin | |
real 1m27.591s | |
user 1m4.549s | |
sys 0m19.965s | |
+ robin --quiet ./instances/hpc2n-easy.robin | |
real 1m24.661s | |
user 1m4.405s | |
sys 0m18.813s | |
+ robin --quiet ./instances/ricc-fcfs.robin | |
real 12m42.988s | |
user 11m36.551s | |
sys 0m51.017s | |
+ robin --quiet ./instances/ricc-easy.robin | |
real 14m57.913s | |
user 13m40.592s | |
sys 0m54.568s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
@echo "There is no default target. Try make prepare, make run or make analyze." | |
prepare: | |
nix-shell --pure ./default.nix --command ./prepare_instances.bash | |
run: | |
nix-shell --pure ./default.nix --command ./run_instances.bash | |
analyze: | |
nix-shell --pure ./default.nix --command ./run_analysis.R | |
clean: | |
\rm -rf instances/ platforms/ workloads/ | |
mrproper: clean | |
\rm -rf result/ | |
distclean: mrproper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workload | algo | scheduling_time | simulation_time | scheduling_time_proportion | |
---|---|---|---|---|---|
hpc2n | easy | 38.649796 | 79.764506 | 0.48454880420120705 | |
hpc2n | fcfs | 40.465975 | 82.625264 | 0.4897530493820873 | |
ricc | easy | 250.351107 | 872.469668 | 0.28694534169181 | |
ricc | fcfs | 117.418602 | 734.536417 | 0.159854023956446 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux | |
############# | |
# Variables # | |
############# | |
# A clone to Batsim's repo, on tag v2.0.0 | |
BATSIM_DIR=$(realpath ./batsim-v2.0.0) | |
RESULT_DIR="$(realpath .)/result" | |
BATLOG="--quiet --disable-schedule-tracing --disable-machine-state-tracing" | |
TIMEOUTS="--simulation-timeout=86400 --ready-timeout=5 --success-timeout=120 --failure-timeout=0" | |
###################### | |
# Generate platforms # | |
###################### | |
mkdir -p platforms | |
${BATSIM_DIR}/tools/energy_pform_generator_homo_nonet.py -n 240 \ | |
-o platforms/platform_hpc2n.xml | |
${BATSIM_DIR}/tools/energy_pform_generator_homo_nonet.py -n 8192 \ | |
-o platforms/platform_ricc.xml | |
###################### | |
# Generate workloads # | |
###################### | |
mkdir -p workloads | |
curl -o ./workloads/HPC2N-2002-2.2-cln.swf.gz \ | |
http://www.cs.huji.ac.il/labs/parallel/workload/l_hpc2n/HPC2N-2002-2.2-cln.swf.gz | |
gunzip -k -f ./workloads/HPC2N-2002-2.2-cln.swf.gz | |
${BATSIM_DIR}/tools/swf_to_batsim_workload_delay.py \ | |
./workloads/HPC2N-2002-2.2-cln.swf ./workloads/workload_hpc2n.json \ | |
-i1 -t -pf 240 | |
curl -o ./workloads/RICC-2010-2.swf.gz \ | |
http://www.cs.huji.ac.il/labs/parallel/workload/l_ricc/RICC-2010-2.swf.gz | |
gunzip -k -f ./workloads/RICC-2010-2.swf.gz | |
${BATSIM_DIR}/tools/swf_to_batsim_workload_delay.py \ | |
./workloads/RICC-2010-2.swf ./workloads/workload_ricc.json \ | |
-i1 -t -pf 8192 | |
############################### | |
# Define simulation instances # | |
############################### | |
mkdir -p instances | |
# hpc2n-fcfs | |
robin generate ./instances/hpc2n-fcfs.robin \ | |
--output-dir="${RESULT_DIR}/hpc2n-fcfs" \ | |
--batcmd="batsim ${BATLOG} -p $(realpath ./platforms/platform_hpc2n.xml) -w $(realpath ./workloads/workload_hpc2n.json) -e ${RESULT_DIR}/hpc2n-fcfs/out" \ | |
--schedcmd='batsched -v fcfs_fast >/dev/null' \ | |
${TIMEOUTS} | |
# ricc-fcfs | |
robin generate ./instances/ricc-fcfs.robin \ | |
--output-dir="${RESULT_DIR}/ricc-fcfs" \ | |
--batcmd="batsim ${BATLOG} -p $(realpath ./platforms/platform_ricc.xml) -w $(realpath ./workloads/workload_ricc.json) -e ${RESULT_DIR}/ricc-fcfs/out" \ | |
--schedcmd='batsched -v fcfs_fast >/dev/null' \ | |
${TIMEOUTS} | |
# hpc2n-easy | |
robin generate ./instances/hpc2n-easy.robin \ | |
--output-dir="${RESULT_DIR}/hpc2n-easy" \ | |
--batcmd="batsim ${BATLOG} -p $(realpath ./platforms/platform_hpc2n.xml) -w $(realpath ./workloads/workload_hpc2n.json) -e ${RESULT_DIR}/hpc2n-easy/out" \ | |
--schedcmd='batsched -v easy_bf_fast >/dev/null' \ | |
${TIMEOUTS} | |
# ricc-easy | |
robin generate ./instances/ricc-easy.robin \ | |
--output-dir="${RESULT_DIR}/ricc-easy" \ | |
--batcmd="batsim ${BATLOG} -p $(realpath ./platforms/platform_ricc.xml) -w $(realpath ./workloads/workload_ricc.json) -e ${RESULT_DIR}/ricc-easy/out" \ | |
--schedcmd='batsched -v easy_bf_fast >/dev/null' \ | |
${TIMEOUTS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This file describes how to reproduce the whole experiment | |
# Step 0 (retrieve gist) | |
curl -o ./gist.zip https://codeload.github.com/gist/56ec34c71fbe73bc8fb6ead959bdc2e9/zip/master | |
unzip ./gist.zip | |
mv 56ec34c71fbe73bc8fb6ead959bdc2e9-master ./gist | |
cd ./gist | |
chmod +x ./*.bash ./*.R | |
# Step 1 (install Nix if needed) | |
curl https://nixos.org/nix/install | sh | |
# Step 2 (retrieve a copy of Batsim repo at version v2.0.0) | |
BATSIM_DIR=./batsim-v2.0.0 | |
git clone https://gitlab.inria.fr/batsim/batsim.git ${BATSIM_DIR} | |
pushd . | |
cd ${BATSIM_DIR} | |
git checkout v2.0.0 | |
popd | |
# Step 3 (update BATSIM_DIR in prepare_instances.bash if needed) | |
# Step 4 (prepare the instances) | |
# First run may be very long, as Nix will retrieve ALL needed dependencies. | |
make prepare | |
# Step 5 (run the instances) | |
make run | |
# Step 6 (analyze results) | |
make analyze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
library("readr") | |
library("dplyr") | |
hpc2n_easy = read_csv("result/hpc2n-easy/out_schedule.csv") %>% | |
mutate(workload='hpc2n', algo='easy') | |
hpc2n_fcfs = read_csv("result/hpc2n-fcfs/out_schedule.csv") %>% | |
mutate(workload='hpc2n', algo='fcfs') | |
ricc_easy = read_csv("result/ricc-easy/out_schedule.csv") %>% | |
mutate(workload='ricc', algo='easy') | |
ricc_fcfs = read_csv("result/ricc-fcfs/out_schedule.csv") %>% | |
mutate(workload='ricc', algo='fcfs') | |
merged = bind_rows(hpc2n_easy, hpc2n_fcfs, ricc_easy, ricc_fcfs) %>% | |
select(workload, algo, scheduling_time, simulation_time) %>% | |
mutate(scheduling_time_proportion= scheduling_time / simulation_time) %>% | |
arrange(workload, algo) | |
print(merged) | |
write_csv(merged, "result/merged_result.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux | |
################################ | |
# Execute simulation instances # | |
################################ | |
time robin --quiet ./instances/hpc2n-fcfs.robin | |
time robin --quiet ./instances/hpc2n-easy.robin | |
time robin --quiet ./instances/ricc-fcfs.robin | |
time robin --quiet ./instances/ricc-easy.robin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment