Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The big hosts file seems to cause a significant slowdown on Windows7 SP1 #93

Closed
krasi0 opened this issue Feb 23, 2016 · 10 comments
Closed

Comments

@krasi0
Copy link

krasi0 commented Feb 23, 2016

This is mostly noticeable once a network interface becomes enabled. Ping commands and establishing new connections don't appear to work during the first 40-50 seconds or so

@Laicure
Copy link
Contributor

Laicure commented Feb 23, 2016

Hi @krasi0, can you provide the sources that you have used? Everything seems fine on my phone and system using the default sources from this repo though I have delays too but just less than a minute. And what kind of new connections are those?

@krasi0
Copy link
Author

krasi0 commented Feb 23, 2016

Hey, @Laicure ! I have been using the file downloaded straight from https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

I am describing an issue where svchost.exe uses 100% CPU for about 20 seconds or more (parsing the big hosts file I presume) once I enable an ethernet interface (I have to disable / enable it quite frequently for ... reasons). During that delay nothing resolves or no outbound tcp/ip connections are possible. Afterwards, the delays are no longer that big.

My question: would you happen to know if there is a way to somehow cache the parsed hosts file between dis/enabling the ethernet interface, so that I avoid that initial delay I am describing?

Thanks in advance!

@Laicure
Copy link
Contributor

Laicure commented Feb 23, 2016

/hmm
Is your DNS Client running?
I think it should not reparse the hosts file whenever there are connect/disconnect scenarios (except on my Windows Phone though, it takes at least 30 sec to establish a connection).

Have you tried not using the hosts file and rerun the disable/enable interface thing and see the differences?

I am using a modified hosts file from this repo, (forked it, UI revamp for Windows users but still follows the concepts of this repo). Maybe you can try it.

@krasi0
Copy link
Author

krasi0 commented Feb 23, 2016

Yes, the DNS client is running. With the default, small hosts file there
isn't such a big delay. I will have a look at your hosts file.

Thanks!

On Tue, Feb 23, 2016 at 10:25 PM, Laicurè Leviarè notifications@github.com
wrote:

/hmm
Is your DNS Client running?
I think it should not reparse the hosts file whenever there are
connect/disconnect scenarios (except on my Windows Phone though, it takes
at least 30 sec to establish a connection).

Have you tried not using the hosts file and rerun the disable/enable
interface thing and see the differences?

I am using a modified hosts file from this repo, (forked it, UI revamp for
Windows users but still follows the concepts of this repo). Maybe you can try
it https://raw.githubusercontent.com/Laicure/HostsX/master/hosts.


Reply to this email directly or view it on GitHub
#93 (comment).

BR

@krasi0
Copy link
Author

krasi0 commented Feb 23, 2016

I experience the same issues with your curated hosts file. I guess, it's
the close to 1MB size that causes svchost.exe to take a while... Sigh

On Tue, Feb 23, 2016 at 10:28 PM, Krasimir Krastev krasi000@gmail.com
wrote:

Yes, the DNS client is running. With the default, small hosts file there
isn't such a big delay. I will have a look at your hosts file.

Thanks!

On Tue, Feb 23, 2016 at 10:25 PM, Laicurè Leviarè <
notifications@github.com> wrote:

/hmm
Is your DNS Client running?
I think it should not reparse the hosts file whenever there are
connect/disconnect scenarios (except on my Windows Phone though, it
takes at least 30 sec to establish a connection).

Have you tried not using the hosts file and rerun the disable/enable
interface thing and see the differences?

I am using a modified hosts file from this repo, (forked it, UI revamp
for Windows users but still follows the concepts of this repo). Maybe you
can try it
https://raw.githubusercontent.com/Laicure/HostsX/master/hosts.


Reply to this email directly or view it on GitHub
#93 (comment).

BR

BR

@StevenBlack
Copy link
Owner

There should be no delay at all. Like, imperceptible.

Closing because this is a local machine config/firewall/AV thing. It's Windows.

@FadeMind
Copy link
Contributor

@StevenBlack This is issue in DNS cache setup. Hard workaround:
screenshot_20160224_085830

SRC: http://winhelp2002.mvps.org/hostswin7.htm

Windows 10 have fixed this issue and don't need any regfix.

@androidacy-user
Copy link

I've noticed if you go above 10k hosts in win10 dns is unusable, like all reqeuests time out

@mondjunge
Copy link

I can confirm this is happening again since one of the last Windows 10 updates. It took some time to find out why the wifi is taking up to 3 minutes to connect to the internet. The PC is running fine for years. Haven't updated the hosts in quite some time.

This seems to be a windows DNS Client Bug regression from Win 7 days. I can see my DNS-Client consumes a full Thread at 100% until internet connectivity is established.

Connection is instant when I put the original hosts file in place.

I just leave my two cents here for other wanderers.

@funilrys
Copy link
Contributor

As usual while commenting about Windows behavior: I rarely use Windows personally.

But, disabling the DNS client might help? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants