A quick and easy performance improvement

Richard Lynch rich at mail.wvnet.edu
Wed Jul 26 15:45:19 IST 2006


Mike Kercher wrote:
> I don't suppose this would have any effect if you are using MySQL for
> bayes, right?
>
> Mike
>   
True, changing the location of bayes in the spam.asssassin.prefs.conf 
file won't help.  However, putting the MySQL DB files closer to the mail 
queues will help.  Ultimately, it all comes down to disk I/O and 
minimizing the time it takes to seek from one disk location to another 
will result in benefits in IOWait time.

BTW... I'm running on RHEL V3.  I have the sysstat package installed 
which provides the sar command.  Using sar I can see various performance 
statistics one of which is IOWait.

Richard Lynch
Morgantown, WVa


>  
>
>   
>> -----Original Message-----
>> From: mailscanner-bounces at lists.mailscanner.info 
>> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf 
>> Of Richard Lynch
>> Sent: Wednesday, July 26, 2006 8:31 AM
>> To: MailScanner discussion
>> Subject: A quick and easy performance improvement
>>
>>
>> I thought I'd post to the list about a change I made 
>> yesterday which provided a huge boost in system's performance.
>>
>> By far the largest amount of time spent in the life of a disk 
>> I/O operation is seek time.  Seek time is the amount of time 
>> it takes to move the disk R/W heads from one cylinder to 
>> another.  The /var/spool filesystem is where the inbound and 
>> outbound mail queues are located.  
>> Note also that the Bayes database is accessed heavily when 
>> analyzing a message.
>>
>> Like many installations we have our root filesystem (/) and 
>> /var filesystem on separate partitions on a single hard 
>> drive.  The default location for the SpamAssassin bayes 
>> database is in /root/.spamassassin/ 
>> which is on the rootfs.   Moving the bayes database to 
>> /var/spool/spamassassin resulted in a huge decrease in IOWait 
>> time.  In our case it was an order of magnitude reduction.  
>> For example,  IOWait percentages went from 30% to 3%.  IOWait 
>> is the percentage of time the processor is waiting on an I/O 
>> operation to complete.  Our mail queues no longer get behind 
>> and throughput is outstanding! 
>>
>> Making the change is trivial (from root)....
>>
>> 1. Shutdown MS
>> 2. mkdir /var/spool/spamassassin
>> 3. mv .spamassassin/bayes* /var/spool/spamassassin/ 4. Edit 
>> /etc/MailScanner/spam.assassin.prefs.conf and uncomment the
>>     lines which define where the bayes DB is located.  Thanks 
>> Julian!  
>> The lines
>>     are...
>>
>>     auto_whitelist_path        /var/spool/spamassassin/auto-whitelist
>>     auto_whitelist_file_mode   0600
>>     bayes_path                 /var/spool/spamassassin/bayes
>>     bayes_file_mode            0600
>>
>> 5. Start MS
>>
>>
>> Just wanted to let others know and perhaps benefit from our 
>> experiences.
>>
>> Richard Lynch
>> Morgantown
>>
>> -- 
>>
>>
>>
>>     


-- 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rich.vcf
Type: text/x-vcard
Size: 299 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20060726/c9fa34ec/rich.vcf


More information about the MailScanner mailing list