<div dir="ltr">Hi Simon,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>I didn't read the code, but just guess. Do you think if there is any possibility that the event queue doesn't accept other reload events, when last reload event is not finished. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 15, 2015 at 6:10 AM, Simon Kelley <span dir="ltr"><<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Dnsmasq checks for incoming network packets and signals in the same<br>
event loop, so the maximum delay to DHCP packets will be the time to<br>
read a configuration file once, even if you send 10000 SIGUSER1<br>
signals, because the code will interleave handling DHCP and DNS<br>
packets with the config file reading. Batching changes would be good,<br>
if you can do it, but I'd not go looking for trouble here.<br>
<br>
<br>
Cheers,<br>
<br>
Simon.<br>
<div><div class="h5"><br>
On 14/01/15 15:49, Brian Haley wrote:<br>
> On 01/14/2015 04:48 AM, Yongkang You wrote:<br>
>> Hi,<br>
>><br>
>> We have a cloud environment which uses DNSMASQ as DHCP/DNS<br>
>> server; in the cloud, it usually starts lots of VMs concurrently,<br>
>> for example, 10000 VM; for each VM, we will configure a static<br>
>> DHCP entry in DNSMASQ configuration and send SIGUSER1 to reload.<br>
>> we observe DNSMASQ becomes very busy of reloading, for example,<br>
>> it seems to reload 10000 times if we send for 10000 SIGUSER1.<br>
>><br>
>> Is this expected behavior? Is there any way to avoid this?<br>
>> because it keep reloading, we don't know if this will effect VM<br>
>> getting IP address.<br>
><br>
> Just for completeness, is this on Openstack? I can see that code<br>
> doesn't buffer anything when a port is plugged-in, so each triggers<br>
> a reload. Could maybe tweak things there to wait a few seconds<br>
> between the HUPs. I'm not sure it's a bug in dnsmasq though.<br>
><br>
> -Brian<br>
><br>
</div></div>> _______________________________________________ Dnsmasq-discuss<br>
> mailing list <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
><br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1<br>
<br>
iEYEARECAAYFAlS26U0ACgkQKPyGmiibgrcZYACeIJqI+BnUB29af33HWFBTKlZ9<br>
RZgAn1eTCs/D+jrXr7xTh1SNWqADAqn0<br>
=hrhh<br>
-----END PGP SIGNATURE-----<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Yongkang You</div>
</div>