Re: excessive dns slows httpd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike -- EMAIL IGNORED wrote:
My web server is a CentOS box thus:

   [root ~]# uname -a
   Linux mbrc21 2.6.18-92.1.22.el5 #1 SMP Tue
      Dec 16 12:03:43 EST 2008 i686 athlon i386 GNU/Linux
   root ~]# rpm -q httpd
   httpd-2.2.3-22.el5.centos.2

My development and standby is on a Fedora box thus:

   [root ~]# uname -a
   Linux mbrc32 2.6.23.17-88.fc7 #1 SMP Thu
      May 15 00:35:10 EDT 2008 i686 athlon i386 GNU/Linux
   [root@ ~]# rpm -q httpd
   httpd-2.2.8-1.fc7

They are close neighbors on my LAN.

Now I recently revised my httpd.conf making it somewhat
more complex and adding ssl for part of it.  Running the
same configuration on both boxes, I find that the Fedora
box runs rapidly, while the CentOS box is very slow.

Examining the situation with WireShark on both boxes I
find that in responding to a simple GET, the CentOS box
does a sequence of DNS queries to resolve the details of
the location of the client IP address, whereas the
Fedora box does no such thing.  It ts these DNS queries
that are causing the slow response.

Now if I revert to the old configuration, there is no
such problem and WireShark shows that there are no DNS
queries.

Advice on how to proceed would be much appreciated.

You could first check the obvious, such as whether in your Apache/Centos config, you are not *asking* the server to do these DNS lookups.
Look here for instance :
http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats
(I mean that if your are asking Apache to log the *name* of the client in the access log for instance, then it has to do a lookup) Any time, anywhere, where Apache, for whatever reason, has to translate an IP address into a name or vice-versa, may result in this behaviour.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux