Why is DNS the first thing to go when my connection is busy?

3

0

It seems like whenever I have reached the apparent limits of my download/upload rate (or just been throttled), the first thing that will start to slow or timeout completely is DNS lookups. Normally I would just chalk that up to DNS being the first request needed to do most activities, but what's strange about it is I can still make plenty of requests and send data to pages (for example, over HTTP) whose DNS is already cached or whose IP address I am using directly. Why is this?

bright-star

Posted 2014-04-21T23:46:49.387

Reputation: 1 489

I'm not sure, so I'll post it in a comment for others to read and verify if true or state otherwise if false. Its a given that when your up-stream is full, your computer can't download because every downloaded package over TCP requires a validation package to be sent back telling the other side what package you received last. Basically what happens is this: you download a package, you want to send out the confirmation bit, but it is in the queue. The other side therefor has to wait sending the next. Other connections are likely not over TCP, or the data is less – LPChip – 2014-04-21T23:57:26.763

1Have you tried a different DNS server to see if it us affected as well? (e.g. Google or opendns) – Brian Adkins – 2014-04-22T01:08:37.640

I have noticed this behavior over a few years and different setups (ISP, OS, DNS). – bright-star – 2014-04-22T01:23:14.113

1Have you checked in your router settings? I noted that our SMB-spec Netgear firewall/router had a "block UDP flood" setting which was enabled by default and only allowed a limited number of UDP connections per minute. It was a ludicrously low number. Disabling that "security" feature massively boosted performance. – ArgumentBargument – 2014-04-22T12:07:11.090

Answers

0

A dropped TCP packet will be detected and re-transmitted by the two hosts that have established the TCP session.

A dropped UDP packet is not part of a session, and has no built-in functionality for detection of delivery failure. In the case of DNS, a dropped packet results in a timeout, then the query is repeated, perhaps to a different server.

UDP has a much lower overhead than TCP. (My Mac OSX 9.2 system has 92 tuneable TCP parameters that every TCP session sets. There are only 7 for UDP.) This allows a DNS server to provide name service to many thousands times more clients than it could if it used TCP for the same transactions.

Nevin Williams

Posted 2014-04-21T23:46:49.387

Reputation: 3 725