Subject: Re: named hostname-lookup rate on NetBSD?
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: tech-net
Date: 04/10/2000 14:46:15
>>>>> "Jonathan" == Jonathan Stone <jonathan@DSG.Stanford.EDU> writes:
Jonathan> In message
Jonathan> <200004101532.LAA00694@pzero.sandelman.ottawa.on.ca>Michael
Jonathan> Richards on writes:
>> How many names do you expect to cache?
Jonathan> "None at all". I'm looking up lists of, oh, half a million
Ah, I see now.
Jonathan> unique hostnames. (I cant make the list available). If/when I
run tr 'A-Za-z' 'somepermutation' on the names... Yeah, we can to frequency
analysis to break the "key", but maybe that is enough.
Jonathan> get it to go faster, I'll look up more ;).
Try bind 9. Aside from pthreads, my understanding is that it is designed
for much larger internal databases, with the ability to keep stuff on disk
as well.
>> How much ram do you have?
Jonathan> One gigabyte.
>> Are you swapping?
Jonathan> Nope. the named process doesnt get much over 60 megabytes. The
Then I definitely don't expect NetBSD to do any better.
Try a system with a faster memory bus, larger L2 caches, etc. I have a
PII-450 with 100Mhz 128M ram on a 64/66 capable bridge with NetBSD on a test
bench which could be used for a couple of hours. I could give it a try if you
can make it a no-brainer to make things work.
Jonathan> CPU load is about 70-75% in named. System time is only around
Jonathan> 10-15%. (Again, this is on FreeBSD. I'll have to juggle some
Jonathan> hardware to try it on NetBSD.) The machine is otherwise idle,
Jonathan> except for the 500 or so processes iterating over
Jonathan> gethostbyname().
Hmm. Have you tried running those look up processes on another machine?
>> As named is not (to my knowledge) multithreaded yet, I guess the
>> second CPU capability of FreeBSD won't help much.
Jonathan> BIND 9 uses pthreads, but I havent looked closely enough to see
Jonathan> if BIND 9 would ever acutally benefit from two CPUs, let alone
Jonathan> in this case.
It must have locking between the threads which on the single CPU case
would make it slower.
Jonathan> I think it *is* a bug, since the time is spent in userspace,
Jonathan> and it's not rocket science to build, say, a webserver that can
Jonathan> sustain 100Mbit/sec for static content on similar hardware.
Jonathan> (See, for example, Vivek Pai's "flash" server.)
gprof the code and send the results to the DNS crew.
Jonathan> I just thought someone would have statistics on NetBSD as a
Jonathan> heavily-used (thrashed) nameserver.
I use NetBSD as a *reliable* nameserver... no more than 1000 names plus
cached stuff in it...
] Out and about in Ottawa. hmmm... beer. | firewalls [
] Michael Richardson, Sandelman Software Works, Ottawa, ON |net architect[
] mcr@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
] panic("Just another NetBSD/notebook using, kernel hacking, security guy"); [