make, bmake and gmake
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Tue Oct 27 09:18:09 PDT 2009
Saifi Khan wrote:
Would you like to suggest a link, from where i can download the script ?
Sorry, the whole thing was quite messy and I didn't find the time yet to change it.
Maybe you can make sense of these:
to do the runs and get the data:
for nice in 0; do for run in $(seq 1 5); do for j in $(seq 1 10); do echo "building with nice=$nice, j=$j, run=$run" >> timelog; /usr/bin/time -a -p -o timelog nice -n $nice make buildworld buildkernel -j $j >/dev/null 2>&1; [ $? -ne 0 ] && echo "fail" >> timelog; done; done; done
ruby -ne 'BEGIN{$a=Hash.new{|h,k|h[k]=Hash.new{|h,k|h[k]=[]}}};if $_ =~ /nice=(\d+).*j=(\d+).*run=(\d+)/; $nice,$j=$1.to_i,$2.to_i; end; next if $nice != 0; if /^(real|user|sys)[[:space:]]+([\d.]+)/; $a[$j][$1] << $2.to_f; end;END{print "# ";$a[$a.keys[0]].keys.sort.each{|t| print "\t#{t[0...3]} min\t#{t[0...3]} max\t#{t[0...3]} med"};puts;$a.keys.sort.each{|j| h=$a[j]; print "#{j}"; h.keys.sort.each{|t| a=h[t].sort; print "\t#{a[0]}\t#{a[-1]}\t#{a[a.length/2]}"}; puts}}' < timelog |tee ~/tmp/m
ake-j-runtimes
the gnuplot script for generating the graph is attached. you use it by running gnuplot and then:
set terminal png
set output 'make-j-runtimes.png'
load 'make-j-runtimes.plt'
quit
I think you'll want to change the $(seq 1 10) to $(seq 1 5) if you're testing this on a 2-way machine, and to $(seq 1 3) on an UP machine.
Let me know if you have any questions.
cheers
simon
#!/usr/pkg/bin/gnuplot -persist
#
#
# G N U P L O T
# Version 4.2 patchlevel 5
# last modified Mar 2009
# System: DragonFly 2.5.0-DEVELOPMENT
#
# Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009
# Thomas Williams, Colin Kelley and many others
#
# Type `help` to access the on-line reference manual.
# The gnuplot FAQ is available from http://www.gnuplot.info/faq/
#
# Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>
#
# set terminal x11
# set output
unset clip points
set clip one
unset clip two
set bar 1.000000
set border 31 front linetype -1 linewidth 1.000
set xdata
set ydata
set zdata
set x2data
set y2data
set timefmt x "%d/%m/%y,%H:%M"
set timefmt y "%d/%m/%y,%H:%M"
set timefmt z "%d/%m/%y,%H:%M"
set timefmt x2 "%d/%m/%y,%H:%M"
set timefmt y2 "%d/%m/%y,%H:%M"
set timefmt cb "%d/%m/%y,%H:%M"
set boxwidth
set style fill empty border
set style rectangle back fc lt -3 fillstyle solid 1.00 border -1
set dummy x,y
set format x "% g"
set format y "% g"
set format x2 "% g"
set format y2 "% g"
set format z "% g"
set format cb "% g"
set angles radians
unset grid
set key title ""
set key inside right top vertical Right noreverse enhanced autotitles nobox
set key noinvert samplen 4 spacing 1 width 0 height 0
unset label
unset arrow
set style increment default
unset style line
unset style arrow
set style histogram clustered gap 2 title offset character 0, 0, 0
unset logscale
set offsets 0, 0, 0, 0
set pointsize 1
set encoding default
unset polar
unset parametric
unset decimalsign
set view 60, 30, 1, 1
set view
set samples 100, 100
set isosamples 10, 10
set surface
unset contour
set clabel '%8.3g'
set mapping cartesian
set datafile separator whitespace
unset hidden3d
set cntrparam order 4
set cntrparam linear
set cntrparam levels auto 5
set cntrparam points 5
set size ratio 0 1,1
set origin 0,0
set style data points
set style function lines
set xzeroaxis linetype -2 linewidth 1.000
set yzeroaxis linetype -2 linewidth 1.000
set zzeroaxis linetype -2 linewidth 1.000
set x2zeroaxis linetype -2 linewidth 1.000
set y2zeroaxis linetype -2 linewidth 1.000
set ticslevel 0.5
set mxtics default
set mytics default
set mztics default
set mx2tics default
set my2tics default
set mcbtics default
set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set xtics autofreq norangelimit
set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set ytics autofreq norangelimit
set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0
set ztics autofreq norangelimit
set nox2tics
set noy2tics
set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set cbtics autofreq norangelimit
set title "buildworld + buildkernel duration over make -j level\n(Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz\navail memory = 2063409152 (2015048K bytes))"
set title offset character 0, 0, 0 font "" norotate
set timestamp bottom
set timestamp ""
set timestamp offset character 0, 0, 0 font "" norotate
set rrange [ * : * ] noreverse nowriteback # (currently [0.00000:10.0000] )
set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set urange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set vrange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set xlabel "make -j level"
set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
set x2label ""
set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate
set xrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set x2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set ylabel "duration [s]"
set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set y2label ""
set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set yrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set y2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set zlabel ""
set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set cblabel ""
set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set cbrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set zero 1e-08
set lmargin -1
set bmargin -1
set rmargin -1
set tmargin -1
set locale "C"
set pm3d explicit at s
set pm3d scansautomatic
set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
set palette rgbformulae 7, 5, 15
set colorbox default
set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
set loadpath
set fontpath
set fit noerrorvariables
GNUTERM = "x11"
plot './make-j-runtimes' using 1:4:2:3 with errorlines title "real", './make-j-runtimes' using 1:7:5:6 with errorlines title "sys", './make-j-runtimes' using 1:10:8:9 with errorlines title "user"
# EOF
More information about the Users
mailing list