Skip to content

Extension of the Avalanche Scheduler for task-based Conditions handling

Illya Shapoval requested to merge ishapova/Gaudi:sched-cond-up into master

Development:

This MR extends the following parts of the Avalanche Scheduler:

  • Precedence rules graph assembler:
    • added new graph node type: ConditionNode;
    • [@ configuration time] when assembling the graph, condition objects are detected using isRegistered(..) of ICondSvc;
  • [@ run time] Graph traversals:
    • when a ConditionNode is encountered, its validity is checked with isValidID(..) of ICondSvc;
    • if invalid, the visitor applies the pull strategy asking the condition producer to reload/revise the condition ASAP;
    • ASA the condition producer is executed, another visitor notifies all consumers of that condition about its readiness.

The condition-awareness of the scheduler is turned off by default. "EnableConditions = True" turns it on.

Benefits:

The task-based, scheduler-driven condition handling allows to:

  1. Reuse the full functionality of the main scheduler to schedule Conditions handling tasks.
  2. [Throughput] Achieve fine-grained Conditions handling, and thus profit from:
  • better load balancing;
  • CPU time savings in cases where condition handling can be skipped due to control flow implications;
  1. [Throughput] Potentially, improve the quality of scheduling decisions with:
  • more accurate data flow analysis, and thus more efficient induction of task avalanches in proactive regimes;
  • efficient scheduling of blocking condition-handling tasks (e.g., of those that load data from disk, or network)

Note:

It is clear that augmented precedence rules may increase the decision-making time of the scheduler. Further tests made on realistic data processing scenarios will certainly reveal the extent of this. However, trying to stay with the lowest possible decision-making time is not an end in itself. Qualitative improvement of a scheduling decision can lead to quantitative improvements in event processing throughput. As an example, that was the case with more "expensive" proactive scheduling regimes of the Avalanche Scheduler, in which, in the LHCb reconstruction scenario, a ~50% increase in cumulative decision-making time was accompanied by ~10-30% increase in intra-event throughput.

Dependency:

This MR depends on !315 (merged). For standalone testability, this MR includes the latest (as of this writing) version of ICondSvc interface.

Merge request reports