blechschmidt / massdns

A high-performance DNS stub resolver for bulk lookups and reconnaissance (subdomain enumeration)
GNU General Public License v3.0
3.08k stars 460 forks source link

Poor performance on Digital Ocean droplet #82

Closed MMquant closed 1 year ago

MMquant commented 3 years ago

Massdns used to work perfectly for at least 1 year on Digital Ocean Droplets (DOD) with performance ~22k pps. Recently after I apt update && apt upgrade my Ubuntu machine on DOD the massdns became unusable with performance ~50-300 pps. Now massdns often completely freezes SSH connection so hard reset via DOD cPanel is needed. It has never happened before.

Currently I'm using massdns from my home connection (150Mb/s) with the same public resolvers which I used at DOD and I'm getting ~8-10k pps. I tried to create fresh DOD and clean install massdns but it didn't help. I even opened support ticket a explained the problem to the DO support but got response that all networking regarding my DOD is fully functional.

Does anyone have similar issues on latest Ubuntu machines or/and DODs?

mzpqnxow commented 3 years ago

I would recommend experimenting with different hashmap size, socket count and interval settings. It seems very unusual to me, I don’t have any suggestions aside from those

00xfd commented 3 years ago

@MMquant could you solve the problem? I have the same experience and I didn't find a solution to that

blechschmidt commented 3 years ago

I cannot reproduce this. On a $5/month Ubuntu droplet in Frankfurt I obtain a success rate of ~3k packets per second with the resolvers from https://public-dns.info/nameservers.txt as downloaded by the get-resolvers.sh script when resolving the Majestic million with the default parameters.

Massdns is quite RAM hungry. Could it possibly be that parts of the RAM are swapped? Does this issue occur with larger droplets?

blechschmidt commented 1 year ago

I can perform ~30k lookups per second against authoritative name servers on the cheapest DO droplet (sed -e 's/.*/\0.facebook.com/' subdomains.txt | ./bin/massdns -r <(./scripts/auth-addrs.sh facebook.com) -o J > /dev/null). Thus, I assume this to be a rate limiting issue with the resolvers you are using. Therefore, I am closing this issue. In the future, the goal is to add an option having MassDNS perform recursion on its own instead of having to rely on third-party resolvers.