Performance measurements

From CompBio
Jump to: navigation, search

Contents

Metric 1

Time needed to run savage.c:

#include <stdio.h>
#include <math.h>

long i;
double a;

int main()
{
  while(i<10000000)
  {
    if (0 == i%1000000) {printf ("."); fflush(stdout);}
    a = tan(atan(exp(log(sqrt(a*a)))))+1.0;
    i++;
  }
  printf("result = %f\n", a);
}

Compile command:

gcc -lm -O3 -o savage savage.c

Results

2004-08-04, mikeg. Ran it on a few systems, four times each. Averaged results so far:

System CPU Time Time/#CPU
cosmos 4 x 1.6GHz Opteron (842) 4.72 1.18
eternity2 x 1.4GHz Opteron (240) 4.77 2.38
sp2 2 x 1.4GHz Opteron (240) 5.42 2.71
karma 1 x 1.0GHz Pentium 3 8.73 8.73

More

If you compared performance of systems @ compbio using other well-defined metrics, send data to mikeg -- even if you have some observations about significant performance differences that you'd like to share.

Metric 2

To run mcgen_semfold_ss on a short sequence with 100,000 iterations. To do this with some statistical significance, a script was written to automate the repetition and timing of runs:

bench32.sh
#!/bin/bash

host=`uname -n`
for concurrency in 2 4;
do
  out=$host.32.$concurrency.out
  cat /proc/cpuinfo | grep -e ^model\ name -e MHz >$out

  echo "running with concurrency $concurrency"

  /usr/bin/time ./bench32.sh $concurrency >>$out
done
bench32-all.sh
#!/bin/bash

function doit {
  seed=12345
  iterations=100000
  echo "Running mcgen_semfold_ss with seed $seed and $iterations iterations"
  bin32/mcgen_semfold_ss target.sequence data/astral_159_e4_allatoms_xray_scores target.predict.dssp fragment_db /dev/null 10 $iterations $seed &> /dev/null
}

concurrency=$1

echo $0 "Starting"
for i in `seq 1 $concurrency`;
do
  doit &
done

echo "Started"
jobs -l

echo "Waiting for completion"
wait

echo "Done"

The bench32-all.sh script was run in a directory that includes all the necessary (aforementioned) data files.

Results

System CPU Concurrency Run1 Run2
nirvana 4 x 2.2GHz Opteron (275) (dual core) 2 18:13 17:35
nirvana 4 x 2.2GHz Opteron (275) (dual core) 4 17:33 17:32
cosmos 4 x 1.6GHz Opteron (842) (single core) 2 24:57 24:34
cosmos 4 x 1.6GHz Opteron (842) (single core) 4 24:20 24:20
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox