[Dnsmasq-discuss] excessive cpu consumption in 2.39rc1
Simon Kelley
simon at thekelleys.org.uk
Thu Apr 12 22:37:34 BST 2007
Carlos Carvalho wrote:
> Simon Kelley (simon at thekelleys.org.uk) wrote on 12 April 2007 18:19:
> >Carlos Carvalho wrote:
> >> I've been using rc1 without problems but today I noticed a big cpu
> >> consumption. I also get many of these messages in the log:
> >>
> >> dnsmasq[6137]: overflow: 27 log entries lost
> >>
> >> I disabled log-queries and log-dhcp and still get them(?!). Any ideas
> >> about what's going on?
> >
> >Is the CPU being used by dnsmasq, or is the machine busy because of
> >other load?
>
> At that moment it was both.
>
> >That message is given by the latest code when is cannot log
> >stuff fast enough, which could be because syslogd is not running fast
> >enough, or the disk is too busy to write the logs. If you do --log-max=0
> >then the old, blocking behaviour is restored, so that you'll be able to
> >see what dnsmasq was trying to log.
>
> >If the extra CPU load comes from dnsmasq, there might be a bug in the
> >new logging code. Are you using syslog, or syslog-ng?
>
> syslog. Didn't have time to change yet.
>
> 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.
Increasing log-max (the default is 5) will reduce the number of lost
messages.
Cheers
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
More information about the Dnsmasq-discuss
mailing list