Testing perf. of files vs. DNS?

Kevin Darcy kcd at daimlerchrysler.com
Sat Jul 24 04:30:55 UTC 2004


Spam Averse wrote:

>I admin a very small Linux-based network whose nodes use static IP address. 
>I would like to test which method, DNS or /etc/hosts, returns the name
>resolution the fastest.
>
>The server for this network is quite old and slow.  It is low (and max-out)
>on system RAM, which argues against BIND.  The 4200RPM hard disk is also
>incapable of doing DMA accesses, which argues against file I/O
>(/etc/hosts).
>
>Rather than speculate which method is worse than the other, I would like to
>test the relative performance.  Can anyone suggest a way to do this?
>
Are you comparing apples to oranges here? /etc/hosts is something a DNS 
*client* uses, whereas typically BIND is something that only a central 
*server* (in a small network) would run. The low disk speed of the 
server isn't going to affect the ability of clients to fetch data from 
their /etc/hosts files, nor, generally speaking, is it going to affect 
DNS query speed (although it might make the server unable to answer 
queries longer when rebooting or reloading, if you have large zones). If 
your clients run a decent OS capable of caching disk blocks, and 
/etc/hosts isn't huge, then I don't think disk speed on the clients is 
going to be particularly important either. So your primary determinants 
here are network speed and how slow BIND gets because it is memory-starved.

One option you should consider, to alleviate both of those potential 
bottlenecks, is running a caching daemon on the clients (either BIND 
configured as caching-only, nscd, or something like that). That way the 
most common queries (assuming reasonable TTL values) will usually come 
from local cache. This would not be recommended if your clients are also 
memory-starved, though...

- Kevin




More information about the bind-users mailing list