On Fri, 2011-03-18 at 01:43 +0400, Hamad Ali wrote:
> > [...]  Does your caching DNS act as a forwarder?
> > 
> > Don't do that. Run a local, caching, non-forwarding DNS server. And make
> > sure this server (most likely 127.0.0.1) is the first nameserver entry
> > in your /etc/resolv.conf.
> 
> Yeah, I was forwarding to my ISP's and Google's DNS servers, but never
> tried turning off forwarding. These are the worst results I got from
> multiple runs against an email that used to take a lot of time:
> 
> # forwarding t o my ISP's DNS server
> time cat 00005.mail | spamc -c 
> real 0m10.047s

> # forwarding to google's DNS servers
> time cat 0000 5.mail | spamc -c 
> real 0m12.062s

Did you clear your local (forwarding) DNS's cache between these runs?
Hmm, or maybe both are essentially suffering from the same major
non-services.


> # no forwarders
> time cat 00005.mail | spamc -c 
> real 0m5.717s

Seems reasonable. (And keep in mind, unless you're severely RAM or CPU
constrained, multiple messages can be scanned simultaneously. An
additional second or two waiting for DNS queries is just idle waiting.)

> I can understand why Google's DNS takes up to 12 seconds (located
> geographically far away), but surprised to see that my ISP's server is
> worst than not using forwarders (I was expecting to take advantage of
> a nearby cache). Probably I am rate-limited by my ISP's DNS.

ISP's DNS servers tend to be blocked by some of the major DNSBLs, due to
excessive usage. It is always advisable to run a local resolver (aka
non-caching) for best results.

I take it you no longer want to disable network test? ;)


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

Reply via email to