Each resource has a fixed capability, 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 with the
resourceLoadProtectionEnabled instance property to protect resources from being
overloaded.
Resource usage thresholds also enable Streams to analyze usage and provide recommendations for
PEs restart requests.
You 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 the streamtool commands. This example uses
streamtool commands.
Procedure
- View the current metrics for the resource. Run 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: IBM®
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 description of the threshold properties, run streamtool man
properties.