Share this topic on AskShare this topic on Del.icio.usShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on LiveShare this topic on MagnoliaShare this topic on MySpaceShare this topic on RedditShare this topic on SlashdotShare this topic on StumbleUponShare this topic on TechnoratiShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: MVPS "Hosts" file vs. DNS Cache  (Read 456 times)

0 Members and 1 Guest are viewing this topic.

Offline Rich73Kelly

  • New Member
  • *
  • Posts: 3
MVPS "Hosts" file vs. DNS Cache
« on: January 27, 2010, 11:37:25 PM »
First, some info on my machine, ... HP Pavilion a530n (AMD Athalon), XP Home w/SP3, IE7.  I have been having some issues with pages loading slow so, as I normally do, I went to another forum (Computer Help Club) to have this addressed. Well, after downgrading to IE7 from IE8,  I was directed to flush the DNS Cache and kept getting the statement "Could not flush the DNS Resolver cache: function failed during execution." Well, this had me as well as the people trying to help me out stumppped. I was then directed to http://www.ehow.com/how_5808384_flush-computers-dns-cache.html for instruction because members there insisted I was entering the command wrong. Upon following that link, I found a link in the left column "How to flush DNS in Windows XP". I clicked it and read through, finding the command "net stop dnscache" I tried this command as directed and got the statement "The DNS client service is not started." For which, just by chance, .. I entered "net start dnscache", to this command, two lines came up ....
The DNS client service is starting. and,
The DNS client service was started successfully." To which I responded "ipconfig /displaydns" this displayed as it should . Before I was getting the statement "Could not display the DNS resolver Cache." So, I again entered "ipconfig /flushdns", to which I FINALLY received the statement "Successfully flushed the DNS Resolver Cache." After this and a week of wondering why this came about, I realized, I had been directed to set the DNS Cache to Manual and stopped this service due to the following in the release notes that came with the MVPS HOSTS file I had installed months back ...
"[Important Notice - 2k/XP/VistaWin7 users]
In most cases a large HOSTS file (over 135 kb) tends to slow down the machine. This only occurs in 2k/XP/Vista. Windows 98 and Windows ME are not effected."  Then it goes on with instruction on how to set DNS client to Manual start up. Because the HOSTS files is around 600 kb, I followed these steps so, DNS Client was set to Manual startup. I have since returned it to Automatic and clicked on Start.
   This brings us to the question I was directed here to get answered. Should I follow the information in the Release Notes and set the DNS Cache Service to Manual or, should I leave it set to Automatic and deal with the time lag?
  If you need more information, I will be glad to provide it because I know I left a lot of details out trying to shorten this post.
  Also, what are your thoughts on IE8 ? now that I found out it was not related to IE, I don't think, anyway, should I get the update or is IE7 more stable ? Just curious.


Offline Black Viper

  • Administrator
  • ******
  • Posts: 2261
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: MVPS "Hosts" file vs. DNS Cache
« Reply #1 on: January 28, 2010, 12:15:33 AM »
Hosts files were never really intended to be 600KB. They are to staticly assign IP addresses to host or computer system names.  DNS cache is a sort of database that accesses information much faster then sequentially reading the hosts file every time any DNS query is performed.

Offline RB2tfm

  • Sr. Member
  • ****
  • Posts: 349
    • /F4F/Fighting4Fun/F4F/
Re: MVPS "Hosts" file vs. DNS Cache
« Reply #2 on: January 28, 2010, 01:41:37 PM »
 If you do have a large hostfile, try this.....HostsOptimizer

How to keep the DNS Client service enabled with a big hosts file

1. Download HostsOptimizer from here: http://www.mediafire.com/?zjzzntm0dnw
2. Whenever the hosts file is updated, run hostsopt.exe and press the "Optimize Hosts" button. If the button is disabled, run the program as Administrator.

What does HostsOptimizer do?

HostsOptimizer rearranges the content of the hosts like this:

- a maximum of 9 host names are put in a single line;
- all comments are removed (this includes disabled entries);
- duplicate host names are removed.

Note #1: With the DNS Client service enabled, the DNS cache must be flushed whenever a change is made to hosts file. To do this (Admin privileges required), either:
a) type "ipconfig /flushdns" (without quotes) in Command Prompt or in the Run box;
b) run HostsMan, go to menu "Tools" and select "Flush DNS Cache".


Note #2: An optimized version of the hpHosts is available for download here (look for hosts-optimized.zip): http://www.hosts-file.net/?s=Download

Note #3: HostsMan 4 will have the option to optimize the hosts file when it's updated

http://forum.abelhadigital.com/index.php?showtopic=637

Offline IH8U

  • Hero Member
  • *****
  • Posts: 783
Re: MVPS "Hosts" file vs. DNS Cache
« Reply #3 on: January 28, 2010, 08:45:59 PM »
This brings us to the question I was directed here to get answered. Should I follow the information in the Release Notes and set the DNS Cache Service to Manual or, should I leave it set to Automatic and deal with the time lag?
  If you need more information, I will be glad to provide it because I know I left a lot of details out trying to shorten this post.
  Also, what are your thoughts on IE8 ? now that I found out it was not related to IE, I don't think, anyway, should I get the update or is IE7 more stable ? Just curious.

With Xp, if you plan on continuing to use the hosts file from mvps follow the recommendation and set the DNS cache to manual. I have a custom hosts file which is near 1mb and was over 1mb for some time before I cleaned a bunch of old crap out of it.

As for IE8, my thoughts are get Firefox. If you want to continue using IE then upgrade to 8 and download all the latest security patches.