I've recently (about a week ago) replaced our amavisd-new
spam scanning
setup with Maia 1.0.2. It's working great, even under heavy
load for the
most part. Scanning is keeping up easily. All-in-all, this
is a terrific
system and will give our users a much-needed interface to
amavisd.
The only performance problem I'm seeing is that after a run
of
process-quarantine.pl or of expire-quarantine-cache.pl, it
looks like
the script is finishing up by recalculating the stats for
EVERY user on
the system. This is taking a very long time (upwards of 4
hours). Our
system has about 130K users configured and Maia has
auto-created about
60K users so far. My question is this. What would be the
adverse side
affects of just commenting out the recalc-stats sections of
code in
those scripts? Or, is there a way I can speed up the
updates?
Here is the SQL that is executing over and over and is
sometimes a bit
slow (up to 15 secs each to run) (Runs 60K times at the end
of each of
the mentioned scripts)
# Query_time: 21 Lock_time: 0 Rows_sent: 1 Rows_examined:
1423
SELECT MIN(received_date) AS mindate, MAX(received_date) AS
maxdate,
MIN(score) AS minscore, MAX(score) AS maxscore, SUM(score)
AS
totalscore, MIN(size) AS minsize, MAX(size) AS maxsize,
SUM(size) AS
totalsize, COUNT(id) AS items FROM maia_mail,
maia_mail_recipients WHERE
maia_mail.id = maia_mail_recipients.mail_id AND
maia_mail_recipients.type = 'S' AND
maia_mail_recipients.recipient_id =
'7087';
I notice that there aren't indexes on the maia_mail.size and
score
fields. Do you think adding indexes for those fields would
help?
mysql> describe maia_mail;
+---------------+------------------+------+-----+---------+-
---------------+
| Field | Type | Null | Key | Default |
Extra |
+---------------+------------------+------+-----+---------+-
---------------+
| id | int(10) unsigned | NO | PRI | NULL |
auto_increment |
| received_date | datetime | NO | MUL |
| |
| size | int(10) unsigned | NO | |
| |
| sender_email | varchar(255) | NO | |
| |
| envelope_to | text | NO | |
| |
| subject | varchar(255) | NO | |
| |
| contents | longtext | NO | |
| |
| score | float | YES | | NULL
| |
+---------------+------------------+------+-----+---------+-
---------------+
8 rows in set (0.13 sec)
Thanks for your time and for this great product.
--
Brian C. Burkhart - Sr. Systems Engineer - OneNet
Oklahoma State Regents for Higher Education
brian OneNet.net - Ph: 405-225-9444 - Fax: 405-225-9250
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|