[Pdns-users] pdns recursor - unthreaded vs threaded operation

Fabio Sangiovanni sangiovanni at nweb.it
Fri Dec 30 09:53:13 UTC 2011


Hi, thanks for your reply.

Il giorno 30/dic/2011, alle ore 09:43, bert hubert ha scritto:

On Thu, Dec 29, 2011 at 08:55:57AM +0000, Fabio Sangiovanni wrote:
am I right thinking this would solve my problem?

For now, and for this version of the PowerDNS Recursor, if you set threads
to 1, you will really only get 1 simultaneous Lua session.

Do you mean that this may change in the future?
Will PowerDNS Recursor eventually run more Lua sessions per thread?

However, this is not true in other parts of PowerDNS. In the authoritative
server if you set 'distributor-threads=1' you might still get several
parallel database connections.

It's ok for me, since I'm using the PowerDNS Recursor standalone, without the autoritative server (not useful in my use case).

If you are going to do synchronous SQL updates from Lua, do realize that these
typically cost up to a millisecond including latency.

This means that your Resolver will peak at 1000 qps.

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).
The performance of course should increase this way, providing that just one PowerDNS thread is ok (the server is a high traffic smtp).
This logic wouldn't work with more than one thread, since each would have its own data structure.


Good luck!

Bert

Thanks!
Fabio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20111230/f8e4aff8/attachment-0001.html>


More information about the Pdns-users mailing list