Commit 522173d5 authored by aumgn's avatar aumgn
Browse files

[cleanup] Remove exp/mini-volrend

parent afc3a503
#+TITLE: Mini-volrend pinning benchmark
#+AUTHOR: Christopher Ferreira
* Experiment
:PROPERTIES:
:tangle: (concat "/" remote ":bench/mvolrend.sh")
:shebang: #!/bin/bash
:results: silent
:eval: never
:END:
** Usage
This section describes a script which can be run remotely.
This script will run the application with multiple parameters and produce a csv file
'data' containing the results.
#+BEGIN_SRC sh
usage() {
cat <<HD
Usage: $0 <cores> <policy> <threads> <iterations> <repeat>
<cores> list of number of cores
<policy> list of placement policy among { default, spread, pinned }
<threads> list of number of threads
<iterations> list of number of threads
<repeat> the number of time to run the application for each parameter combinations
HD
}
#+END_SRC
** Run
#+BEGIN_SRC sh
run() {
cores="$1"
policy="$2"
threads="$3"
iterations="$4"
repeat="$5"
filebase="$LOGDIR/$cores.$policy.$threads.$iterations"
for i in $(seq 1 $repeat); do
out="$filebase.$i.out"
err="$filebase.$i.err"
echo "$SRCDIR/mvolrend $cores $policy $threads $iterations" >$out
$SRCDIR/mvolrend $cores $policy $threads $iterations >>$out 2>>$err
printf "%d,%s,%d,%d,%s\n" $cores $policy $threads $iterations $(tail -1 $err) >>$DATAFILE
done
}
if [[ $# != 5 ]]; then
usage $0
exit 1
fi
SRCDIR="$HOME/bench/src/mini-volrend"
BASEDIR="$HOME/bench/mini-volrend"
LOGDIR="$BASEDIR/log"
DATAFILE="$BASEDIR/data"
rm -rf $LOGDIR
mkdir $LOGDIR
echo -n '' > $DATAFILE
sudo cat /etc/os-release >> $LOGDIR/system
sudo sysctl -a >> $LOGDIR/system 2>/dev/null
old_autogroup=$(sudo sysctl -n kernel.sched_autogroup_enabled)
old_migration_cost=$(sudo sysctl -n kernel.sched_migration_cost_ns)
sudo sysctl -q kernel.sched_migration_cost_ns=500000
sudo sysctl -q kernel.sched_autogroup_enabled=0
make -C$SRCDIR >$LOGDIR/make 2>&1
repeat=$5
for cores in $1; do
for policy in $2; do
for threads in $3; do
for iterations in $4; do
run $cores $policy $iterations $threads $repeat
done
done
done
done
sudo sysctl -q kernel.sched_migration_cost_ns=$old_migration_cost
sudo sysctl -q kernel.sched_autogroup_enabled=$old_autogroup
echo ''
echo " => Data file $DATAFILE written"
#+END_SRC
* Retrieve data
** Retrieve
#+HEADER: :var remote=(identity remote)
#+BEGIN_SRC sh
scp $remote:~/bench/mini-volrend/data ./data
[ -f ./data ] && echo 'Ok !'
#+END_SRC
#+RESULTS:
: ok !
* Cycles Plot
:PROPERTIES:
:colnames: yes
:session: minivolrend-cycles
:width: 800
:height: 600
:units: px
:END:
** Load libraries
#+BEGIN_SRC R :colnames no :results value verbatim
library('dplyr')
library('tidyr')
library('ggplot2')
library('ggthemes')
library('ggthemr')
flat_theme <- ggthemr('flat', set_theme = FALSE)
'Ok !'
#+END_SRC
#+RESULTS:
: Ok !
** Load data
#+BEGIN_SRC R
data <- read.csv('./data', header = FALSE)
names(data) <- c('Cores', 'Policy', 'Threads', 'Size', 'Cycles')
summary(data)
#+END_SRC
#+RESULTS:
| Cores | Policy | Threads | Size | Cycles |
|------------+------------+------------+---------------+-------------------|
| Min. :64 | default:19 | Min. :64 | Min. : 1000 | Min. :1.554e+09 |
| 1st Qu.:64 | spread :19 | 1st Qu.:64 | 1st Qu.: 3125 | 1st Qu.:5.758e+09 |
| Median :64 | nil | Median :64 | Median : 5500 | Median :9.206e+09 |
| Mean :64 | nil | Mean :64 | Mean : 5500 | Mean :9.288e+09 |
| 3rd Qu.:64 | nil | 3rd Qu.:64 | 3rd Qu.: 7875 | 3rd Qu.:1.272e+10 |
| Max. :64 | nil | Max. :64 | Max. :10000 | Max. :1.654e+10 |
** Process Data
#+BEGIN_SRC R
processed <- data %>%
select(Policy, Size, Cycles) %>%
group_by(Policy, Size) %>%
summarise(
CyclesMean = mean(Cycles / 100000),
CyclesSd = 0#sd(Cycles / 100000)
)
#+END_SRC
#+RESULTS:
| Policy | Size | CyclesMean | CyclesSd |
|---------+-------+--------------+----------|
| default | 1000 | 25685.30668 | 0 |
| default | 1500 | 30627.04361 | 0 |
| default | 2000 | 39943.30782 | 0 |
| default | 2500 | 48041.63686 | 0 |
| default | 3000 | 67411.58454 | 0 |
| default | 3500 | 59154.02262 | 0 |
| default | 4000 | 71082.23426 | 0 |
| default | 4500 | 80477.38867 | 0 |
| default | 5000 | 89751.58075 | 0 |
| default | 5500 | 94369.26848 | 0 |
| default | 6000 | 119222.4915 | 0 |
| default | 6500 | 113615.16234 | 0 |
| default | 7000 | 117116.01628 | 0 |
| default | 7500 | 124599.73915 | 0 |
| default | 8000 | 142570.63506 | 0 |
| default | 8500 | 144073.28981 | 0 |
| default | 9000 | 154863.23641 | 0 |
| default | 9500 | 158322.47428 | 0 |
| default | 10000 | 165420.82007 | 0 |
| spread | 1000 | 15539.64408 | 0 |
| spread | 1500 | 24126.24466 | 0 |
| spread | 2000 | 31615.36301 | 0 |
| spread | 2500 | 40234.70316 | 0 |
| spread | 3000 | 47610.86413 | 0 |
| spread | 3500 | 57054.43455 | 0 |
| spread | 4000 | 64519.15229 | 0 |
| spread | 4500 | 71161.51164 | 0 |
| spread | 5000 | 81887.9691 | 0 |
| spread | 5500 | 87057.85827 | 0 |
| spread | 6000 | 96604.58059 | 0 |
| spread | 6500 | 104183.25773 | 0 |
| spread | 7000 | 114112.07064 | 0 |
| spread | 7500 | 120278.94233 | 0 |
| spread | 8000 | 128000.6926 | 0 |
| spread | 8500 | 136402.62409 | 0 |
| spread | 9000 | 146934.27596 | 0 |
| spread | 9500 | 151672.42884 | 0 |
| spread | 10000 | 163932.05907 | 0 |
** Plot
#+BEGIN_SRC R :results output graphics :file output.png
ggplot(processed
x = Size,
y = CyclesMean
) +
geom_line(aes(
x = Size,
y = CyclesMean,
colour = Policy
)) +
geom_pointrange(aes(
x = Size,
y = CyclesMean,
ymin = CyclesMean - CyclesSd,
ymax = CyclesMean + CyclesSd,
colour = Policy
)) +
flat_theme$theme +
theme(legend.position = "bottom")
#+END_SRC
#+RESULTS:
[[file:output.png]]
* Footer
# Local Variables:
# remote: "mc2"
# End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment