[Dnsmasq-discuss] How does DNSMASQ handle large concurrent configure file updating request requests

Yongkang You yongkang.you at gmail.com
Fri Jan 16 09:25:24 GMT 2015


On Thu, Jan 15, 2015 at 9:56 PM, Simon Kelley <simon at thekelleys.org.uk>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 15/01/15 07:47, Yongkang You wrote:
> > Hi Simon,
> >
> > Thanks for replying. Batching the changes is a very good idea, but
> > it is not easy to implement in IaaS, since the VMs creation
> > processes are handled separately.
> >
> >> From my observation, the burst 10k SIGUSER1 signals will cause
> >> dnsmasq
> > occupying 100% CPUs for several hours. The workload comes from 10k
> > reload events, although the 10k DHCP config entries have been
> > successfully updated in first tens of minutes.
> >
>
> Wow, that's a lot of CPU. How are you synchronising changes to the
> config files which you are re-reading?  That last thing you want is
> race conditions where changes are missed, or half-written files read.
>
> Is there one file per VM (ie ~10000 files, just some of which change)?
> we might have to get more smart about only readng stuff which changes,
> especially as I think there's processing going on at the moment which
> is O(n^2) in the number of configs.
>
>
> Cheers,
>
> Simon.
>


Hi Simon,

10k VMs share same config file. The operation logic is like:
1. update the config file, by adding some specific mac/ip lines. (This step
is mutual between different VM updating)
2. send SIGUSER1 to dnsmasq process.

So, yes you are right. The step 2 might happen when some other VM is adding
config. This might cause some problem.

After all entries are recorded in config file, there might be 40k lines.
Will it become slow when trigger SIGUSER1?

-- 
Yongkang You
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20150116/a403bafc/attachment.html>


More information about the Dnsmasq-discuss mailing list