[Pdns-users] Performance of LUABackend
fredrik danerklint
fredan-pdns at fredan.org
Thu May 12 21:12:40 UTC 2011
I think I have found the problem with the threads problem. I can now run with
more than one thread in PowerDNS.
However:
One thread:
Queries per second: 23390.092203 qps
Latency: Min: 0.000036 s; Max: 0.020715 s; Avg: 0.000043 s; StdDev: 0.000027
Two threads:
Queries per second: 14893.520674 qps
Latency: Min: 0.000047 s; Max: 0.010805 s; Avg: 0.000067 s; StdDev: 0.000030
And three threads:
Queries per second: 13936.210395 qps
Latency: Min: 0.000047 s; Max: 0.010256 s; Avg: 0.000072 s; StdDev: 0.000054
All cache-values set to zero.
> > > Not yet since it only can handle the "minimal" (ie: no slave, master or
> > > dnssec) or would you like to have this at this stage with just the bare
> > > "minimal" ? If so, no problem. I do need some help to be able to
> > > understand what cause it to crash if there is more than one thread in
> > > PowerDNS. When I tried with luajit for one thread it sad something like
> > > stackoverflow... So I have done something that I don't quiet understand
> > > at this moment.
> >
> > Are you trying to use a single lua_State from multiple threads?
>
> Well, no. It's basiclly an structure in the backend itself so when PowerDNS
> creates new threads, I hope, that the backend structure is a new one and
> not a copy of another one..
>
> cat luabackend.hh:
> class LUABackend : public DNSBackend {
> public:
> lua_State *lua;
> etc...
> }
>
> and I have this in the reload function:
>
> void LUABackend::reload() {
> if (lua)
> lua_close(lua);
>
> lua = lua_open();
>
> etc...
> }
--
//fredan
More information about the Pdns-users
mailing list