request drops in BIND?

Danny Mayer mayer at gis.net
Tue May 11 18:05:58 UTC 2004


At 11:17 AM 5/10/2004, KyoungSoo Park wrote:
>Hi Barry,
>
> >>Hi BIND hackers(or anyone interested in BIND's performance),
> >>
> >>To know BIND's reliability & performance, I tested BIND 9.2.3 by sending
> >>burst requests and
> >>seeing how many actually get back.
> >>When I did 200 requests of a single local domain name(the result should
> >>be cached in the BIND) at the same time,
> >>I see about 20 - 22 responses are usually missing.
> >>
> >>The BIND server that I configured is for testing only, so there is no
> >>user except for me.
> >>I wonder why it starts failing to respond at the burst request rate 178
> >>requests/sec.
> >>When I looked through tcpdump, then it seems the BIND gets all 
> requests, but
> >>it seems it's dropping requests inside the server.
> >>
> >>
> >
> >Are you sure about that?  It could be getting dropped in the UDP stack
> >*after* tcpdump has reported that the packet was received.  You should
> >enable BIND's debugging -- if it intentionally drops a request, I would
> >expect it to log a debugging message.
> >
> >
>Yes. I'm quite positive. I did this many times, but see almost the same
>phenomenon.
>Getting dropped in the UDP stack doesn't seem to explain all, because
>all I did was to send 200 requests/sec at once
>(it's about 2 Mbps rate), and the total size of all 200 requests should
>be smaller than the recv buffer.
>Also, I did the same test using my UDP Ping, and it worked perfectly fine.

Ping demands very little of a system. BIND needs to process the request
and send back a reply. They're hardly in the same league.

>Yes. I think it's a good idea to enable the debugging option and see
>what happens.
>
> >When we were having performance problems on our caching nameservers, we
> >noticed that queries to the virtual address that we publicized to our
> >customers would frequently time out, but queries sent to the server's
> >"real" address would have no problems.  So the problem was that the
> >per-socket buffer was overflowing (BIND uses a separate UDP socket for
> >each of the server's addresses).
> >
> >
>What if there is only one IP address(no virtual address) for all the
>customers?
>64KB of default buffer seems not enough for handling bulk requests. It's
>not only used for getting requests
>but also used for getting responses from the remote name servers(such as
>gTDL servers). Those responses
>are usually big(300bytes), so it's possible that with only 218
>responses(=218*300 = 64KB), the buffer would fill up
>not even counting the requests' size. I think BIND's buffer should be at
>least a couple times bigger(ex. 10 times)
>to handle bulk requests. Bursty requests are always happening!

That's 64KB PER REQUEST, not per socket. BIND processes messages on a
specific sockets and fills the buffer with one request at a time. Making 
the buffer
10 times larger makes absolutely no difference except to use up more memory.
What would help is having additional sockets, ie additional IP addresses to 
handle
the load.

BIND (on Unix) uses select() to handle multiple sockets and processes each 
socket
one at a time for all of the requests in the incoming socket and allocates 
the buffer for
receiving the data for each request. There is a mixture of tasks and events 
going on
inside BIND to handle all of this and make sure that request and reply 
buffers are set
up properly and that the request is processed.

Danny

>Thanks,
>KyoungSoo
>
>
>
>
>
>



More information about the bind-users mailing list