Background
While validating Ascend soft slicing, we found a usage pattern that can confuse users.
A workload can be marked for HAMi soft slicing with:
metadata:
annotations:
huawei.com/vnpu-mode: hami-core
However, if the workload requests only memory, for example:
resources:
limits:
huawei.com/Ascend310P: "1"
huawei.com/Ascend310P-memory: "2048"
and does not request the corresponding core resource, users may expect the workload to receive an exact 2048 MB soft-slicing quota.
Observed behavior
In this situation, memory may be calculated by hard-slicing template matching. For Ascend310P, a 2048 MB memory request can match a larger template such as vir01 with 3072 MB, so the actual allocated value may be greater than or equal to the requested value instead of strictly equal to it.
This is surprising from a user perspective because the workload is already annotated with huawei.com/vnpu-mode: hami-core, and users may assume that the memory request alone is enough to express the intended soft-slicing quota.
Suggested improvement
The documentation should make the recommended soft-slicing usage more explicit:
- soft-sliced workloads should request both memory and core resources;
- if only memory is requested, memory may be calculated by hard-slicing template matching, so the actual allocated value may be greater than or equal to the requested value;
- the example should include the corresponding
*-core resource together with *-memory.
I will submit a small documentation PR to clarify this behavior and improve the user experience.
Background
While validating Ascend soft slicing, we found a usage pattern that can confuse users.
A workload can be marked for HAMi soft slicing with:
However, if the workload requests only memory, for example:
and does not request the corresponding core resource, users may expect the workload to receive an exact 2048 MB soft-slicing quota.
Observed behavior
In this situation, memory may be calculated by hard-slicing template matching. For Ascend310P, a 2048 MB memory request can match a larger template such as
vir01with 3072 MB, so the actual allocated value may be greater than or equal to the requested value instead of strictly equal to it.This is surprising from a user perspective because the workload is already annotated with
huawei.com/vnpu-mode: hami-core, and users may assume that the memory request alone is enough to express the intended soft-slicing quota.Suggested improvement
The documentation should make the recommended soft-slicing usage more explicit:
*-coreresource together with*-memory.I will submit a small documentation PR to clarify this behavior and improve the user experience.