Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am running my own Authoritative DNS on bind9 for like 5 of my domains with little traffic. I am running them on 2 separate VPS servers (so every Mb of memory costs me some $x2).

Is there any way to reduce it's memory consumption down from ~45-50Mb? (I would be happy with 10-30Mb)

I know there are lighter DNS server alternatives, but this would require to replace server managing software, so I would prefer to stick with bind.

Suggestions? I've heard bind8 is better on memory consumptoin. Will I fall to hell for using it?

share|improve this question

5 Answers 5

up vote 8 down vote accepted

You can take a look into options like:

  • datasize [bytes]
  • max-cache-size [bytes]
  • tcp-clients [number]
  • recursive-clients [number]

These are all global options that may actually cause your server to stop responding once hitting the caps, but will limit the memory used.

My VPS host linode.com used to have a good guide on limiting BIND memory usage which is where I originally learned about most of those options, but I can’t seem to find it.

For a real world example, with a setting of "max-cache-size 1M" my BIND install is using just about 30-35MB of memory (uptime 2 weeks, authoritative for 9 zones, light traffic).

share|improve this answer
1  
Thanks, that is what I was looking. Looks like no drastical changes should be expected with bind9, but still might make a difference. Thanks. –  BarsMonster Feb 19 '10 at 5:48

Have you ever heard of NSD(Name Server Daemon)? It's designed for authoritative Domain Name Server. It has good performance and very low footprint.

share|improve this answer
    
yes, NSD (and not NDS :-) ) it's a very good choice for an authoritative server. (use by lot of tld) –  2xyo Feb 16 '10 at 10:07

The tinydns suggestion is your way to go if you want to save memory. BIND caching of zones is as aggressive as it is pointless, performance-wise a well-designed binary database is just as fast.

Regarding going for DNS hosting, there are several services out there that give it to you for free, for example Afraid, BuddyNS and Hurricane Electric.

share|improve this answer

I'd take a look at TinyDNS also, its another more popular BIND replacement

share|improve this answer

Maybe not answer you are looking for, but why not go with a hosted DNS? I guess I am not a true geek sysadmin but I offloaded admin stuff that was not so useful for us (email, dns) to dedicated companies instead of wasting my time on it. We use www.dnsmadeeasy.com and they have been great. The prices are really cheap for a few domains. It will be cheaper than your VPS, that's for sure.

share|improve this answer
    
Well, they would need me to pay like 60$/year(for primary+secondary) to manage my 5 domains, and I will need to pay more if I would need more than 10. Also, I want to stick to servers in Russia(due to ping and availability), and we have less choose here in terms of pricing. Well, I offloaded mail to GMail too, so if there were free and reliable "G-DNS" I would go for it. –  BarsMonster Feb 16 '10 at 1:12
    
Again not the answer your looking for but, most VPS providers provide free DNS services. Does your existing VPS provider not provide DNS services? –  CarpeNoctem Feb 16 '10 at 3:00
    
It does, but I do not want to depend on 1 DNS provider. I want to have primary and slave DNS servers in separate datacenters on different channels and different companies. And I already have that, and it's working great and perfect. The only problem is that I had to buy 128Mb VPS for that, 64Mb is about twice cheaper but bind9 does not fit nicely in 64Mb with some extra stuff. –  BarsMonster Feb 16 '10 at 3:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.