by Tom Dahm, Chief Operations Officer, NetMechanic, Inc.
If you run your own Web server, here's an easy tip to boost your server's performance: turn off reverse DNS (Domain Name System) lookups.
Web server performance depends on a number of factors, including your server's operating system, the amount of available RAM, and the number and type of CGI processes running on the machine. As a rule of thumb, however, the more you reduce or defer low priority tasks performed by the server, the better your performance will be. DNS lookups are one such task.
Every time your server receives a request from a client, it will log that request to its access log file. Though the format of this file varies, almost all servers include the IP address from which the request originated. That's critical information for determining where your visitors are located. However, many servers translate this IP address into the fully qualified domain names before writing it to the access log. Thus the IP address 207.158.244.228 becomes "www.netmechanic.com."
While translation of the IP address to a domain name helps you understand your access log, it also adds a performance penalty. Your server executes a DNS lookup by calling the routine gethostbyname() to perform the translation, and it will do this for every request received. Though a single such call isn't expensive, the cumulative effect of these calls makes a noticeable difference in performance.
For the Apache server DNS lookups are controlled by the directive "HostnameLookups." For Apache 1.2 and older versions, this directive was set to "On" by default. Set it to "Off." You will still see your visitor's IP address in your log files (this doesn't incur a performance penalty).
Want to know how much difference this make in your server's performance? Try our Server Check Pro monitoring service. Server Check Pro monitors you Web server 24 hours a day, 7 days per week from multiple, geographically separated locations. With Server Check Pro you can study your server's performance over time, and even make before/after comparisons as you change your server's configuration. Click here to learn more.
Source: http://www.netmechanic.com/news/vol1/server_no3.htm |