Throttling Properties

All global activities run in parallel. For example, multiple policy in operations that submit and run policies in parallel, each policy creates a PROCESS_POLICY activity. The severe contention in coherence results in an unresponsive server. The throttling process allows multiple parent-level activities to run in parallel, leading to a stable application. The following properties help with this:

  • ohi.processing.concurrentparentactivities.throttle

  • ohi.processing.concurrentparentactivities.throttle.{0}.{1}

  • ohi.processing.max.concurrentparentactivities.size

  • ohi.processing.max.concurrentparentactivities.size.{0}.{1}

thrttling

Properties for Stability

The following properties help with the stability of an application:

  1. ohi.processing.concurrentparentactivities.throttle This property throttles a specified global activity. By default, the global activities that an application spawns do not throttle. This property (ohi.processing.concurrentparentactivities.throttle) throttles all the global activities except the ones that an application spawns.

    This property must be enabled at all time for better stability of the application.

    To enable the throttle process for a specific activity, use the type-specific property ohi.processing.concurrentparentactivities.throttle.{0}.{1}. For example, the extracts activity uses too many resources and overloads the application. To throttle just the Extracts activity without impacting other activities running in parrallel, use the following property:

    ohi.processing.concurrentparentactivities.throttle.SELECT_EXTRACT_ITEMS.GL=true
  2. ohi.processing.concurrentparentactivities.throttle.{0}.{1} This property throttles certain type of the specified activity level. The first placeholder is the activity type code and the second is for activity level.

    Consider a scenario to calculate premium for each group separately among a thousand others. The calculate premium and select transaction activities for each group that run in parallel builds pressure on the application. This situation is overcome by enabling the throttling process for calculate premium and select transaction in set activities as follows:

    • ohi.processing.concurrentparentactivities.throttle.SELECT_TRANSACTIONS_IN_SET.GL=true

    • ohi.processing.concurrentparentactivities.throttle.CALCULATE_PREMIUM.GL=true

    The following is the property to enable throttle for global activities that an application spawns:

    ohi.processing.concurrentparentactivities.throttle.INTEGRATION_OUT_PROCESSING.IC=true

    The property also enables throttle for over multiple levels for an activity type. The following is the property to throttle the calculate premium activity at global and group account level.

    • ohi.processing.concurrentparentactivities.throttle.CALCULATE_PREMIUM.GL=true

    • ohi.processing.concurrentparentactivities.throttle.CALCULATE_PREMIUM.GA=true

  3. ohi.processing.max.concurrentparentactivities.size This property sets the number of global activities that can run in parallel for when the throttling process is enabled, . The global activities that spawn from an application are not impacted by the size limit. However, you can override this behaviour by using the type-specific property ohi.processing.max.concurrentparentactivities.size.{0}.{1}.

The default size is eight. When the minimum size is one, it slows down the processing of other activities that run in parallel. The maximum size must not be over a thousand as the application starts experiencing memory pressure, which impacts the stability of the application. It is recommended to define the size limit based on the suggested formula. You can use the following formula to set a throttling size or consult the support team:

Multiply the number of nodes on a managed server by eight, which is the default thread size per node and two, which is a constant.

So, number of nodes * 8 * 2

Let's take an example, where policies` application runs on four nodes then the optimal size is 4*8*2 = 64.
  • ohi.processing.max.concurrentparentactivities.size.{0}.{1}

The property sets the number of global activities to run in parallel according to an activity type and level. The first placeholder is for the activity type code and the second is for activity level.

Consider a scenario to calculate premium for each group separately within thousands. For example, a set of calculate premium and select transaction activities for multiple groups that run in parallel creates pressure on the application. The throttling process for a type-specific activity overcomes such a situation. For instance, the following property throttles the calculate premium and select transaction in set activities:

  • ohi.processing.max.concurrentparentactivities.size.SELECT_TRANSACTIONS_IN_SET.GL=50

  • ohi.processing.max.concurrentparentactivities.size.CALCULATE_PREMIUM.GL=50

The appropriate size must be defined for an activity based on performance testing.

  • The number of global activities running in parallel must be less than a thousand. For example, consider defining the following properties:

ohi.processing.max.concurrentparentactivities.size.SELECT_TRANSACTIONS_IN_SET.GL=400
ohi.processing.max.concurrentparentactivities.size.CALCULATE_PREMIUM.GL=400
ohi.processing.max.concurrentparentactivities.size.PROCESS_POLICY.GL=400

The number of activities running in parallel sums to 1200 (400*3), processing these puts pressure on the application. Hence, the size limit must be less than a thousand. * If the ohi.processing.max.concurrentparentactivities.size.{0}.{1} property is not defined for an activity type, then the default size set by the ohi.processing.max.concurrentparentactivities.size is considered.

Priority Properties

These properties decide the priority for an activity to process in a queue. The following are the priorities:

  • ohi.processing.throttle.activities.task.priority.{0}.{1}

  • ohi.processing.throttle.activities.task.dequeue.delay.{0}.{1}

Ensure the default values do not change for these properties for an activity.
  • ohi.processing.throttle.activities.task.priority.{0}.{1} This property sets priority of the task in a queue according to an activity type and level. The first placeholder is the activity type code and the second placeholder is the activity level.

This property decides the priority for processing an activity. For example, setting the priority of PROCESS_POLICY activity higher than CALCULATE_PREMIUM activity results in PROCESS_POLICY to process earlier than the CALCULATE_PREMIUM activity. Following are the properties to set priority on the two activities:

  • ohi.processing.throttle.activities.task.priority.CALCULATE_PREMIUM.GL=4

  • ohi.processing.throttle.activities.task.priority.PROCESS_POLICY.GL=2

The priority ranges from zero to nine with zero being the highest and nine being the lowest. By default, all activities or tasks have zero set as their priority, which is the highest unless otherwise defined.
  • ohi.processing.throttle.activities.task.dequeue.delay.{0}.{1} This property sets the time in seconds to delay an activity for a requeue. The first placeholder is the activity type code and the second placeholder is the activity level.

This property defines the delay with which a task re-queuesfor processing. By default, the delay is three seconds which this property can override.

Let us assume, calculate premium activity takes five minutes on an average to complete. Also, twenty calculate premium run in parallel for different group clients with a default throttling size of eight. In this case, only eight calculate premium activities process in parallel and the other twelve remain in queue. The remaining twelve queued activities dequeue themselves every three seconds to check if there is room to process newer activities. Increasing the delay time reduces these frequent checks and thereby reduces the overhead.

Ensure to not change the delay of these properties. The following is a way to delay the dequeue process by ten seconds for the calculate premium activity:

  • ohi.processing.throttle.activities.task.dequeue.delay.CALCULATE_PREMIUM.GL=10

These properties are configurable through an API or via the properties file.