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 2008/05/08 00:26:39 UTC

[Bug 5903] New: Possible scheduling algorithm flaw

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5903

           Summary: Possible scheduling algorithm flaw
           Product: Spamassassin
           Version: 3.2.4
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: cblaise@esoft.com


On my 3.2.4 system, spamd happened to start at near the PID # high threshold on
a Linux 2.4 system:

mail     31857  0.0  2.6 35140 27488 ?       S    10:17   0:11 spamd child
mail     31858  0.0  2.1 34180 22528 ?       S    10:17   0:01 spamd child
mail     31859  0.0  1.6 33196 16508 ?       S    10:17   0:00 spamd child
mail     31860  0.0  1.5 33204 16228 ?       S    10:17   0:00 spamd child
mail     31861  0.0  1.5 33212 16332 ?       S    10:17   0:00 spamd child
mail     31862  0.0  1.6 33220 16420 ?       S    10:17   0:00 spamd child
mail     31863  0.0  1.5 33228 16120 ?       S    10:17   0:00 spamd child
root     31768  0.0  1.6 33228 17368 ?       S    10:17   0:08 /usr/bin/perl -T
-w /usr/bin/spamd -d -x --max-conn-per-child=20 --socketpath=/dev/spamd
--socketgroup=mail -m8 --min-spare=8 -u mail -D

As a result, after the first child hit its limit, a new one was spawned...after
the PID set had turned over.  As a result of the use of the
compute_lowest_child_pid() method in SpamdForkScaling.pm, the lowest child pid
is always the newest child at least until we reach the max PID count again.

In my case, none of the originally spawned pids are being used.  Instead, the
newest is being used such as:

mail      2478  1.2  4.2 49752 43212 ?       S    15:39   0:13 spamd child

Then:

mail      6308  0.6  2.6 34608 27132 ?       S    16:10   0:01 spamd child

I think the correct algorithm should be to use the oldest aged child and not
the lowest pid #.


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 5903] Possible scheduling algorithm flaw

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5903


Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




--- Comment #1 from Justin Mason <jm...@jmason.org>  2008-05-08 01:51:53 PST ---
no, this is working as designed.  The idea is simply that one of the kids is
used more heavily than others, so that it remains swapped in, in-cache, etc.
while the others can be swapped out.  There's no need for that kid to
specifically be the first one started.


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.