parallel-processingpartitioningactivepivot

How to make ActivePivot post-processors partition aware?


ActivePivot uses partitioning to improve parallelism and that speeds up query execution. However, when doing a query involving a post processed measure, I noticed that the evaluation of the post processor does not benefit from partitioning : parallelism has not been increased.

Is it possible to make the post-processors evaluation partition aware in order to make my queries faster?


Solution

  • Indeed, ActivePivot does take avantages of partitioning to enable multicore scalability, speed up queries and data management and make possible NUMA (Non-uniform memory access) optimization.

    To make the post processor evaluation in parallel, you need to create a AMapReducePostProcessor on top of your post processor. It exists in the core product a simple implementation of this map-reduce post-processor: SimpleDistributedPostProcessor.

    Let's suppose your post processor is defined as follows:

     <measures>
          <postProcessor name="PnL.MyPP" pluginKey="XXX" [...] />
     </measures>
    

    Just add this new post processor:

    <postProcessor name="PnL.MyDistributedPP" pluginKey="SIMPLE_DISTRIBUTED" underlyingMeasures="PnL.MyPP.DIST"/>
    

    Note the underlyingMeasures attribute is equal to PnL.MyPP.DIST; the suffix .DIST is mandatory.

    The evaluation of PnL.MyDistributedPP post processor will be performed on each partition in a distributed fashion and will end the aggregation with theSUM aggregation function. If you want to use an other aggregation function, you can simply change it in the xml post processor declaration.