A small set of scripts to see parallel execution of processes
$ sudo apt install pi time
$ ./bin/pipipi.sh 16 | tee measure.dat
The pipipi.sh
runs pipi.sh
with different parallelism up to specified with the command line argument (16 for this example). The script pipi.sh
runs sequences of pi
commands in parallel.
$ gnuplot
reset
set xlabel "Numbe of parallel processes"
set ylabel "Elapsed time for same amount of work (sec)"
set style data linespoints
set xrange [0:*]
set yrange [0:*]
plot "measure.dat"
Aptfile
lists vim.tiny
to be installed so that the scripts can be edited on the fly on one-off dynos if needed.
$ heroku create
$ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-apt
$ git push heroku master
$ heroku run ./bin/pipipi.sh 16 2>&1 | tee measure.dat
$ sed -i 's/^Running/# Running/' measure.dat
To test different dyno sizes, the app needs to use professional dynos:
$ heroku ps:type worker=standard-1x
$ heroku run --size=standard-2x ./bin/pipipi.sh 16 2>&1 | tee standard-2x.dat
$ sed -i 's/^\([^0-9#]\)/#\1/' standard-2x.dat