Skip to content
Snippets Groups Projects

xfr: async free zone

Merged Vitezslav Kriz requested to merge axfr_async_zone_free_rcu_rebase into master

This patch is a proposal for speeding up AXFR of a lot of zones. Same implementation is used for IXFR, but the speeding up is not significant due to flushing zone to journal.

  • valgrind reports tiny memory-leak (< 500 bytes), not solvable, mostly an issue for our integration tests
    • the "leaked" sructures are just pseudo-static objects for further call_rcu() invocations queue processing, see https://bugs.lttng.org/issues/991
    • leak is suppressed in integration tests

Origin: It has been observed with bootstrapping many (>= thousands) zones via AXFR that there is a significant delay in "consume" phase (~ 30 ms in our case). It can be workarounded by increasing the number of background-workers (raised from 1 to 10, caused doubling the delay, put the parallelism speeded it up anyway). The delay was tracked down to synchronize_rcu() in axfr_answer_finalize().

TODO: Open question is which rcu_read_lock actually makes the synchronize_rcu() routines wait and if it couldn't be removed/speed-uped/solved instead.

Suspecting the synchronize_rcu() barrier is there just for safe freeing old zone contents, this patch removes it and with the help of call_rcu (wrapped for cleaner code) makes the freeing asynchronously wait for grace period.

Zone transfer is also slowed down on flushing zone to journal. It is important to disable immediate flushing to journal (don't set zone-file-sync: -1) for speeding up AXFR transfer.

Merge request reports

Pipeline #2311 passed

Pipeline passed for 102c7f4f on axfr_async_zone_free_rcu_rebase

Approval is optional

Merged by (Mar 21, 2025 3:25pm UTC)

Merge details

  • Changes merged into master with b97d9336.
  • Deleted the source branch.

Pipeline #2340 passed

Pipeline passed for b97d9336 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply