[Pdns-users] Pdns and packet cache efficiency

dushyanth.h at directi.com dushyanth.h at directi.com
Fri Feb 22 13:10:53 UTC 2008


Hey all,

I have been stress testing powerdns with pgsql backend - specifically
the efficiency of packet cache. The max qps i get out of it is 7.5K and 
a packetcache hit rate of 75%. It seems that pdns essentially uses a 
single cpu when its cache is filled.

A colleague mentioned that the cache is accessed via a select(2) loop,
which runs a single thread and performance improvement would be possible
by replacing the select() loop with epoll(4).

Is this possible ? Can pdns use all available cpu's to lookup from cache
? It seems to me that using a single CPU is the bottleneck..

TIA
Dushyanth

Test details as below..

System :

Intel Core 2 DUO CPU 6420 @ 2.13GHz
8 GB RAM
kernel : 2.6.9-67.0.1.ELsmp
x86

Network :

Dedicated 100 Mbit with Dedicated PDNS+PgSQL Host and three dedicated
queryperf client hosts

Dataset :

Total RRs 	3149643
Total Zones 	349939

Queryperf Input :

(all have single answers)
Total No. Of Queries 	: 3149643 	

pdns.conf :

wildcards=no
webserver=yes
webserver-address=192.168.0.80

launch=gpgsql
gpgsql-dbname=newmdns
gpgsql-host=localhost
gpgsql-user=mdns
gpgsql-any-query=SELECT data, ttl, mx_priority, type, zone_id, host FROM
dns_records where host='%s'
gpgsql-basic-query=SELECT data, ttl, mx_priority, type, zone_id, host
FROM dns_records where type ='%s' and host ='%s'
gpgsql-id-query=SELECT data, ttl, mx_priority, type, zone_id, host FROM
dns_records WHERE type='%s' AND host='%s' AND zone_id=%d
cache-ttl=864000
query-cache-ttl=0
negquery-cache-ttl=0

Database Structure :

CREATE TABLE dns_records (
      "zone" text,
      host text,
      ttl integer,
      "type" text,
      mx_priority integer,
      data text,
      resp_person text,
      serial integer,
      refresh integer,
      retry integer,
      expire integer,
      minimum integer,
      zone_id integer
);


CREATE INDEX host_index ON dns_records USING btree (host);
CREATE INDEX host_type_index ON dns_records USING btree (host, "type");
CREATE INDEX host_type_zoneid_index ON dns_records USING btree (host,
"type", zone_id);

Results :

* Its rather big and my earlier mail with attachment never got delivered 
:). I would be happy to send it across to personal addresses if someone 
wants to see.



More information about the Pdns-users mailing list