[Pdns-users] PowerDNS cannot handle the load?

Mike Benoit mikeb at netnation.com
Wed Apr 23 17:23:03 UTC 2003


On Wed, 2003-04-23 at 04:44, Stephane Bortzmeyer wrote:
>  Something is definately wrong if you can only do ~200queries/sec with
> > this hardware. If I recall correctly, Bert was seeing in excess of
> > 10,000 queries/sec with a TDB backend on similar hardware. 
> ...
> > Unfortunately PostgreSQL comes configured out of the box for
> > portability/stability in mind, therefore it requires quite a bit of
> > tuning to get the performance up to par. 
> 
> I tried with only the BIND backend, to avoid any PostgreSQL
> issues. After starting up PowerDNS, I perform several tests with the
> same request file:
> 
>   Queries per second:   138.338800 qps
>   Queries per second:   172.432285 qps
>   Queries per second:   847.873270 qps
>   Queries per second:   2054.151543 qps
>   Queries per second:   2091.337055 qps
> 
> So, when the cache fills up, things are better. It seems that
> transferring from the backend to the cache is very slow but, once it
> is in the cache, it is better.
> 
> Still, it is not something reasonable to me. 
> 
> nsd and BIND9 are very consistent: the performance is the same from
> one run to the other.

Consistent, but how long do they take to startup? BIND takes so long to
startup because it basically pre-caches all the zones (before it starts
serving any even?). PDNS approaches this a different way, and simply
starts serving answers immediately after starting. Yes, it may be slower
at first, until the zones are cached, but thats the trade-off. PDNS is
also much more memory efficient, in more ways the one. PDNS won't cache
zones that are never queried. 

I don't think your comparing apples to apples here. Try timing a script
that does this:

start bind
run test 1
run test 1
run test 1
stop bind

Might want to reboot before each run. Now try PDNS

start pdns
run test1
run test1
run test1
stop pdns

Even this isn't really fair, since BIND can load all the zones with
little overhead, but to get PDNS to the same state (all zones in cache)
you have to query every zone, thus including the overhead of sending DNS
queries to it.

Perhaps Bert would be interested in creating functionality to auto-cache
zones? ie: "pdns_control cache_all_zones" or "pdns_control cache
<domain>". I don't see this as being that useful though. 

I think you will find in the "real world" it isn't that big of a deal.
Since DNS servers usually aren't restarted often, once PDNS's cache is
full, queries will be fast. If your nameserver is busy, this shouldn't
take more then a few minutes. Or you could even force PDNS to populate
the cache yourself by running your tests. 

> 
> Here is "top" output when queryperf runs:
> 
> top - 13:43:41 up 41 min,  2 users,  load average: 15.22, 9.36, 5.65
> Tasks:  90 total,  18 running,  72 sleeping,   0 stopped,   0 zombie
> Cpu(s):  91.4% user,   8.6% system,   0.0% nice,   0.0% idle
> Mem:    904948k total,   398812k used,   506136k free,    37712k buffers
> Swap:   979956k total,        0k used,   979956k free,   253492k cached
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  Command           
>   959 root      20   0 58404  57m 1588 R 29.2  6.5   1:50.91 pdns_server       
>   960 root      20   0 58404  57m 1588 R 28.5  6.5   1:47.37 pdns_server       
>   958 root      17   0 58404  57m 1588 R 28.2  6.5   1:06.91 pdns_server       
>   953 root      15   0 58404  57m 1588 R 27.9  6.5   1:54.51 pdns_server       
>   963 root      19   0 58404  57m 1588 R 27.5  6.5   1:48.55 pdns_server       
>   964 root      20   0 58404  57m 1588 R 27.5  6.5   1:13.82 pdns_server       
>   948 root      17   0 58404  57m 1588 R 27.2  6.5   1:52.94 pdns_server       
>   951 root      16   0 58404  57m 1588 R 26.9  6.5   1:51.23 pdns_server       
>   962 root      20   0 58404  57m 1588 R 25.6  6.5   1:05.66 pdns_server       
>   952 root      15   0 58404  57m 1588 R 25.2  6.5   1:12.25 pdns_server       
>   961 root      16   0 58404  57m 1588 R 24.9  6.5   1:50.97 pdns_server       
>   965 root      14   0 58404  57m 1588 R 24.9  6.5   1:38.58 pdns_server       
>   966 root      14   0 58404  57m 1588 R 23.9  6.5   1:26.38 pdns_server       
>   967 root      14   0 58404  57m 1588 R 18.4  6.5   1:36.65 pdns_server       
>   369 ntop      11   0  7928 6080 1372 S  4.6  0.7   1:13.14 ntop              
> 
-- 
Best Regards,
 
Mike Benoit
NetNation Communications Inc.
Systems Engineer
Tel: 604-684-6892 or 888-983-6600
 ---------------------------------------
 
 Disclaimer: Opinions expressed here are my own and not 
 necessarily those of my employer



More information about the Pdns-users mailing list