LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-04-2016, 06:34 AM   #1
Tarikc
Member
 
Registered: May 2009
Distribution: CentOS, RedHat, Ubuntu
Posts: 68

Rep: Reputation: 4
DNS Query time is very high


Hello,

I have this weird behavior on my recursive DNS Server, and I need some explanation if possible.

Querying Google DNS gives a time of 2 msec, while querying my DNS gives a time of 4K.

Code:
$ dig gulfup.com

; <<>> DiG 9.8.3-P1 <<>> gulfup.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 48826
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;gulfup.com.			IN	A

;; Query time: 2 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Jul  4 14:29:34 2016
;; MSG SIZE  rcvd: 28

$ dig gulfup.com @127.0.0.1

; <<>> DiG 9.8.3-P1 <<>> gulfup.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 13723
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;gulfup.com.			IN	A

;; Query time: 4532 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Jul  4 14:29:44 2016
;; MSG SIZE  rcvd: 28
I need any kind of assistance please, what parameters should be added to named to have it answering much faster?

Looking forward to your reply.

All the best,
 
Old 07-04-2016, 06:53 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,597

Rep: Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690
Make sure that your DNS server is caching.

Any time you make a new query that is not in your local tables, your DNS server will check cache. If the address is there, it will respond quickly. If not, it must query a forward server. If each level takes 2 MS, then at least 4 should be expected. (Actually, that is really VERY fast!) If it is caching, then you should see the SECOND request for the same address come back much faster than any external query.

That said, I have never seen results like yours (2 vs 4xxx ms) under any circumstances. But then, testing directly ON the server has never been something I would consider.
I suggest that you run the same tests on a client machine set to use your DNS server for name resolution. Remember to do TWO tests resolving the same (new) FQDN so you can compare the initial and subsequent (cached) times. THOSE will be your client resolution times that you should expect.
 
Old 07-04-2016, 06:57 AM   #3
Tarikc
Member
 
Registered: May 2009
Distribution: CentOS, RedHat, Ubuntu
Posts: 68

Original Poster
Rep: Reputation: 4
Thank you for your fast reply, but the thing is that the domain I'm digging have issues with it's NSes as I'm getting SERVFAIL as you see.

I know my DNS is caching, but I don't know why it is keep getting the same reply time every time I'm querying the same domain in question "gulfup.com"

Google answers me in 2msec, while I'm getting weirdly 4xxx msec.

Does named have any parameter to make things shorter?

Many thanks!
 
Old 07-04-2016, 08:35 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Google answers me in 2msec, while I'm getting weirdly 4xxx msec.
Does named have any parameter to make things shorter?
Nah, I'm getting 70ms from google and 4ms from my 127.0.0.1!!!
By the way here is your problem:
Code:
dig gulfup.com +trace
<snip>
couldn't get address for 'ns1.gulfup.com': not found
couldn't get address for 'ns2.gulfup.com': not found
dig: couldn't get address for 'ns1.gulfup.com': no more
 
Old 07-04-2016, 10:29 AM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,597

Rep: Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690
FYI: I did a few time trials with DIG against the google DNS servers. I am impressed.
The times were as fast as my internal caching DNS server on second query, and FAR faster than my ISP nameservers in ALL cases! They must have some insane horsepower and bandwidth allocations.
 
Old 07-04-2016, 10:53 AM   #6
Tarikc
Member
 
Registered: May 2009
Distribution: CentOS, RedHat, Ubuntu
Posts: 68

Original Poster
Rep: Reputation: 4
Indeed!, they are insane for that, they might have their own specific DNS software, anycasting it all over the world.

I think I'm getting the problem more clear here for me, I've setup a new DNS, same config, asking that new one gives back a reply with 2 ~ 200 msec, still the old one gives 4K :|

So I guess the old one is getting congested? although it is not running out of resources, though it is a VM, this might have some effect? no?

I think I should get it out alone to a physical one and check the results there.

Thank you guys for your time!

Really appreciated.
 
Old 07-04-2016, 11:14 AM   #7
biosboy4
Member
 
Registered: Aug 2015
Distribution: Debian, SUSE, NXOS
Posts: 242

Rep: Reputation: 38
DNS Query time is very high

There was a time in the past when vms performed poorly, but not anymore.

If a vm is performing poorly you might want to check the configuration and also the nics.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iterative Query DNS and Recursive Query DNS !!!!! jitendra.sharma Linux - Newbie 1 09-05-2013 02:38 AM
forwarding DNS query to another DNS server pedenski Linux - Newbie 6 05-16-2013 08:56 AM
Redirect local DNS query to remote DNS server on non standard port? rock_ya_baby Linux - Server 8 04-13-2010 04:31 AM
DNS query chynna_v Linux - Newbie 1 09-15-2004 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration