Enabling resource load protection for Teracloud® Streams instances
The resource load protection option controls whether overload protection is enabled as determined by the values of three metrics: CPU utilization, memory utilization, and network bandwidth utilization. When you enable resource load protection, Streams prevents additional work (new PEs) from being placed on an overloaded resource.
After you enable resource load protection, you can set overload threshold values for each metric. You set threshold values by modifying the properties that correspond to the metrics. A resource is considered overloaded if any of the values of the three metrics is overloaded. If all the candidate resources for any PE within a job are overloaded, the job submission fails.
About this task
Procedure
- Specify the resourceLoadProtectionEnabled instance property when
you create or update an instance:
streamtool setproperty instance.resourceLoadProtectionEnabled=true
- Customize the overload protection for your circumstances by setting threshold
values.
-
Example 1:
Suppose that you expect that some PEs will have normal CPU usage, greater memory usage, but negligible network usage. You can set the upper thresholds to the following values:
streamtool setproperty instance.resourceCpuUsageUpperThreshold=75
instance.resourceMemoryUsageUpperThreshold=50 instance.resourceNetworkBandwidthUsageUpperThreshold=100
Note: The default value for the upper and lower thresholds is100
.An upper threshold value of
100
skips the protection for that metric's overload.The upper and lower thresholds for each metric work together. If you change an upper threshold for a metric to
75
without changing its lower threshold to less than or equal to75
, you will get an error. Example 2:
Suppose that you expect that memory utilization for a PE will require 30% of the resource's utilization You want the resource protection for memory usage invoked sooner. This is a more conservative approach. You can set the lower threshold to the following value:
The lower threshold setting of 60% protects the memory usage better than a setting of 80%.streamtool setproperty instance.resourceMemoryUsageLowerThreshold=60
-