[bind10-dev] b10-auth query performance: experiments and suggestions
Michal 'vorner' Vaner
michal.vaner at nic.cz
Thu Jan 19 04:43:57 UTC 2012
Hello
On Wed, Jan 18, 2012 at 03:14:42PM -0800, JINMEI Tatuya / 神明達哉 wrote:
> 2. Eliminate the overhead of ASIO wrapper
> We currently use generic {UDP/TCP}Server classes that can support
> recursive resolution in it. Due to the possibility of recursion
> it's inherently inefficient: it involves some temporary resources
> such as output buffer and the message renderer for every query.
> This is an obvious waste for b10-auth because it always handles
> queries sequentially and should be able to reuse such resources.
> I've introduced a "UDPSyncServer", which reuse as much resource as
> possible and never forks itself.
>
> This one with optimization #1 improves max qps about 18% compared
> to the version only with optimization #1 (+45% compared to the
> current).
Is there one global UDPSyncServer wrapper, or one for each listening UDP port? I
wouldn't be sure the asio would work if they shared target memory for multiple
reads.
> I'd also note that this optimization eliminates the need for #1568
> because the new compression logic doesn't use the class that #1568
> optimizes in the first place. That's why I was not so positive
> about doing micro profiling too early (doing measurement itself
> isn't necessarily bad except for the time needed for it, but it
> often leads to jumping to premature micro optimization ideas).
Right, but the temptation to try the optimisation out if it is pointed to by the
profiling and is so easy. Now we at last know what little thinks could help ;-).
And doing the profiling itself is IMO a good thing. Even the macro optimisations
need to be done at places where the code spends time.
With regards
--
This message is encrypted by double rot-13
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20120119/d54bb8d3/attachment.bin>
More information about the bind10-dev
mailing list