Re: SW firewall speed drop :-(



Lars-Erik Østerud wrote:

Sebastian G. wrote:

It gets parsed only once. It's the lookup time that goes up when combining it with the caching.

But why doesn't the lookup time go up with the DNS client disabled?
The "hosts" files is still searched (entries in it still does work).

I find it strange that lookup is slower WITH the DNS client. Weird.


That's not weird at all. Just think through what the DNS client does when it receives a request from a program:

1. look it up in the HOSTS lists. If found, return the entry.
2. look it up in the cache. If found, return the entry.
3. query the primary DNS resolver for the entry
4. return the entry
5. if the reply was recursive or redirected, check if the entry isn't already on the HOSTS list
6. store the entry it in the cache

Without the caching:

1. look it up in the HOSTS lists. If found, return the entry.
2. query the primary DNS resolver for the entry
3. return the entry

As you can see, for some code pathes the computitional effort for finding an entry is bigger with caching.

Going through a large HOSTS file is essentially implemented as a linear list search. One could do better, but it's not optimized for the scenario BECAUSE ONLY IDIOTS ABUSE THE HOSTS FILE FOR SOMETHING THAT SHOULD BE DONE WITHIN THE APPLICATION OR AT LEAST AT A PROPER PACKET FILTER.
.



Relevant Pages

  • Stubborn little bugger... Donk.Q
    ... >removal tool didn't pick it up, ... >a scan in safe mode with Norton, ... Check your "hosts" folder, there could be an entry there ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: /etc/inetd.conf entry to block telnet with tcp wrappers
    ... /etc/inetd.conf entry to block telnet with tcp wrappers ... Are you trying to JUST Deny specific hosts and allow the rest? ...
    (AIX-L)
  • Re: XP cant see domain
    ... The fact you had to make an entry in hosts to ping by name is bad news. ... You didn't say if your NT4 server was running WINS. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Printing to remote IP problem
    ... JasperH wrote: ... > Printcap entry on A and B: ... The hosts.equiv file contains a list of trusted hosts. ...
    (comp.unix.tru64)