dns server sizing?

Jim Reid jim at mpn.cp.philips.com
Wed Sep 22 10:08:27 UTC 1999


>>>>> "Michael" == Michael Cunningham <malice at exit109.com> writes:

    Michael> ... useful details of your net snipped ...

    Michael> Can anyone give me any
    Michael> type of sizing guidelines for dns performance? I assume
    Michael> cpu and memory are essential for decent performance?

RAM is the most important factor for performance. The name server
really needs to have all of its cache resident in VM. When it consults
the cache, named tends not to show good locality of reference: it
tends to access all of its address space at random. This can upset the
VM subsystem and if named gets a page fault because a bit of the cache
has been shifted to the swap partition.... Running a name server on a
system which has other memory-hungry applications is bad news.

CPU speed shouldn't be an issue unless you're going to use something
like a 1 MIP machine and throw hundreds of queries at it each second.
If the timestamps from tcpdump are to be believed, I've seen a name
server running on a 166Mhz Pentium answer a query from its cache in
200us. This box only does DNS and averages around 30 queries/second,
which is moderately busy. The load average is around 0.1, so I reckon
it cope with a few thousand queries a second. Only an Internet root
server should be experiencing that sort of query rate. If you're going
to use secure DNS, you *will* need fast processors to verify and
create RSA-based signatures on each secure DNS packet.

I've found the following metrics seem to work as a rough rule of thumb
when working out how much RAM a name server needs:
	each resource record occupies 100 bytes of RAM on average
	each zone statement in named.conf => 1000 bytes in the cache
	allow 3 resource records: A, MX, PTR for each IP address

One (non-recursive) name server here uses 44Mbytes of RAM. In round
figures it has 8,000 zones and 93,000 IP addresses. Another name
server has 600 zones and 17,000 IP addresses. It uses 6.5Mbytes of RAM.
As for estimating how much RAM is needed for cached resource records,
how long is a piece of string? It all depends on how many names your
users and applications look up, what web sites they go to, where they
send and recieve mail, etc, etc. Most people find that the size of
their name server's caches stabilises after 1-2 weeks of running.

    Michael> Suggestions on what I should pick up for the 2 masters
    Michael> and the slaves? Pc based recommendation? Sun based
    Michael> recommendation?

Personally I favour PCs running BSD/OS. The hardware's cheap and the
OS is rock-solid and has excellent support. It also happens to be one
of the development platforms for BIND. I'm not too fond of Solaris as
a name server platform because of all the nsswitch.conf, DOORS, nscd,
nis, nis+, etc cruft that gets in the way of quick name/address
lookups.

For a global net, you probably want a global hardware supplier so that
getting spares and hardware repairs is painless. It wouldn't be nice
to have to wait a week to ship a motherboard (or whatever) to some
office in the boonies, have hassles with customs and couriers, etc.
This is another reason for choosing a PC. In an emergency, you can
alwasy pick up an ethernet card or a fan or even a new CPU at the
corner computer shop.

You also want to ensure that local desktops query their local name
server. You don't want them beating up on name servers on the other
side of the world. This is particulary important for idiot resolvers
and applications that won't take no for an answer. One PC in India
sent 500,000 queries one day to a name server in the USA asking for an
A record for 255.55.255.255!


More information about the bind-users mailing list