Skip to content

Avoid CPU over-use in LDB and LSA

During some customer debugging we noticed, using a FlameGraph, that a lot of time was being spent in talloc_is_parent(), and realised that this was happening for almost 90% of an LDB request. This was not the intention so this patch series addresses that by using talloc_parent() and a comparison.

This also highlighted that the LookupNames4 and LookupSids3 calls did not cache the open of the sam.ldb any longer, so this also addresses that.

Marked Draft only in that I'm trying to double-check the performance in case I've missed something.

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • (optional) This MR is just one part towards a larger feature.
  • (optional, if backport required) Bugzilla bug filed and BUG: tag added
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated
  • CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)

Reviewer's checklist:

  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Andrew Bartlett

Merge request reports