Skip to content

Commit

Permalink
ensure swap disabled, closes h2oai#80
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Apr 21, 2019
1 parent 37b8328 commit d154d56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ if [[ -f ./stop ]]; then echo "# Benchmark run $BATCH aborted. 'stop' file exist
source ./ch.sh
ch_active && echo "# Benchmark run $BATCH aborted. clickhouse-server is running, shut it down before calling 'run.sh'" && exit;

# confirm swap disabled
Rscript -e 'swap_all<-data.table::fread("free -h | grep Swap", header=FALSE)[, -1L][, as.numeric(gsub("[^0-9\\.]", "", unlist(.SD)))]; swap_off<-!is.na(s<-sum(swap_all)) && s==0; q("no", status=as.numeric(swap_off))' && echo "# Benchmark run $BATCH aborted. swap is enabled, 'free -h' has to report only 0s for Swap, run 'swapoff -a' before calling 'run.sh'" && exit;

# set lock
if [[ -f ./run.lock ]]; then echo "# Benchmark run $BATCH aborted. 'run.lock' file exists, this should be checked before calling 'run.sh'. Ouput redirection mismatch might have happened if writing output to same file as currently running $(cat ./run.lock) benchmark run" && exit; else echo $BATCH > run.lock; fi;

Expand Down

0 comments on commit d154d56

Please sign in to comment.