The Broadband Guide
SG
search advanced

Host Resolution Priority Tweak

host name resolution priority
2002-04-19 (updated: 2015-04-02) by
Tags: , , ,

The tweak desribed below helps boost priority for DNS & hostname resolution in general. What this means is, it helps web pages load faster, and has negligible effect on downloads (not counting the couple of ms gain with the host resolution at connect-time).

What we're aiming at is to increase the priority of 4 processes relative to all the other hundreds of running processes in Windows, while keeping their order. Lower numbers mean higher priority compared to other services.

Let's examine these 4 services:

LocalPriority = 499 default default priority - local names cache
HostPriority = 500 default priority - the HOSTS file
DnsPriority = 2000 default priority - DNS host resolution
NetbtPriority = 2001 default priority - NetBT name resolution, including WINS

For these four services (all related to host name resolution), you will see some people recommending using the same priority, usually 1,1,1,1. The problem with that is it does not keep the correct order of priorities for the different services. That is why we recommend using small consecutive numbers, as the examples below. Using 4,5,6,7 increases their priority significantly compared to all other services (and their own default values) while keeping their correct order.

Applying this tweak assumes some proficiency in editing the Windows Registry using Regedit (Start > Run > type: regedit). Reboot after making changes. As always, backup your Registry before making any changes so you can revert to the previous state if you don't like the results.

Note: The below host name resolution tweak can also be used for changing name-resoluton order besides priority.


Windows 2k/XP

First, open the Windows Registry using Regedit, and (after backing up) navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider

it should look something like the image on the left





Note the following lines (all hex dwords):
Class = 008 (8) - indicates that TCP/IP is a name service provider, don't change.

LocalPriority = 1f3 (499)
- local names cache
HostsPriority = 1f4 (500)
- the HOSTS file
DnsPriority = 7d0 (2000)
- DNS
NetbtPriority = 7d1 (2001)
- NetBT name-resolution, including WINS

What we're aiming to do is increase the priority of the last 4 settings, while keeping their order. The valid range is from -32768 to +32767 and lower numbers mean higher priority compared to other services. What we're aiming at is lower numbers without going to extremes, something like what's shown below should work well:

Change the "Priority" lines to:
LocalPriority = 005 (4)
- local names cache
HostsPriority = 006 (5)
- the HOSTS file
DnsPriority = 007 (6)
- DNS
NetbtPriority = 008 (7)
- NetBT name-resolution, including WINS

As usual, reboot for changes to take effect.





Windows 9x/ME

The tweak is essentialy the same as in Windows 2000/XP, just the location in the Registry is slightly different. For a more detailed description see the Windows 2000/XP section above.

Open the Windows Registry using Regedit, and (after backing up) navigate to:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP\ServiceProvider

You should see the following settings:
Class=hex:08,00,00,00

LocalPriority=hex:f3,01,00,00
HostsPriority=hex:f4,01,00,00
DnsPriority=hex:d0,07,00,00
NetbtPriority=hex:d1,07,00,00

The "priority" lines should be  changed to:
LocalPriority=hex:04,00,00,00
HostsPriority=hex:05,00,00,00
DnsPriority=hex:06,00,00,00
NetbtPriority=hex:07,00,00,00

Reboot for changes to take effect.


Windows 7, 8, 8.1, Vista, 2008 Server

As with previous versions of Windows, one can improve DNS and hostname resolution by increasing the priority of of related services, while keeping their order. Lower numbers mean higher process priority. The corresponding registry settings in Vista are as follows:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider
LocalPriority=4
  (DWORD, recommended: 4, default: 499) - local names cache
HostsPriority=5
  (DWORD, recommended: 5, default: 500) - the HOSTS file
DnsPriority=6
  (DWORD, recommended: 6, default: 2000) - DNS
NetbtPriority=7
  (DWORD, recommended: 7, default: 2001) - NetBT name resolution, including WINS



References:
MSKB 250662
describes the Registry entries in the \ServiceProvider SubKey
MSKB 172218
- TCP/IP Host Name Resolution Order

For additional tweaks and information specific to the different Windows versions, check our other related registry tweaks articles


  User Reviews/Comments:
    rate:
   avg:
by anonymous - 2006-10-22 17:49
what if one were to set the local priority to a number higher than the host priority? what would happen then?
by Philip - 2006-10-23 14:44
Nothing visible. The idea is to bring all those from large numbers (low priority) to small numbers (high priority), as compared to other running services.

The order of those low numbers doesn't make a significant visible difference. Some people even set them to the same small number.

Still, for best results, I'd keep them at the default order, i.e. local cache gets higher priority than DNS.
by Grnch - 2007-03-28 08:08
What other running services could come before these four? Can you provide some examples? I can't think of any method for name resolution beside these four (on an average PC), so it looks like tweaking these values may be mostly pointless.
by Philip - 2007-03-28 08:31
The idea is to increase the priority of those 4 services as compared to other Windows services (that have nothing to do with name resolution, or even networking).
by xxx44static - 2007-04-26 00:39
Thank you for all the help with the Optimizer. I am on dialup and use utorrent for all my movie down loads and the optimizer kicked my
dialup in the butt and is moving fairly well for dial up being I live in a rural area out in the sticks oh my god in a cave lol so anything I can do to speed up my movie and internet connection is greatly appreciated and the suggestion on the optimizer worked.... Now I know that utorrent is for high speed connections but I get better searches with it better than limewire, again thank you.....
PS:
It would take 4 days to download file over 675 now its 2 1/2 days.....
by anonymous - 2007-05-08 18:29
ummmm yeah , better searches? what the hell are you talking about? uTorrent is a p2p torrent program , while limewire or limewire pro is a SEARCHABLE p2p software , NOT torrent..... all are made for any kind of connection that you do have , there is no possible way to "speed" up your dialup connection on movie downloads , if you see above a 3.2k downstream on a dialup , its theoretical anyways , ....... honestly v.90 is software , not hardware.........
by Addman - 2008-03-20 00:25
Annom Quote "there is no possible way to "speed" up your dialup connection on movie downloads".. Ah I have to disagree, dial up can be speed up and especially noticeable with torrent dl's. V90 being software or hardware has little to do with this set of tweaks.. Im am glad the dial-up guy can get faster bit torrent searches (lol its just web page vs p2p network) tho I expect he was referring to the inbuilt search feature in utorrent, since that adds adverts increasing number of dl's/server etc would increase that response..
by radio user - 2008-07-30 08:06
Does anyone know how one might optimize or prioritize a connection to a particular URL using, I assume, 'host resolution priority' settings in the Optimizer? I've a radio connection that I hope to improve with my dial-up service.
by Philip - 2008-09-18 11:56
Host resolution priority changes the priority of those 4 services.

Those services are used for resolving ANY host, changing their numbers will not differentiate between resolving different hosts.

If you want some URL to resolve fast, you can always add it's IP address to your hosts file. This, however, will only improve the initial name resolution of that host, and it will break your connection if their IP changes.
by Raidleader - 2009-01-20 11:18
OK after reading over this and going to the registry editor. I find that I have control sets 1-4 and "current control set" should I have so many? and which one would I edit?
by Philip - 2009-02-05 09:34
As per the article, edit the "CurrentControlSet" registry hive.
It is normal to have ControlSet001 / ControlSet002 in the registry, they're copies of the hive (one is the current boot, the other is the "Last Known Good Configuration" version).
by shoreke - 2009-03-05 10:20
Does this tweak actually work in Vista Ultimate?
by shoreke - 2009-03-05 10:21
Should I rename LocalPriority to LocalPriority=4? Or do I only change the DWord value from 499 to 4? Am I supposed to keep the name LocalPriority unchanged?
by jsaw - 2010-05-12 15:42
"The idea is to increase the priority of those 4 services as compared to other Windows services (that have nothing to do with name resolution, or even networking)."

I'm assuming these are only TCP resolution priorities and don't relate to other windows services.
by Philip - 2010-05-12 16:03
They're not only TCP resolution priorities, they do relate to other windows services as well.

Setting them to lower numbers in the same order increases their priority over other services, allowing the OS to allocate more system resources/CPU time to host resolution when needed.
by hammer860 - 2010-08-26 17:35
Are these ok to use in Win 7 ?
by anonymous - 2011-06-09 11:27
What about changing these to 1,2,3,4???
by Philip - 2011-06-10 14:42
It is best to use priority numbers not already occupied by other services, that's why the recommended values start from 4.
by drew - 2012-09-21 11:40
looking to give my nintendo Wii a higher priority than the cpu; for watching netflix flawlessly....
-have already cleared the cache/ history on the internet channel of Wii
-improved video streaming manager via netflix.com
-unplugged Wii for 30 min (per customer rep @ netflix.com)
last thing i can think of, is improve the priority ....
netflix kicks us out of EVERY title we attempt to watch @ about 10 min's into.
have 6mbps dsl connection with att 2701hg-b wireless router/modem
can anyone assist? much appreciation for all who reply
tyty
drew
by Just wonder - 2013-05-12 16:47
Philip,

- what services occupy 1, 2, 3, 4 priorities?

- what exact services could delay execution of name resolution when its priorities are on default?
by Chris - 2013-11-05 00:34
what a load of crud. The DNS resolver only cares about the order of preference for mame resolution on a single machine. The actual number assigned is nothing else than the relative preference for name lookups. Nothing will improve name lookups here...unless you want to store and maintain all of the internet host names in a local hosts file instead of looking them up from DNS servers.
News Glossary of Terms FAQs Polls Cool Links SpeedGuide Teams SG Premium Services SG Gear Store
Registry Tweaks Broadband Tools Downloads/Patches Broadband Hardware SG Ports Database Security Default Passwords User Stories
Broadband Routers Wireless Firewalls / VPNs Software Hardware User Reviews
Broadband Security Editorials General User Articles Quick Reference
Broadband Forums General Discussions
Advertising Awards Link to us Server Statistics Helping SG About