Skip to content

[Feature] Support warehouses, cpu_weight_percent, exclusive_cpu_weight for resource group #67195

@ZiheLiu

Description

@ZiheLiu

I. Add an optional property warehouses to resource groups.

  • When this property is set, the resource group is effective only in the specified warehouses.
  • Requirements for the warehouses property:
    • Multiple warehouses can be specified, separated by ,.
    • The property can be modified.

II. Change cpu_weight_percent and exclusive_cpu_percent to percentages, allowing values in the range [0, 100].

cpu_weight_percent

  • For the default resource group default_wg, cpu_weight_percent is set to 100.

exclusive_cpu_percent

  • Actual core allocation: on a BE, the actual number of allocated cores is
    $$exclusive\_cpu\_cores = \lfloor exclusive\_cpu\_percent \times be\_cores \rfloor$$

  • Constraints:

    • When creating or modifying a resource group, it is not allowed to set exclusive_cpu_percent such that
      exclusive_cpu_percent * min_be_cpu_cores < 1,
      where min_be_cpu_cores is the minimum number of CPU cores of a single BE among all warehouses bound to this resource group.
    • When creating or modifying a resource group, the sum of
      exclusive_cpu_percent * min_be_cpu_cores
      across all resource groups effective on a warehouse must not exceed min_be_cpu_cores - 1.
  • Issue: after a scale-down operation, minBeCores may become smaller, causing
    exclusive_cpu_percent * minBeCores < 1.

    • Solution: there is no perfect solution; in this case, the resource group can only degrade to a non–hard-isolation resource group on that BE.

Compatibility considerations

  • Only one of cpu_weight_percent and the legacy cpu_weight can be set.
    • cpu_weight_percent takes precedence if present; otherwise, cpu_weight is used.
    • When using cpu_weight, setting warehouses is not allowed.
  • Only one of exclusive_cpu_percent and the legacy exclusive_cpu_cores can be set.
    • exclusive_cpu_percent takes precedence if present; otherwise, exclusive_cpu_cores is used.
    • When using exclusive_cpu_cores, setting warehouses is not allowed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions