Home > Linux > DNS Cache and Spamassassin performance

DNS Cache and Spamassassin performance

November 9th, 2011 Leave a comment Go to comments

 

DNS cache is very valuable thing when you are running RBL checks via Spamassassin. As many RBL lists, many IPs in header means a lot of queries. Of course, if you receiving 20 mails per day, its not big deal, but when you hit 200k per day, just simple thing can help a lot. With easy scrip tyou can debug how fast is Spamassassin on your system with RBL queries.

Just take some spam mail file an run:

cat spam.eml | spamassassin -D 2>&1  | grep 'async: timing' | sed 's/^.*dbg: async: //'

and you will see results similar to this:

ROUND One – no cache used:

[root@matrix 2010-07-01]# cat msg.1277982404.511581.19239 | spamassassin -D 2>&1  | grep 'async: timing' | sed 's/^.*dbg: async: //'     
        
timing: 0.006 . dns:A:145.152.81.213.dnsbl.sorbs.net. 
timing: 0.119 . dns:A:145.152.81.213.psbl.surriel.com. 
timing: 0.122 . dns:A:145.152.81.213.zen.spamhaus.org. 
timing: 0.124 . dns:TXT:145.152.81.213.127.0.0.1 
timing: 0.124 . dns:TXT:145.152.81.213.bl.spamcop.net. 
timing: 0.124 . dns:TXT:164.194.135.95.bl.spamcop.net. 
timing: 0.126 . NS:woodfree.ru 
timing: 0.126 . DNSBL:dbl.spamhaus.org.:woodfree.ru 
timing: 0.127 . DNSBL:multi.uribl.com.:woodfree.ru 
timing: 0.129 . DNSBL:multi.surbl.org.:woodfree.ru 
timing: 1.334 . dns:TXT:145.152.81.213.sa-accredit.habeas.com. 
timing: 1.335 . dns:TXT:145.152.81.213.sa-trusted.bondedsender.org. 
timing: 1.336 . dns:A:145.152.81.213.bb.barracudacentral.org. 
timing: 1.341 . dns:A:145.152.81.213.bl.score.senderscore.com. 
timing: 1.344 . asnlookup-0-asn.routeviews.org. 
timing: 1.346 . DNSBL:dob.sibl.support-intelligence.net:woodfree.ru

 

ROUND TWO cache is uses as already cached:

[root@matrix 2010-07-01]# cat msg.1277982404.511581.19239 | spamassassin -D 2>&1  | grep 'async: timing' | sed 's/^.*dbg: async: //'
timing: 0.007 . dns:A:145.152.81.213.bb.barracudacentral.org. 
timing: 0.007 . dns:A:145.152.81.213.psbl.surriel.com. 
timing: 0.009 . dns:A:145.152.81.213.bl.score.senderscore.com. 
timing: 0.009 . dns:A:145.152.81.213.dnsbl.sorbs.net. 
timing: 0.010 . dns:A:145.152.81.213.zen.spamhaus.org. 
timing: 0.011 . dns:TXT:145.152.81.213.127.0.0.1 
timing: 0.012 . asnlookup-0-asn.routeviews.org. 
timing: 0.014 . DNSBL:multi.uribl.com.:woodfree.ru 
timing: 0.014 . DNSBL:multi.surbl.org.:woodfree.ru 
timing: 0.015 . NS:woodfree.ru 
timing: 0.015 . DNSBL:dbl.spamhaus.org.:woodfree.ru 
timing: 0.016 . DNSBL:dob.sibl.support-intelligence.net:woodfree.ru 
timing: 1.294 . dns:TXT:145.152.81.213.sa-accredit.habeas.com. 
timing: 1.295 . dns:TXT:145.152.81.213.sa-trusted.bondedsender.org. 
timing: 1.303 . dns:TXT:145.152.81.213.bl.spamcop.net. 
timing: 1.303 . dns:TXT:164.194.135.95.bl.spamcop.net.

 

its clear why to use caching. Now you multiply it by resolv requests in mail, multiply by number of mails and you can get decent numbers 😉

hoep it helps someone

Categories: Linux Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

%d bloggers like this: