[Dnsmasq-discuss] Dnsmasq with Gigantic hosts file

richardvoigt at gmail.com richardvoigt at gmail.com
Wed Jan 11 06:18:15 GMT 2012


On Tue, Jan 10, 2012 at 6:55 PM, Preston Crow <pc-dnsmasq at crowcastle.net> wrote:
> I'm running dnsmasq with a large hosts file, and it's taking about a minute
> to start up, which doesn't seem right.  Specifically, for the first minute
> while it is initializing, it does not respond to DNS requests.  If I attach
> to it with strace, I see it doing a sequence of 4K reads of the hosts file,
> and I can see it slowing down as it progresses.  After every 8 reads, there
> is one brk() syscall.
>
> I assume that the slow part is in processing the hosts that it's reading.
>

[snip]

>
> Any suggestions for how to fix this?

Small host file and use DBus to feed in all the other entries?



More information about the Dnsmasq-discuss mailing list