Server 2012 R2 DNS Cache Limits

Robert Sanders 1 Reputation point
2020-08-02T23:03:07.73+00:00

I appear to be reaching an upper limit of the DNS cache in Server 2012 R2. I cannot find any documentation on the maximum cache size (seems to be unlimited) or DNS cache entry limits.

Does anyone know what the limits are before new entries stop being recorded?

Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,040 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Sunny Qi 11,051 Reputation points Microsoft Vendor
    2020-08-03T03:25:18.133+00:00

    Hi,

    Welcome to our new Q&A platform.

    Actually, there is no limit. It depends on your environment, the more queries the larger cache needed.

    You may check by the following steps on your DNS server.

    1. Open a cmd window and type dnscmd /exportsettings
      15003-snipaste-2020-08-03-11-06-03.jpg
    2. Locate the file Windows\system32\dns\DnsSettings.txt, then open it and find the MaxCacheSize=DWORD:0 entry. The value 0 means there is no limit.
      15004-snipaste-2020-08-03-11-07-48.jpg
      15005-snipaste-2020-08-03-11-08-47.jpg

    For more information about Dnscmd, please refer to the following article.
    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc772069(v=ws.11)?redirectedfrom=MSDN#BKMK_25a

    Meanwhile, are you trying to set a limit? If yes, you may use PowerShell Command Set-DnsServerCache to set the maximum cache size for a DNS server.

    To set the cache size, you may use Set-DnsServerCache -MaxKBSize Size -ComputerName "FQDN of your dns"

    For detailed information about Set-DnsServerCache, please refer to the link below:

    https://learn.microsoft.com/en-us/powershell/module/dnsserver/set-dnsservercache?view=win10-ps

    Hope my answer will help you!

    ---Please Accept as answer if the reply is helpful---

    Best Regards,
    Sunny

    1 person found this answer helpful.

  2. Anonymous
    2020-08-02T23:24:53.48+00:00

    By default its unlimited. You can check by running;
    dnscmd /exportsettings
    then look in the system32\dns folder for a file named DnsSettings.txt and find;
    MaxCacheSize=DWORD:0
    0 being unlimited

    --please don't forget to Accept as answer if the reply is helpful--


  3. Robert Sanders 1 Reputation point
    2020-08-03T13:44:03.147+00:00

    Whats odd however, is that when this cache is heavily filled, specifically for the .com TLDs, it stops renewing the records. Due to a mailer blast in the range 1 million+, is there an entry limit? How about a memory registration / memory buffer limit? It seems that all dns cache is stored in memory under the svchost.exe process - does this have a limit to how much memory its allowed to address for the cache that is outside the control of dnscmd?

    0 comments No comments

  4. Anonymous
    2020-08-03T19:17:00.693+00:00

    Some other settings you can work with.
    https://learn.microsoft.com/en-us/powershell/module/dnsserver/set-dnsservercache?view=win10-ps

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.