Why would a DNS server make a difference in my transfer speeds?

So this weekend I was attempting to download a BF3 patch for my PS3 version of the game, and while I had no problem connecting to PSN, I was consistently getting an error when trying to download the patch. I solved this by manually entering the DNS servers, but it took some tinkering:
1. First I used google's DNS servers, which got me connected, but the download was extremely slow-- 1.5gigs was going to take 36 hours. I let it go over night, and not surprisingly it timed out. Every time after that I tried to restart the download, it would timeout almost immediately.

2. Then I tried OpenDNS', but met essentially the same problem

3. Then I tried the SmartViper Public DNS', and not only did they work, but my download speed skyrocketed--what would have taken a day now took just 3 hours.

I understand why changing the DNS servers would help me to connect (China does some blocking at the DNS level), but I have no idea why a particular DNS would result in such a dramatic difference, or any difference at all really, in transfer speed. Any thoughts?

Because companies use geocaching. Their DNS servers, when you ask them where their servers are, will reply with the servers that are closest to the machine asking the question. So, if you use DNS servers that are 'nearby', in Net terms, then you will be given IP addresses that are in much closer proximity. I believe OpenDNS is in Texas, so it will probably give you terrible answers, if you ask it from China.

SmartViper is probably just nearby, so what they're given works better for you.

Hmm... well I looked up the location of 208.76.50.5 and it's based in Florida. I would think Texas would work better than Florida, and Google's in CA so that should be the best of all. Maybe there is some sort of bandwidth throttling going on in China on data coming from certain parts of the US, as I notice my VPN connection (San Diego based) had been extremely slow recently.

Malor wrote:

Because companies use geocaching. Their DNS servers, when you ask them where their servers are, will reply with the servers that are closest to the machine asking the question. So, if you use DNS servers that are 'nearby', in Net terms, then you will be given IP addresses that are in much closer proximity. I believe OpenDNS is in Texas, so it will probably give you terrible answers, if you ask it from China.

SmartViper is probably just nearby, so what they're given works better for you.

I don't think the geocaching is based on the DNS server location, but the location of your IP address. I once had an IP address that was identified as being on the east coast, and I started getting sites thinking I am in the east coast, even though my DNS server was on the west coast.

Though maybe there is a hybrid system in place.

I don't think the geocaching is based on the DNS server location, but the location of your IP address.

It's dependent on who does the name resolution, which is usually the server you're talking to. There's talk of extending the protocol to indicate the IP of the asking client, but I don't think that's been implemented yet. Right now, it's based on the server, not the client.

This is because most clients don't resolve names themselves; they ask a nameserver, the nameserver traverses the global DNS tree, determines the answer, and gives that answer to the client. This lets a single machine serve thousands of people, and keep net traffic down by maintaining local cache results. But it means that geocached results, if you're using a server that's far away from you on the network, will be suboptimal, or even downright poor.

Chairman_Mao, you might try to see if you can use some kind of DNS in Singapore, Taiwan, or South Korea. I don't know what the actual layout of the Net looks like in that area, but I think they'll probably be closer to you, net-wise, than many other places.

Thanks Malor. For some reason this Florida one is working pretty well, but I'll see if I can find some regional ones to compare with this weekend.

came across this interesting Chrome extension on Lifehacker, that allegedly optimizes Web performance by making sure your DNS servers are connecting you to the closest CDNs. (works together with this app)