Skip to content

Commit

Permalink
doc: balloons memoryTypes option and memory-type annotation
Browse files Browse the repository at this point in the history
Signed-off-by: Antti Kervinen <[email protected]>
  • Loading branch information
askervin authored and klihub committed Nov 8, 2024
1 parent 21c7171 commit a6de9ed
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/resource-policy/policy/balloons.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ Balloons policy parameters:
- `cpuClass` specifies the name of the CPU class according to which
CPUs of balloons are configured. Class properties are defined in
separate `cpu.classes` objects, see below.
- `memoryTypes` is a list of allowed memory types for containers in
a balloon. Supported types are "HBM", "DRAM" and "PMEM". This
setting can be overridden by a pod/container specific
`memory-type` annotation.
- `preferCloseToDevices`: prefer creating new balloons close to
listed devices. List of strings
- `preferCoreType`: specifies preferences of the core type which
Expand Down Expand Up @@ -329,7 +333,9 @@ assigned to the `default` balloon type. Parameters for this balloon
type can be defined explicitly among other balloon types. If they are
not defined, a built-in `default` balloon type is used.

## Disabling CPU or Memory Pinning of a Container
## Pod and Container Overrides to CPU and Memory Pinning

### Disabling CPU or Memory Pinning of a Container

Some containers may need to run on all CPUs or access all memories
without restrictions. There are two alternatives to achieve this:
Expand Down Expand Up @@ -375,6 +381,28 @@ The `hide-hyperthreads` pod annotation overrides the
`hideHyperthreads` balloon type parameter value for selected
containers in the pod.

### Memory Type

If a container must be pinned to specific memory types that may differ
from its balloon's `memoryTypes`, container-specific types can be
given in the `memory-type` pod annotations:

```yaml
memory-type.resource-policy.nri.io/container.CONTAINER_NAME: <COMMA-SEPARATED-TYPES>
memory-type.resource-policy.nri.io/pod: <COMMA-SEPARATED-TYPES>
memory-type.resource-policy.nri.io: <COMMA-SEPARATED-TYPES>
```

The first sets the memory type for a single container in the pod, the
latter two for other containers in the pod. Supported types are "HBM",
"DRAM" and "PMEM". Example:

```yaml
metadata:
annotations:
memory-type.resource-policy.nri.io/container.LLM: HBM,DRAM
```

## Metrics and Debugging

In order to enable more verbose logging and metrics exporting from the
Expand Down

0 comments on commit a6de9ed

Please sign in to comment.