[PATCH] Partial fix for DNS performance regression

Garming Sam garming at catalyst.net.nz
Mon Dec 18 00:50:18 UTC 2017


Seeing that the performance hit continues to be non-trivial, we should
probably include an option to simply turn wildcard off. For anyone
actually using wildcard, they will have to enable it (and incur the
performance hit). But for anyone else, is there enough justification for
having it (considering most people up until now haven't seemed to
required it)? 


Cheers,

Garming

On 18/12/17 13:21, Andrew Bartlett via samba-technical wrote:
> The attached patches for master partially address the DNS performance
> regression found in Samba 4.7.3.
>
> In master, a DNS query against a large domain (7000 entries in the
> zone) can take 18 seconds, much longer than the retry timeout (causing
> back-off, retry, much pain).
>
> Master (for 4.8) is already better than 4.7.3 in this area ('only'
> 10s), but these patches avoid the SCOPE_SUBTREE search until the
> wildcard lookup is needed.
>
> The patches for 4.7 include a backport of some already-made
> improvements in Samba's master branch, part of the preparation patches
> for the GUID index mode. 
>
> My rough notes on performance show that the LDB changes save about
> another 20% for NXDOMAIN results, the DNS changes are the source of the
> primary gains. 
>
> For the domain root, 'host domain.com' takes about 100ms in all cases
> after the patch, returning to the baseline seen with 4.7.0. 
>
> However 'host foo.domain.com' takes:
>
> (rough figures)
>  - master:                   270ms
>  - master + patch:           150ms
>  - 4.7.3 (unpatched):       1000ms
>  - 4.7.3 + patch:            340ms
>  - 4.7.3 + DNS changes only: 500ms
>
>  - 4.7.0:                     20ms
>
> We are still an order of magnitude slower with wildcard DNS support
> compared to before we added it, for NXDOMAIN responses.  This isn't OK,
> so we need to keep working on this, but the attached should help for
> now. 
>
> Please review carefully and push the patches to master, then we will
> backport, perhaps for 4.7.4 if we are lucky. 
>
> Thanks,
>
> Andrew Bartlett




More information about the samba-technical mailing list