0

I can't run dnsclient because host process for windows cpu 40-50% when used with hosts file, my laptop works fine with an empty hosts file and when it is disabled, but I want to run it with a hosts file that is around 2mb, the entries are 67,000 approximately, should they get in the dns cache? well, I waited, I run flushdns too, but cpu wasn't getting lower

1 Answers1

0

AFAIK the hosts file is just searched linearly.  The code was never optimized to convert it to a hash table or a tree, or transfer it into DNS, because nobody ever expected people to have a host file that is anywhere near as big as 2 MB.  DNS and hosts file are parallel mechanisms; they won’t interact.

You should probably just convert your hosts information into DNS format.