<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 15, 2015 at 9:56 PM, 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"><span class="">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</span><span class="">On 15/01/15 07:47, Yongkang You wrote:<br>
> Hi Simon,<br>
><br>
> Thanks for replying. Batching the changes is a very good idea, but<br>
> it is not easy to implement in IaaS, since the VMs creation<br>
> processes are handled separately.<br>
><br>
>> From my observation, the burst 10k SIGUSER1 signals will cause<br>
>> dnsmasq<br>
> occupying 100% CPUs for several hours. The workload comes from 10k<br>
> reload events, although the 10k DHCP config entries have been<br>
> successfully updated in first tens of minutes.<br>
><br>
<br>
</span>Wow, that's a lot of CPU. How are you synchronising changes to the<br>
config files which you are re-reading? That last thing you want is<br>
race conditions where changes are missed, or half-written files read.<br>
<br>
Is there one file per VM (ie ~10000 files, just some of which change)?<br>
we might have to get more smart about only readng stuff which changes,<br>
especially as I think there's processing going on at the moment which<br>
is O(n^2) in the number of configs.<br>
<br>
<br>
Cheers,<br>
<br>
Simon.<br></blockquote></div><br><br>Hi Simon,</div><div class="gmail_extra"><br></div><div class="gmail_extra">10k VMs share same config file. The operation logic is like:</div><div class="gmail_extra">1. update the config file, by adding some specific mac/ip lines. (This step is mutual between different VM updating)</div><div class="gmail_extra">2. send SIGUSER1 to dnsmasq process.</div><div class="gmail_extra"><br></div><div class="gmail_extra">So, yes you are right. The step 2 might happen when some other VM is adding config. This might cause some problem. </div><div class="gmail_extra"><br></div><div class="gmail_extra">After all entries are recorded in config file, there might be 40k lines. Will it become slow when trigger SIGUSER1? <br clear="all"><div><br></div>-- <br><div class="gmail_signature">Yongkang You</div>
</div></div>