Skip to content

Clarify memory and core requirements for Ascend soft slicing #101

Description

@fyuan1316

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions