G Appendix – RPASCE Performance TuningTips

This appendix includes tips and information to help you configure the RPASCE application so that it is as efficient as possible. RPASCE provides various configuration controls for fine tuning the execution. For example, for batch rule groups and rule groups that run in system workbook such as Java special expression rule groups, you can add certain rule group properties to achieve better performance. A configurator understands measure data volume and patterns and can choose from the following tips appropriately to apply to their configuration.

Rule Group Properties

This section provides information about rule group properties. All these rule group properties can either be manually configured in ConfigTools or be dynamically set using Tools APIs during the application’s plugin automation.

swaphierorder

Background:

In general, the hierarchy is ordered as clnd/prod/loc. However, for certain special expressions that run in the system workbook, the iteration pattern is, for each PROD,to iterate all LOC positions and cause long run time. To run such an expression efficiently, the hierarchy order must be temporarily modified within the system workbook to use CLND/LOC/PROD instead.

Configuration:

Add a rule group property swaphierorder=prod:loc for this batch rule group

Description:

For the rule group with this property set, when being evaluated in the system workbook, the system workbook will swap the ordering of the two hierarchies within the workbook itself. Consider, for example, if in the PDS, the hierarchy order for prod is 1000, the hierarchy order for loc is 1010, and the rule group A has this property set to prod:loc. Then, when rule group A is evaluated in the system workbook, the order for prod will be 1010 and the order for loc will be 1000. This will cause the arrays within the system workbook to be created with a different dim space in order to optimize the array operations for this rule group A.

Note that this property does not change the hierarchy order within the PDS. This property can also be dynamically set using Tools APIs during the application’s plugin automation.

prerange

Background:

The system workbook for a rule group is built with the complete scope of the PDS. When the calculation in the rule group is restricted to a smaller scope, the configurator can use the mask measure to reduce the scope of the workbook to two levels:

At the partition level, if some partitions are masked off, it can reduce the number of partitions. Within the system workbook, the scope of the dimension can be further reduced by the positions identified by the mask measures, if the mask measure’s base intersection is lower than the partition level, which in most cases is true. With this approach, we can reduce the number of system workbooks to build and reduce the scope within the system workbook.

Rule Group Property Configuration:

Add the rule group property prerange for this batch rule group.

The property prerange must be set in the format of “hierName:measName,hierName:measName...”. For example, "prod:skuMask1,loc:strMask2..."

Description:

If set, and if the rule group is evaluated in a system workbook, the hierarchies in the system workbook will be ranged using the mask measure specified for each hierarchy.

This property can also be dynamically set using Tools APIs during the application’s plugin automation.

purgeflag

Background:

A flag is required to tell RPASCE, for the ranged rule group using “prerange” flag, RPASCE must purge the older data before calculation. When this purgeflag property is not set, RPASCE treat it as “false” (that is, do not purge).

Rule Group Property Configuration:

Add a rule group property purgeflag=true for this batch rule group.

Description:

If set to true, if the rule group is evaluated in a system workbook, then before the system workbook is built, the LHS tables referenced in the rule group will be purged and all rows will be deleted.

This property can also be dynamically set using Tools APIs during the application’s plugin automation.

paralevel

Background:

If the batch rule group is evaluated in a system workbook, also called “syswb”, setting this property can override the parallelization level of the system workbook. This helps in the case that there are some HBI measures on the LHS in a batch rule group, but configurator still wants the sys wb to be parallelized by partition.

Configuration:

Only used on batch rule groups. This property can be set to either the main or main,sub string.

Description:

The value of main means the sys workbook must be partitioned by the main partition level. The value of main,sub means the system workbook must be partitioned by the main partition and the sub partition. If not set, the parallel level will be determined by the rule group's LHS (Lefthand Side) measure's highest common intersection.

The parallel level override can be used to parallelize sys workbooks for rule groups that do involve LHS measures that are HBI measures, but those measures values can be derived correctly within the current partitioned workbook scope, and their values do not need to be committed back to PDS.

syswbflag

Configuration:

Only used on batch rule groups. This rule group property takes a boolean value, true or false, as the value.

Description:

It defaults to false. When set to true, the rule group will be evaluated within the sys workbook, even if the rules in the rule group can be translated. The user can use this property to explicitly run a rule group in the sys workbook.

save_as_staging_id

Background:

If an application calculates a measure X with a large amount of data in a syswb A, the measure data is committed to PDS at the end of the syswb and the syswb is destroyed after use. Then, if the same measure X is used by another rule group evaluated in the syswb B, the measure data must be pulled from PDS. To improve performance, we can configure the first syswb A stored on disk as a staging workbook, then the syswb B can pull measure data X from syswb A directly instead of pulling it from PDS.

Configuration:

Only used on batch rule groups. This property takes a string as input, which will be used as a staging ID.

Description:

If the rule group is evaluated as a sys workbook, after the evaluation is done, instead of removing the sys wb from disk, the sys workbooks will be kept on the disk and in the PDS. Thus, other sys workbooks can pull measure data from the saved system workbook as a staging workbook, identified by the staging ID set. This can greatly improve the sys wb build performance.

save_as_staging_meas

Background:

For the rule group with save_as_staging_id set, by default, all measures within the sys workbook are considered staged. However, if the user only wants a subset of measures to be considered staged, the user can set this property as a comma-separated list of measure names. Therefore, when other system workbooks pull data from the staging workbook, they only pull data for these measures.

Configuration:

Only used on batch rule groups. For example, save_as_staging_meas=”meas1,meas2,meas3”.

Description:

If the user wants to convert an existing stgSwbData utility call that simply stages a vector of measures without a rule group to run as a system workbook, the user can configure a batch rule group with a special expression named "validateSysWbStaging”.

Example

Rule Group batch_stage_1 {

temp <- validateSysWbStaging(A, B, C, D)

}

RHS Measures: a list of measures to be staged. The RHS Measures A, B, C, and D must be either all HBI or all non-HBI measures and cannot mix in the same rule group.

LHS Measure: a placeholder measure that must not have DB, so the staging workbook does not write lock PDS.

The batch rule group batch_stage_1 must specify the save_as_staging_id property so it will be converted to a staging workbook once built.