You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/11/21 02:58:25 UTC

[Bug 3983] [review] adopt Apache preforking algorithm

http://bugzilla.spamassassin.org/show_bug.cgi?id=3983

jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|adopt Apache preforking     |[review] adopt Apache
                   |algorithm                   |preforking algorithm
   Target Milestone|3.1.0                       |3.0.2



------- Additional Comments From jm@jmason.org  2004-11-20 17:58 -------
OK, here's some good test results.   I came up with a little test that uses a
variable set of loads (multiple messages in parallel in a burst, followed by
messages one after the other, followed by messages in serial separated by a
"sleep 1".  This is to simulate an environment with variable message loads,
instead of the usual "massive burst" or "strictly serial" test loads we have in
our test suite.  Results are excellent:

new prefork code:

  real    1m50.385s user    0m0.297s sys     0m0.472s
  real    1m52.728s user    0m0.298s sys     0m0.456s
  real    1m48.972s user    0m0.287s sys     0m0.460s

old prefork, using --round-robin switch:

  real    1m48.504s user    0m0.293s sys     0m0.477s 
  real    1m48.844s user    0m0.323s sys     0m0.527s 
  real    1m49.016s user    0m0.317s sys     0m0.519s

: jm 1455...; sh runtest


that's pretty painless -- almost unnoticeable!   I'm checking in the code to
3.1.0, and moving this ticket to 3.0.2 in case we want to apply there.

here's the test scripts, if you want to try it out...

"scr":

#!/bin/sh
  scan_all_bg () {
    for f in t/data/spam/* ; do
      if [ -f $f ] ; then true ; else continue ; fi
      ./spamc/spamc -p 48373 < $f > o &
    done
  }
  scan_all_fg () {
    for f in t/data/spam/* ; do
      if [ -f $f ] ; then true ; else continue ; fi
      ./spamc/spamc -p 48373 < $f > o
    done
  }
  scan_all_sleep_1_sec () {
    for f in t/data/spam/* ; do
      if [ -f $f ] ; then true ; else continue ; fi
      ./spamc/spamc -p 48373 < $f > o
      sleep 1
    done
  }
  scan_all_bg
  scan_all_sleep_1_sec
  scan_all_bg
  scan_all_bg
  scan_all_bg
  scan_all_bg
  scan_all_bg
  scan_all_fg
  scan_all_sleep_1_sec
  scan_all_bg
  scan_all_bg
  scan_all_bg
  scan_all_fg
  scan_all_bg
  scan_all_bg
  scan_all_fg
  scan_all_sleep_1_sec
  wait 


"runtest":

#!/bin/sh

  perl -T -Ilib ./spamd/spamd.raw \
                -x -s stderr -p 48373 -L -m5 > log1 2>&1 &
  sdpid=$!
  sleep 5
  time sh scr
  time sh scr
  time sh scr
  kill -15 $sdpid ; sleep 1

  perl -T -Ilib ./spamd/spamd.raw --round-robin \
                -x -s stderr -p 48373 -L -m5 > log1 2>&1 &
  sdpid=$!
  sleep 5
  time sh scr
  time sh scr
  time sh scr
  kill -15 $sdpid ; sleep 1


checked in as r106054.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.