-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
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
warehousesproperty:- Multiple warehouses can be specified, separated by
,. - The property can be modified.
- Multiple warehouses can be specified, separated by
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_percentis 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_percentsuch that
exclusive_cpu_percent * min_be_cpu_cores < 1,
wheremin_be_cpu_coresis 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 exceedmin_be_cpu_cores - 1.
- When creating or modifying a resource group, it is not allowed to set
-
Issue: after a scale-down operation,
minBeCoresmay 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_percentand the legacycpu_weightcan be set.cpu_weight_percenttakes precedence if present; otherwise,cpu_weightis used.- When using
cpu_weight, settingwarehousesis not allowed.
- Only one of
exclusive_cpu_percentand the legacyexclusive_cpu_corescan be set.exclusive_cpu_percenttakes precedence if present; otherwise,exclusive_cpu_coresis used.- When using
exclusive_cpu_cores, settingwarehousesis not allowed.