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

Discussion in 'Networking & Security' started by viivo, Jan 30, 2019.

  1. viivo

    viivo Gawd

    Messages:
    987
    Joined:
    Sep 7, 2005
    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?
     
  2. FNtastic

    FNtastic [H]ard|Gawd

    Messages:
    1,301
    Joined:
    Jul 6, 2013
    I'm going to guess it's negligible. People do the same thing on phones, which are typically much less powerful
     
    viivo likes this.
  3. Dead Parrot

    Dead Parrot 2[H]4U

    Messages:
    2,359
    Joined:
    Mar 4, 2013
    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.
     
    viivo likes this.
  4. tedych

    tedych Limp Gawd

    Messages:
    332
    Joined:
    Jan 18, 2013
    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.
     
    viivo likes this.
  5. RogueTrip

    RogueTrip 2[H]4U

    Messages:
    2,787
    Joined:
    Feb 22, 2003
    If you haven't. Disable dns services in windows services.msc or else...
     
  6. HammerSandwich

    HammerSandwich [H]ard|Gawd

    Messages:
    1,104
    Joined:
    Nov 18, 2004
    Well, Pi-hole uses almost nothing with large lists, so...