Re: [dspam-users] dspam slows down the whole system

From: Jonathan Zdziarski <jonathan@nuclearelephant.com>
Date: Sat Jan 21 2006 - 18:58:16 EST

I see you are running SQLite. SQLite is particularly slow, especially
with a database that large (282 M!) First I would consider running
the sqlite purge script along with the vacuum command to shrink them
back down first (your file is 282M!). This is in doc/sqlite.txt and
is probably the source of the problem. If this still doesn't help, I
would consider switching to MySQL - it's the fastest SQL-based driver
supported. You may consider the hash driver, but it mmap's the data
file and with one that big it could get pretty memory intensive (i'm
working on adding support using file i/o with no mmap).

Jonathan

On Jan 21, 2006, at 6:37 PM, Michael Kaufmann wrote:

> Hi,
>
> I've got a huge problem using dspam. It is terribly slow and slows
> down my whole system a lot. It doesn't use much CPU power but IO!
> It needs more than 1000-2000 seconds for a single message since my
> last update to dspam 3.6.3 but a downgrade to 3.6.2 (which I used
> before) also doesn't work. I use it in conjunction with postfix
> 2.2.5 and dovecot 1.0beta1 with linux 2.6.15.1 and reiser4.
>
> If dspam is running then hdparm -t /dev/hda reports about 5 MB/s.
> Without dspam it reports about 50 MB/s.
>
> My mailserver currently only has 5 users and 99% of the traffic
> goes to my user which receives about 100-150 mails per day.
> I guessed that the database files are too large, but I can't really
> imagine:
>
> total 284M
> -rw-rw---- 1 dspam dspam 2.5M Jan 22 02:25 michael.log
> -rw-r----- 1 dspam dspam 282M Jan 22 02:25 michael.sdb
> -rw-rw---- 1 dspam dspam 24 Jan 22 02:25 michael.stats
>
> As far as I have notices it doesn't really make a difference for
> which user dspam filters its messages...so the size cannot be the
> reason (the other users have databases with about 20MB).
>
> I have 1 GB of RAM and 4x1GB Swap on 4 differen HDDs.
>
> What can be the problem for the terrible IO usage? top reports
> 99-100% "wa".
>
> Bye & Thanks,
> Michael
>
> postfix/main.cf:
> "dspam_destination_recipient_limit = 1"
>
> postfix/master.cf
> dspam unix - n n - 1 pipe
> flags=Ru user=dspam argv=/usr/bin/dspam --debug --
> deliver=innocent,spam --user $recipient -i -f $sender -- $recipient
>
> dspam.conf:
> Home /var/spool/dspam
> StorageDriver /usr/lib/libsqlite_drv.so
> TrustedDeliveryAgent "/usr/sbin/sendmail"
> OnFail error
> Trust root
> Trust dspam
> TrainingMode teft
> TestConditionalTraining on
> Feature chained
> Feature tb=5
> Feature whitelist
> Algorithm graham burton
> PValue graham
> Preference "spamAction=quarantine"
> Preference "showFactors=on"
> Preference "spamAction=tag"
> AllowOverride trainingMode
> AllowOverride spamAction spamSubject
> AllowOverride statisticalSedation
> AllowOverride enableBNR
> AllowOverride enableWhitelist
> AllowOverride signatureLocation
> AllowOverride showFactors
> AllowOverride optIn optOut
> AllowOverride whitelistThreshold
> HashRecMax 100000
> HashAutoExtend on
> HashMaxExtents 0
> HashExtentSize 50000
> HashMaxSeek 100
> HashConnectionCache 10
> Notifications off
> PurgeNeutral 90
> LocalMX 127.0.0.1
> SystemLog on
> UserLog on
> Opt out
> ProcessorBias on
>
>
>
Received on Sat Jan 21 19:00:23 2006

This archive was generated by hypermail 2.1.8 : Sun Jan 22 2006 - 00:00:01 EST