DNS Query time always 0 msec
-
Who complains about that?! This guy...
I've been trying to figure out how my unbound DNS server is doing in terms of query timing. I have been noticing some delay when loading up non-cached sites. I know it's normal for it to take longer, but call me crazy, I like test results rather than "it seems slow" or "it seems ok".
I tried namebench and DNSbench but I think there is too much going on across my LAN for reliable results. Every time I try DNSbench it tells me (paraphrasing) there are more than 20% failing servers and it's likely due to traffic on my LAN, therefore the results are invalid.I then tried the DNS lookup under diagnostics, but no matter what I lookup the Query time is 0 msec. I even tried a bunch of random sites I knew (or thought) wouldn't be cached and it still came up as 0 msec. I know my server is not that good. What's going on? And how can I get a reliable benchmark of DNS queries on a live office LAN?
Thanks,
Raffi -
I forward to external DNS (MS AD) and my times bounce between 14-38ms. This might be a gui glitch when using the resolver locally.
-
Thanks @KOM , that's good to know. Those numbers sound like very good times for a query. That gives me an idea of what a decent setup should be getting me in the ballpark of. I remember at some point doing the DNS lookup and getting varying numbers as one would expect. That was a long time and many updates ago, so a GUI glitch sounds about right. Is there a command line equivalent of the DNS lookup?
-
Use dig. Unlike nslookup, dig returns a query time.
-
Thanks @KOM I Googled dig since I never heard of it and it took me to Google's dig tool on the web. It didn't give me response time. After more searching dig also appears to be a linux command line replacement for nslookup. I didn't try running that from shell, but while I was searching I saw suggestions for wireshark. Wireshark definitely helped. I was able filter for DNS, run a bunch of lookups and then do an analysis for response time which gave me min, max and average.
Hopefully, that helps someone else.
Raffi
-
Yes, dig is a command-line tool. There is a dig for Windows IIRC but I use Linux. Wireshark is a packet capture and analysis tool. A little overkill for what you're using it for, but whatever works for you.
-
haha overkill indeed. I had wireshark installed already so I played around with it to get what I wanted. I do like the average it provides. It allowed me to do a bunch of lookups and have all the numbers crunched for me.
-
It turned out that my DNS queries were actually slow and not just appearing to be slow. They were on average around 400ms. In human perceivable time that's nothing, but it should be closer to 40ms like yours @KOM. So that's 10 times worse than normal which explains why pages were loading up slowly. It wasn't just DNS queries though, it turned out everything was slow because my cable modem was creating huge latency in all traffic. After rebooting the modem, all was back to normal. But before that, I was going crazy trying to figure out what I was doing wrong in pfsense. I'm glad the modem has multiple WAN connections because that allowed me to rule out pfsense without having to disconnect anything.
-
Thanks for the update. Good to see the Universal Windows Fix also applies to other stuff, too