-1

I have a server with Internet connection and /etc/resolv.conf with Real DNS servers. when I put the server in a close network without internet the server become very slow. I suspect that it's the DNS resolving. any idea how to fix it? maybe with nsswitch.conf?

should I add [NOTFOUND=return] in hosts: files dns

thanks!! E.

edotan
  • 1,876
  • 13
  • 39
  • 57
  • sure. sorry!! can you please let me know which is the best way to do it? – edotan Apr 09 '12 at 08:02
  • 1
    Go to your user page (click your username at the top of just about any page), select Questions, visit each question which has a light (rather than bold) box around the "answers" count, pick the best answer, and click the "tick" outline next to the best answer. I'm sure there will be some where none of the answers is any good, but you should be able to accept one for a lot of your outstanding questions. Thanks! – MadHatter Apr 09 '12 at 08:08

1 Answers1

3

It is better to ask a more deterministic question. What do you mean by very slow? The server overall performance is bad or some specific services are not responding as expected??

Yes, the DNS issues can result in some performance problems.

How to fix the issue:

  1. Configure your server to use a proper DNS server. At least, you can configure an internal one if you don't want/need to access public DNS servers.
  2. Disable DNS lookup for the relevant service and re-check. This depends on the service you are experiencing slow behavior. For example, you can add UseDNS no in sshd_config file for SSH service and so on.
Khaled
  • 36,533
  • 8
  • 72
  • 99