Does having a large hosts file affect network or hardware performance in any way?

viivo

[H]ard|Gawd
Joined
Sep 7, 2005
Messages
1,695
Just curious as I don't know how or when hosts is utilized or if its always in memory. The adblocker I use ([H] and related adservers are whitelisted of course) increases the hosts file size to nearly 3MB from the default 1KB. For a single, every day PC, does it matter at all?
 
I'm going to guess it's negligible. People do the same thing on phones, which are typically much less powerful
 
  • Like
Reactions: viivo
like this
It gets looked at for each new DNS lookup. For average browsing, doubt you will notice unless the PC is really CPU bound or insanely short of RAM.
 
  • Like
Reactions: viivo
like this
I wouldn't keep so large Hosts file. Maybe if the router supports custom DNS records... but if this is the easiest for you case, I guess it wouldn't hurt too much. I think queries to hosts file are not cached so everytime the OS would query it. It's known for its less-than-ideal performance and effectivenes in the DNS chain though. If you don't feel some performance hit then it's Ok. Still, being that large I would use other means. Most of the case one doesn't need so many hosts blocked. I use content blocker in the browser where I can use wildcards and regexes where with few rules I can block enormous amounts of content. Hosts file (at least on Windows) does not support wildcards and is very inefficient to use as content blocker unless you want to block several concrete domains.
 
  • Like
Reactions: viivo
like this
Back
Top