Slow Performance on Linux

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Slow Performance on Linux

Evan Thomas-2
Here are the the benchmarks results from my machines using Francesco
Potorti's benchmark and the lsode example from the manual.

Sun SPARC Station 2:
test #1          0.74125 +/- 2.7% (10 runs)
test #2          3.99875 +/- 0.5% (10 runs)
test #3           8.8825 +/- 4.0% (10 runs)

Linux/Pentium 133:
test #1         0.161429 +/- 4.7% (10 runs)
test #2         0.844286 +/- 1.9% (10 runs)
test #3             1.69 +/- 0.0% (10 runs)

About what everyone expects.

However that still leaves me with my orginal problem which is why *my*
ODEs are so slow.
  - does anyone else experience the same problem with the original
equations on linux?
  - could it be a performance bug in a linux library?
  - could it be a performance bug in #ifdef'ed octave code?
  - what libraries is octave linked against?
  - if other people don't have the orginal problem, what version of the        
    libraries are they using?
  - have I done something wrong (my orginal theory)?

As it stands solving the systems I want to solve on the pentium is not a
practicle proposition. I suppose I could try to profile octave myself...

Thanks for the interest shown so far in my problem,
Evan.
--
Evan Thomas
Department of Anatomy & Cell Biology
University of Melbourne
Parkville, 3052
ph: 9344-5849  fax: 9344-5818

Reply | Threaded
Open this post in threaded view
|

Benchmark for 486DX/Linux was: Slow Performance on Linux

Jarle Brinchmann
Hi,

Here is the results from running Francesco Potorti's benchmark on my
486DX4-100 Linux-portable with 16MB memory.

test #1          0.64300 +/- 1.0% (10 runs)
test #2           3.2060 +/- 0.4% (10 runs)
test #3           5.8070 +/- 0.1% (10 runs)

Which gives the following ration as far as it's possible to compare
these values - they look fairly reasonable though.

486-Linux/Alpha-2100  = 7.0, 7.1, 4.1  (Francesco's)
486-Linux/Pentium-133 = 4.0, 3.8, 3.4  \
486-Linux/Sparc-2     = 0.9  0.8  0.7  - Evan Thomas

                                                Jarle


Reply | Threaded
Open this post in threaded view
|

Benchmark for 486DX/Linux was: Slow Performance on Linux

Francesco Potorti`-9
This is a new version of the benchmark for octave.  Improvements:

- This version of the benchmark introduces a version number (so one
  knows if figures obtained are comparable).
- It writes the results using a Sun Sparc 2 as reference (it is the
  slowest machine it has been run on until now).
- It should be possible to tun it also on machines where cputime()
  does not work.  A warning is printed at the beginning saying that
  the results can only be accurate if no other process is running at
  the time.
- I renamed it benchmark.m.

The original problem which this thread originated from is still
unresolved: why on th earth a particular lsode problem proposed by
Evan Thomas <[hidden email]> is much slower than
the other operations on Linux?

----------------- benchmark.m ---------------------
bm_version = 0.01;

# This is a first attempt at a simple benchmark for octave.
# Francesco Potorti` <[hidden email]>
# Fri Mar 22 16:37:46 MET 1996

printf ("Octave benchmark version %g\n", bm_version);

clear bm_st bm_et
if (cputime() == 0)
  # Use these function if cputime() does not work on this particular
  # port of octave.  In this case, time will be computed on a wall
  # clock, and will make sense only on a machine where no other
  # processes are consuming significant cpu time while the benchmark
  # is running.
  disp ...
    ("WARNING: if other processes are running the figures will be inaccurate");
  function t = bm_st ()
    t  = clock();
  endfunction
  function et = bm_et (t);
    et = etime(clock(),t);
  endfunction
else
  function t = bm_st ()
    t = cputime();
  endfunction
  function et = bm_et (t)
    et = cputime() - t;
  endfunction
endif
 
# Used for the lsode test.  
clear xdot
function xdot = xdot (x, t)
  r = 0.25; k = 1.4; a = 1.5; b = 0.16; c = 0.9; d = 0.8;
  xdot(1) = r*x(1)*(1 - x(1)/k) - a*x(1)*x(2)/(1 + b*x(1));
  xdot(2) = c*a*x(1)*x(2)/(1 + b*x(1)) - d*x(2);
endfunction

#
# Do benchmark
#
nf = 3; # Number of tests
sparc2 = [0.74, 4.0, 8.9]; # Sun Sparc 2 is the reference

clear bm_time
function bm_time = test(f) # Actual test functions
  global s0, t;
  start = bm_st();
  if (f == 1)  inv(hadamard(7));
  elseif(f==2) inv(hadamard(8));
  elseif(f==3) lsode("xdot",[1;2],(t=linspace(0,50,200)'));
  endif
  bm_time = bm_et(start);
endfunction

targetaccuracy = 0.025;
minrepetitions = 10;
maxrepetitions = 10000;
maxseconds = 60;

printf ("Speed of octave %s on %s relative to a Sun Sparc 2\n", ...
        version(), computer());
for f = 1:nf
  res = [];
  test(f);  # run a first test to increase the RSS, load things and so on
  tic();
  for rep = 1:maxrepetitions
    res(rep) = sparc2(f) / test(f);
    if (rep < minrepetitions)
      continue
    endif
    # purged results: remove min and max elements
    pres = res((res != max(res)) & (res != min(res)));
    if (std(pres)/mean(pres) < targetaccuracy || toc() > maxseconds)
      break
    endif
  endfor
  # print 95% confidence interval
  printf("test #%d\t\t%4.2f +/- %.1f%% (%d runs)\n", ...
          f, mean(pres), 200*std(pres)/mean(pres), rep);
endfor