[Unbound-users] ~10% performance increase in worker_handle_request()

W.C.A. Wijngaards wouter at nlnetlabs.nl
Fri Jan 24 11:24:29 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Robert,

On 01/06/2014 07:46 PM, Robert Edmonds wrote:
> W.C.A. Wijngaards wrote:
>> However, moving the check after the cache check is not a good
>> idea. The localzone and localdata statements are supposed to be
>> able to override the DNS contents from the internet.  Checking it
>> earlier means that this always happens.  Messing with cache
>> flushes sounds very bad, a query may create a recursive query
>> that would then override the configuration and so on, lots of
>> complexity as well as worries about giving the 'wrong' answers
>> (as compared to the configuration).
> 
> OK, that makes sense.
> 
>> It would be better to optimise the localzone lookup itself
>> somehow. Not sure what the best way is, it is visible that it
>> uses a rbtree now and that this is slower than the hashtable that
>> the other cache employs
> 
> Yes, the problem is not that the localzone lookup occurs first, per
> se, but that the localzone lookup causes measurable contention with
> other threads.

The lock is changed to a rwlock, so that the threads can all acquire
the readlock to answer queries.  That should reduce contention?  The
call order is not changed.

Best regards,
   Wouter

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJS4k1tAAoJEJ9vHC1+BF+ND4AP/0sxah6p+TvkzKkRcwollx82
1ZSoaOL2TAWoF0XNS4w633MbzXm2JfndtwlGDWUQe45bptu1w9ZEhMhRysIU02zi
uA1r0xvSFBXpby//WiFHDTEPOkj8PH3SMz8L/8uvdksw+Sc8V8+hKAuS7qyaQpCw
G1U9BnSCf6K6IQ8Zfcmol+0OfUiGXggzBrzmuTfrf2TFhWk5hNZSnP8gZJ4hY/aS
1f9pGFJReIvL8Zo93BpJJz2h30SVENA7r+8zINynhn3wT11lYsgR9DTxG737HvN7
luLIXxjYZa/iti64I/lfrhb2AIB2v00wewvrR1oBycua+lPEd+PIXQBul0P5UGEC
9BPbadleDwyqpxLDaWZcbOHwZYw64N0PTU3KgzS1kcW+t/adgjXFQ1aVTxWe7251
YWepJLdRlnO8h3Da1hhU+hwBWqlAeNPS8jwf/+lwsXI35CPIFCFXjmIQ5I4x1XOj
c9I6kYGDhAYtdG6fNNrNJMnX/0c0AaUWjyPKWuubUjdnDt4xvya6JQRQMwFjxTTs
+F0omdKROhhjXdQADiJFj91K8RLq0UvSRJThUG2Ii+n6UdsrK7Lz5ZrooTqgAUn3
exj7FbENcwUQSrXzL/fmB4vpku90FvjGzXyPP1g5peOkoxAneqw72LcinDEoFCRl
a+P2XdzCvIxGW91bUjSx
=J+zF
-----END PGP SIGNATURE-----



More information about the Unbound-users mailing list