[Dnsmasq-discuss] excessive cpu consumption in 2.39rc1
simon at thekelleys.org.uk
Sat Apr 14 09:08:16 BST 2007
Carlos Carvalho wrote:
> Simon Kelley (simon at thekelleys.org.uk) wrote on 12 April 2007 22:37:
> >> I found strange that it complained about overflow even without
> >> log-queries and log-dhcp but this only happened right after starting,
> >> so it could be because of the overall load.
> >There are quite a lot of log lines created at startup, so that makes
> >some sense.
> >> I'll turn the logging again and use --log-max=0 to see what happens.
> >OK. I suspect that this a symptom of a loaded system: the trade-off for
> >lost logging is that dnsmasq keeps working fast, without waiting for syslog.
> >If you see messages like this, when dnsmasq shouldn't be logging, that's
> > a bug.
> It happens only at startup so it's ok.
> >Increasing log-max (the default is 5) will reduce the number of lost
> I really have a problem with this new code. The server is loaded and
> dnsmasq takes a long time to answer. I've got some angry users
Dnsmasq tries to limit queue overflows by delaying in the log() routine
for longer and longer times as the queue length increases. That would
explain the long query times, but it's rather strange that it's worse
than with log-max=0, since the queue will only build up (thus causing
delays) when syslogd is slow, and if syslogd is slow, then logging will
block in the log-max=0 case, so that should be slow too.....
> I tried log-max=1000 to no avail. I had to disable logging to restore
> the service (make it fast enough).
I recall that you do lots of logging: log-queries and log-dhcp? Is it
faster with log-max=0?
> It seems that log-max is limited to 25. This shouldn't happen...
> Another alternative would be to disable the new code. In my case
> there's no risk of deadlock because the server that runs syslog (and
> dnsmasq) doesn't use dnsmasq itself, it's only for the clients.
> However setting log-max high enough should have the same effect.
log-max=0 does effectively disable the new behaviour, and I'm starting
to thing that would be a better default, for precisely this sort of reason.
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
More information about the Dnsmasq-discuss