9 May
2014
9 May
'14
4:34 p.m.
On Fri, May 09, 2014 at 12:43:11PM -0400, Carl Schaefer wrote:
it appears that getaddrinfo() rescans /etc/hosts in full for each lookup. That's not obviously related to the problem you're having with ntpd, but it does seem that huge ad-blocking host files are horribly inefficient. Does anyone know a way to load them into database of some sort, perhaps a NIS database that could be referenced in /etc/host.conf, e.g. To cache your values of /etc/hosts, you can install a dns server locally (like dnsmasq). That way, dns resolution of cached values are nearly instantaneous, and you can have a lot of dns rules. I have an /etc/hosts of 16M, and yet I have a really fast DNS resolution.