Changing resource usage thresholds
Each resource has a fixed capacity, for example CPU cores. If PEs are placed on a resource that needs more CPU processing power than what is available, the resource becomes overloaded and will have poor performance. You can use resource usage thresholds to identify PE load balancing recommendations or, together with the resourceLoadProtectionEnabled instance property, to directly protect resources from being overloaded.
Resource usage thresholds also enable Streams to analyze usage and provide recommendations for PEs restart requests.
It is recommended to view the metrics for CPU utilization, memory utilization, and network bandwidth utilization, and then set resource usage thresholds for their corresponding properties.
About this task
You can change the resource thresholds in Streams
Console or with streamtool
commands. The following example uses
streamtool
commands.
Procedure
-
View the current metrics for the resource by running the
streamtool capturestate
command. Look for the values of these metrics under the<host>
element:cpuUtilization
memoryUtilization
networkUtilization
Example command:
streamtool capturestate --select hosts=metrics
Example output:
… <metric name="cpuUtilization" lastChangeObserved="1504302827" userDefined="false"> <metricValue xsi:type="streams:longType" value="58"/> </metric> … <metric name="memoryUtilization" lastChangeObserved="1504302827" userDefined="false"> <metricValue xsi:type="streams:longType" value="76"/> </metric> … <metric name="networkUtilization" lastChangeObserved="1504302827" userDefined="false"> <metricValue xsi:type="streams:longType" value="15"/> </metric> …
The values for each metric are percentages of utilization.
Note: Teracloud® Streams assumes that the utilization metrics of all resources are independent. It does not consider whether resources share physical hardware. -
Set the resourceLoadProtectionEnabled instance property.
Example command:
streamtool setproperty instance.resourceLoadProtectionEnabled=true
-
Modify the instances properties for the threshold that you want to change. These
properties are dynamic. The threshold properties apply to the domain unless you specify an
instance.
resourceCpuUsageUpperThreshold
resourceCpuUsageLowerThreshold
resourceMemoryUsageUpperThreshold
resourceMemoryUsageLowerThreshold
resourceNetworkBandwidthUsageUpperThreshold
resourceNetworkBandwidthUsageLowerThreshold
Example command:
streamtool setproperty instance.resourceCpuUsageUpperThreshold=30 instance.resourceCpuUsageLowerThreshold=70
For a description of the threshold properties, run the
streamtool man properties
command.