<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>Hi, thanks for your reply.</div>
<br>
<div>
<div>Il giorno 30/dic/2011, alle ore 09:43, bert hubert ha scritto:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>On Thu, Dec 29, 2011 at 08:55:57AM +0000, Fabio Sangiovanni wrote:<br>
<blockquote type="cite">am I right thinking this would solve my problem?<br>
</blockquote>
<br>
For now, and for this version of the PowerDNS Recursor, if you set threads<br>
to 1, you will really only get 1 simultaneous Lua session.<br>
</div>
</blockquote>
<div><br>
</div>
<div>Do you mean that this may change in the future?</div>
<div>Will PowerDNS Recursor eventually run more Lua sessions per thread?</div>
<br>
<blockquote type="cite">
<div>However, this is not true in other parts of PowerDNS. In the authoritative<br>
server if you set 'distributor-threads=1' you might still get several<br>
parallel database connections. <br>
</div>
</blockquote>
<div><br>
</div>
<div>It's ok for me, since I'm using the PowerDNS Recursor standalone, without the autoritative server (not useful in my use case).</div>
<div><br>
</div>
<blockquote type="cite">
<div>If you are going to do synchronous SQL updates from Lua, do realize that these<br>
typically cost up to a millisecond including latency.<br>
<br>
This means that your Resolver will peak at 1000 qps.<br>
</div>
</blockquote>
<div><br>
</div>
<div>With just 1 Lua session running I can rework the Lua code: I can schedule the import of data from db every 5 minutes, and use ad in-memory data structure for the computation I need to be done. I can also ditch the synchronous SQL updates, that I used just
 to have consistency between threads (wrong assumption, though).</div>
<div>The performance of course should increase this way, providing that just one PowerDNS thread is ok (the server is a high traffic smtp).</div>
<div>This logic wouldn't work with more than one thread, since each would have its own data structure.</div>
<div><br>
</div>
<blockquote type="cite">
<div><font class="Apple-style-span" color="#007316"><br>
</font>Good luck!<br>
<br>
<span class="Apple-tab-span" style="white-space:pre"></span>Bert<br>
</div>
</blockquote>
</div>
<br>
<div>Thanks!</div>
<div>Fabio</div>
</body>
</html>