<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hello all,<br><br>thanks for all your answers, but I'm still stuck. Below is the full output for dig for pdns and dnsmasq.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">The query time is 2 ms for the first uncached request and 0 ms for pdns and dnsmasq. However, the</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">whole execution of the dig command takes over 1 second for pdns and below 30 ms for dnsmasq. The<br>same for nslookup.<br><br>For the second request trace just shows: 1 question answered from packet cache from 127.0.0.1<br>But it still takes more than 1 second.<br><br>-
 /etc/pdns-recursor/recursor.conf (default-config from package plus own forward-zone, removed comments)<br>forward-zones=.=8.8.8.8<br>setgid=pdns-recursor<br>setuid=pdns-recursor<br><br>- /etc/dnsmasq.conf (default-config from package, removed comments)<br>bogus-priv<br>cache-size=1500<br>domain-needed<br>no-hosts<br><br>- /etc/hosts<br>127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4<br>::1         localhost localhost.localdomain localhost6 localhost6.localdomain6<br><br>/etc/nsswitch.conf was not modified and there is absolutely no load on the machine.<br>I do not have a LDAP user database, this is just a minimum install of CentOS 6.5.<br><br>Any ideas?<br><br>Thanks,<br>Shamus<br><br><br># /etc/init.d/pdns-recursor start<br>pdns-recursor
 starten:                                     [  OK  ]<br># time dig www.google.com @localhost<br><br>; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 <<>> www.google.com @localhost<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48006<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0<br><br>;; QUESTION SECTION:<br>;www.google.com.                        IN      A<br><br>;; ANSWER SECTION:<br>www.google.com.         174     IN     
 A       173.194.35.176<br>www.google.com.         174     IN      A       173.194.35.180<br>www.google.com.         174     IN      A       173.194.35.177<br>www.google.com.         174     IN      A       173.194.35.179<br>www.google.com.         174     IN      A       173.194.35.178<br><br>;; Query time: 2 msec<br>;; SERVER: 127.0.0.1#53(127.0.0.1)<br>;; WHEN: Tue Jun 25 23:51:28 2013<br>;; MSG SIZE  rcvd: 112<br><br><br>real   
 0m1.026s<br>user    0m0.011s<br>sys     0m0.014s<br># time dig www.google.com @localhost<br><br>; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 <<>> www.google.com @localhost<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3613<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0<br><br>;; QUESTION SECTION:<br>;www.google.com.                        IN      A<br><br>;; ANSWER SECTION:<br>www.google.com.         84      IN      A       173.194.35.176<br>www.google.com.         84     
 IN      A       173.194.35.180<br>www.google.com.         84      IN      A       173.194.35.177<br>www.google.com.         84      IN      A       173.194.35.179<br>www.google.com.         84      IN      A       173.194.35.178<br><br>;; Query time: 0 msec<br>;; SERVER: 127.0.0.1#53(127.0.0.1)<br>;; WHEN: Tue Jun 25 23:52:58 2013<br>;; MSG SIZE  rcvd: 112<br><br><br>real    0m1.024s<br>user    0m0.005s<br>sys     0m0.019s<br># /etc/init.d/pdns-recursor stop<br>pdns-recursor
 beenden:                                     [  OK  ]<br># /etc/init.d/dnsmasq start<br>Starting dnsmasq:                                          [  OK  ]<br># time dig www.google.com @localhost<br><br>; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 <<>> www.google.com @localhost<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6269<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 4<br><br>;; QUESTION
 SECTION:<br>;www.google.com.                        IN      A<br><br>;; ANSWER SECTION:<br>www.google.com.         67      IN      A       173.194.35.178<br>www.google.com.         67      IN      A       173.194.35.179<br>www.google.com.         67      IN      A       173.194.35.180<br>www.google.com.         67      IN      A      
 173.194.35.176<br>www.google.com.         67      IN      A       173.194.35.177<br><br>;; AUTHORITY SECTION:<br>google.com.             54608   IN      NS      ns1.google.com.<br>google.com.             54608   IN      NS      ns3.google.com.<br>google.com.             54608   IN      NS      ns2.google.com.<br>google.com.             54608   IN      NS     
 ns4.google.com.<br><br>;; ADDITIONAL SECTION:<br>ns1.google.com.         54882   IN      A       216.239.32.10<br>ns2.google.com.         54882   IN      A       216.239.34.10<br>ns3.google.com.         54882   IN      A       216.239.36.10<br>ns4.google.com.         54882   IN      A       216.239.38.10<br><br>;; Query time: 2 msec<br>;; SERVER: ::1#53(::1)<br>;; WHEN: Tue Jun 25 23:53:15 2013<br>;; MSG SIZE  rcvd: 248<br><br><br>real    0m0.028s<br>user    0m0.008s<br>sys    
 0m0.019s<br># time dig www.google.com @localhost<br><br>; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 <<>> www.google.com @localhost<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28137<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0<br><br>;; QUESTION SECTION:<br>;www.google.com.                        IN      A<br><br>;; ANSWER SECTION:<br>www.google.com.         65      IN      A       173.194.35.177<br>www.google.com.         65      IN      A      
 173.194.35.176<br>www.google.com.         65      IN      A       173.194.35.180<br>www.google.com.         65      IN      A       173.194.35.179<br>www.google.com.         65      IN      A       173.194.35.178<br><br>;; Query time: 0 msec<br>;; SERVER: ::1#53(::1)<br>;; WHEN: Tue Jun 25 23:53:17 2013<br>;; MSG SIZE  rcvd: 112<br><br><br>real    0m0.022s<br>user    0m0.007s<br>sys     0m0.016s<br><span><br></span></div></div></body></html>