Rexxer

Some tips for me and other

DNS server + memory consumption

In Windows Server 2008 R2 or older OS with MS08-037 patch installed, DNS server (dns.exe) consumes ridiculously large amount of precious memory.

Under the hood, dns.exe opens more than 5000 UDP ports during start up, 2500 for UDP IPv4, 2500 for UDP IPv6.  Large amount of kernel memory is also allocated for these ports.  This can get even worse when increasing the number of CPU cores on the system.  200MB consumption on a 4 cores system is fairly common.  wtf!!

One of the workaround is to reduce the value one called SocketPoolSize, which may potentially increase the security attack surface.  The default value for SocketPoolSize is 2500.  Set to 10 may be good for lightweight DNS server used behind the firewall.

Following command can read/set the value

Dnscmd /Info /SocketPoolSize

Dnscmd /Config /SocketPoolSize 10

After restart the DNS service, the memory consumption goes down to an acceptable 10MB range.

Source: https://pigworlds.wordpress.com/2011/04/15/anonying-dns-exe-high-memory-consumption/

Comments are currently closed.