Analytics Manager > Working with Flexible Scaling > Create a Quality of Service Rule
Create a Quality of Service Rule
Quality of Service rules evaluate whether an addition or a reduction in capacity is to be requested. A Quality of Service rule includes a pair of expressions, one to request for additional resources, and the other to request for reduction in resources. While creating a Quality of Service rule, ensure that at a given time, at most one of them executes successfully. The range between the threshold values of the pair is the equilibrium zone where the Analytics Manager system meets the computation demand perfectly and an increase or decrease in capacity is not required.
Prerequisites
Analytics Manager provides some out-of-the-box constraints that you must load before you create a Quality of Service rule. If you want, you can also build additional constraints. The Create New Quality of Service Rule wizard factors in these constraints when displaying the various input parameters. Constraints define the permissible values when displaying the following parameters:
Metrics
Synthesizing functions
Threshold operators
Threshold parameters
Use the flexible scaling APIs that are available with Analytics Manager to build customized constraints. For more information, see Managing Customized Flexible Scaling.
* 
Ensure that you have completed the steps in Load Quality of Service Initial Data.
Steps
Complete the following steps to create a Quality of Service (QoS) rule:
1. Use one of the following options to navigate to the Quality of Service Rules page:
From the left navigation pane, select Quality Of Service Rules.
From the Analysis Providers page, select a provider for which you want to enable flexible scaling, and click View. On the selected provider details page, click Quality of Service.
2. Click New to create a QoS rule.
The Create New Quality of Service Rule window is displayed.
3. Click the Information tab, and enter the following information under the General Information section:
a. In the Rule Name (Required) field, enter the name of the rule.
b. In the Description field, enter a description for the rule. This field is optional.
c. In the Analysis Provider (Required) list, select the analysis provider on which you want to evaluate the rule. Ensure that you have already created the provider. For information about creating a provider, see Create an Analysis Provider.
d. In the Activity Type (Required) list, select one of the following types of analysis activity for which the rule is to be applied:
Select Background for asynchronous analysis executions.
Select Interactive for synchronous analysis executions.
Select Stateful for session-based synchronous analysis executions.
e. In the Metric (Required) list, select the attribute against which you want to evaluate the rule. The following out-of-the-box metrics are available:
Activity Type
Metric
Description
Background
ExecutionTime
Specifies the execution time of the jobs in the analysis queue.
WaitingTime
Specifies the time for which the jobs are in the WAITING state before being executed.
WaitingJobs
Specifies the number of jobs that are in the WAITING state.
Interactive
InteractiveSessionDurationLastHour
Specifies the duration of sessions for the last one hour.
Stateful
ActiveSessions
Specifies the number of active sessions.
If you have built customized metrics and added them to a constraint, they are displayed in the Metric (Required) list.
f. In the Synthesizing Function (Required) list, select the function that would be applied to the selected metric. This function depends on the metric and it is used to compare the results against the configured capacity thresholds. The following table provides information about the out-of-the-box functions that correspond to the out-of-the-box metrics:
Metric
Synthesizing Function
ExecutionTime
Average
WaitingTime
Average
WaitingJobs
Count
InteractiveSessionDurationLastHour
Sum
ActiveSessions
Count
If you have built customized synthesizing functions and added them to a constraint, they are displayed in the Synthesizing Function (Required) list.
4. To configure the rule to request for additional resources, click the Add Resource tab, and enter the following information under the Resource Addition Rule section:
* 
The Metric field displays the metric that you had selected earlier.
a. In the Margin Operator (Required) list, select any of the following mathematical operators that you want to operate on the margin:
+
-
*
/
b. In the Margin (Required) field, enter a numeric value that is used to operate on the metric value and compared against the threshold.
c. In the Margin Value Type (Required) list, select one of the following options:
Select Absolute if the specified margin value is to be combined as is with the current metric value.
Select Percent if the specified margin value is to be combined as percent value with the current metric value.
* 
If MV = Current metric value, M= Margin value, and the margin value type is absolute, then the calculated value (CV) is given by:
If CV = Current metric value, M= Margin value, and the margin value type is percent, then the calculated value (CV) is give n by:
The operator “+” in red is changed according to the margin operator selected while configuring the rule.
d. In the Threshold Operator (Required) list, select one of the following options:
Select GreaterThan to compare if the calculated value is greater than the threshold value.
Select LessThan to compare if the calculated value is less than the threshold value.
Analytics Manager provides the following out-of-the-box threshold operators:
=
If you have added the above threshold operators to a constraint, they are displayed in the Threshold Operator (Required) list.
e. In the Threshold (Required) field, enter the threshold value or the threshold parameter based on the constraint that has been defined. The threshold parameters correspond to a metric that you have selected. The following table provides information about the out-of-the-box threshold parameters:
Selected Metric
Threshold Parameter
Description
InteractiveSessionDurationLastHour
AvailableDurationPerHour
Specifies the maximum amount of a time in milliseconds that can be used in job execution. It is given by:
Number of active clients * 60 * 60 * 1000 ms
ActiveSessions
ActiveInstances
Specifies the number of active clients for an analysis provider.
If you have added the above threshold operators to a constraint, they are displayed in the Threshold (Required) list.
* 
If T = threshold value and CV = calculated value, then the rule is met if .
The operator “>” in red is changed according to the threshold operator selected while configuring the rule.
f. In the Frequency (Required) field, enter the number of times that the rule must be consecutively met before firing a capacity increase request. By default, the Quality of Service rule is executed every 1 minute. If you have set the value of this field as 5, and the rule is consecutively met for 5 times, a capacity increase request is fired after 5 minutes.
If at any time the rule is not met, the counter is reset to 0.
5. To configure the rule to request for reduction in resources, click the Reduce Resource tab, and enter the following information under the Resource Reduction Rule section:
* 
The Metric field displays the metric that you had selected earlier.
a. In the Margin Operator (Required) list, select any of the following mathematical operators that you want to operate on the margin:
+
-
*
/
b. In the Margin (Required) field, enter a numeric value that is used to operate on the metric value and compared against the threshold.
c. In the Margin Value Type (Required) list, select one of the following options:
Select Absolute if the specified margin value is to be combined as is with the current metric value.
Select Percent if the specified margin value is to be combined as percent value with the current metric value.
* 
If MV = Current metric value, M= Margin value, and the margin value type is absolute, then the calculated value (CV) is given by:
If CV = Current metric value, M= Margin value, and the margin value type is percent, then the calculated value (CV) is given by:
The operator “+” in red is changed according to the margin operator selected while configuring the rule.
d. In the Threshold Operator (Required) list, select one of the following options:
Select GreaterThan to compare if the calculated value is greater than the threshold value.
Select LessThan to compare if the calculated value is less than the threshold value.
Analytics Manager provides the following out-of-the-box threshold operators:
=
If you have added the above threshold operators to a constraint, they are displayed in the Threshold Operator (Required) list.
e. In the Threshold (Required) field, enter the threshold value or the threshold parameter based on the constraint that has been defined. The threshold parameters correspond to a metric that you have selected. The following table provides information about the out-of-the-box threshold parameters:
Selected Metric
Threshold Parameter
Description
InteractiveSessionDurationLastHour
AvailableDurationPerHour
Specifies the maximum amount of a time in milliseconds that can be used in job execution. It is given by:
Number of active clients * 60 * 60 * 1000 ms
ActiveSessions
ActiveInstances
Specifies the number of active clients for an analysis provider.
* 
If T = threshold value and CV = calculated value, then the rule is met if .
The operator “<” in red is changed according to the threshold operator selected while configuring the rule.
f. In the Frequency (Required) field, enter the number of times that the rule must execute successfully before firing a capacity decrease request. By default, the Quality of Service rule is executed every 1 minute. If you have set the value of this field as 4, and the rule is consecutively met for 4 times, a capacity increase request is fired after 4 minutes.
If at any time the rule is not met, the counter is reset to 0.
6. Click Save.
Was this helpful?