Purpose
Retrieves the maximum CPU and I/O Capacity on Demand (COD) values from the Priority Scheduler.
Definition
CREATE FUNCTION TD_SYSFNLIB.TD_get_COD_limits () RETURNS TABLE ( CPULimit SMALLINT, IOLimit SMALLINT ) . . . ;
Usage Notes
There are two COD modes:
Mode | Description |
---|---|
PM COD | Platform Metering Capacity on Demand (PM COD) sets resource limits on all activities on the node. PM CPU COD uses hardware throttling at the node level. PM I/O COD throttling is done at the disk device level. Both PM I/O COD and WM I/O COD throttling are identical.
|
WM COD | Workload Management Capacity on Demand (WM COD) allows resource limitations to be applied to CPU and I/O for all database activity on the node. WM CPU COD uses software throttling at the node level. WM I/O COD throttling is done at the disk device level. Both PM I/O COD and WM I/O COD throttling are identical.
WM COD Max is the maximum WM COD setting in WM COD mode. If there is a TDWM ruleset that exceeds WM COD Max, a message is logged and WM COD is overridden and set to WM COD Max. |
WM COD mode is enabled on new installations. On upgrades, PM COD mode is enabled. The system can be switched to WM COD mode, which disables PM COD.
- teradata-pme-config-xxx, where xxx is the COD level (for example, 62.5, 75, 87.5, and so on). This package specifies both the CPU and I/O limits.
- teradata-pme-config-cpu-xxx, where xxx is the COD level (for example, 62.5, 75, 87.5, and so on). This package specifies only CPU limits.The CPU and I/O limits are the maximum values specified by the PM COD packages that cannot be exceeded.
- PM COD mode always returns 100% for the CPULimit and IOLimit.
- WM COD mode returns 100% for the CPULimit and IOLimit, if there are no teradata-pme-config packages installed.
- WM COD mode returns less than 100% for CPULimit and IOLimit, depending on the teradata-pme-config-xxx package installed.
- WM COD mode returns less than 100% for CPULimit, depending on the teradata-pme-config-cpu-xxx package installed.
Within Viewpoint you can set the values lower than the WM COD maximum values specified by the PM COD packages in WM COD mode.
If you activate a Teradata dynamic workload management software ruleset that has CPU and I/O values greater than the COD maximum, the Priority Scheduler will replace the CPU and I/O values specified by the installed PM COD packages with the maximum allowable values and log a message in the messages log.
The maximum CPU and I/O COD values are global and not affected by planned environments (OpEnv). If you have multiple planned environments with different WM COD values, this will be honored, but will be limited by the COD max value.
Some PM COD packages, such as teradata-pme-config-62.5 or teradata-pme-config-cpu-87.5, have tenth of a percent CPU limit granularity. For example, if the CPU maximum allowable value is 62.5%, the TD_get_COD_limits function will return 63%.
- For more information about planned environments or how to set CPU and I/O COD values in the Teradata Viewpoint Workload Designer portlet, see Teradata® Viewpoint User Guide, B035-2206.
- For details about how to monitor WM COD and recommendations for applying it, refer to the following Orange Book: Carrie Ballinger, Workload Management Capacity on Demand: Teradata Database 14.10 and Linux SLES 11, Teradata Database Orange Book 541-0010245.
- For details about the Priority Scheduler, refer to the following Orange Book: Carrie Ballinger, Teradata Priority Scheduler for Linux SLES 11, Teradata Orange Book 541-0008867.
Return Value
Output Parameter | Description |
---|---|
CPULimit | The CPU COD maximum value. If the WM COD mode is set and PM COD packages are installed, the CPULimit output parameter returns values less than 100%. The PM COD package specifies the maximum allowable values.
If the PM COD mode is set or there are no PM COD packages installed, the CPULimit output parameter returns 100%. |
IOLimit | The I/O COD maximum value. If the WM COD mode is set and PM COD packages are installed, this output parameter returns values determined by the installed PM COD package. The PM COD package specifies the maximum allowable values.
If the PM COD mode is set or there are no PM COD packages installed, the IOLimit output parameter returns 100%. |
Example: Using TD_get_COD_limits
This example shows how to retrieve the CPU and I/O COD maximum values from the Priority Scheduler.
SELECT * FROM TABLE (TD_SYSFNLIB.TD_get_COD_Limits( ) ) As d; CPULimit IOLimit ----------- ------------ 75 75