Windows Server 2008 R2 DNS and high RAM usage.

The common problem with Windows 2008R2 with DNS server role installed is high RAM usage. This is due to the large number of ports that are opened by DNS: a total of 5000 (2500 UDP IPv4 and 2500 UDP IPv6).
To check socket pool size just run:

Dnscmd /Info /SocketPoolSize

Disabling of IPv6 will solve the problem gently, but still the RAM usage will be high.
If the server acts as a small  DNS server, you can change this number to i.e. 100 by using the command:
Dnscmd /Config /SocketPoolSize 100

And restart DNS service: DNS:

net stop “DNS Server”

net start “DNS Server”