You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,8 @@ service PodResourcesLister {
197
197
}
198
198
```
199
199
200
+
### `List` gRPC endpoint {#grpc-endpoint-list}
201
+
200
202
The `List` endpoint provides information on resources of running pods, with details such as the
201
203
id of exclusively allocated CPUs, device id as it was reported by device plugins and id of
202
204
the NUMA node where these devices are allocated. Also, for NUMA-based machines, it contains the information about memory and hugepages reserved for a container.
@@ -246,10 +248,35 @@ message ContainerDevices {
246
248
TopologyInfo topology = 3;
247
249
}
248
250
```
251
+
{{< note >}}
252
+
cpu_ids in the `ContainerResources` in the `List` endpoint correspond to exclusive CPUs allocated
253
+
to a partilar container. If the goal is to evaluate CPUs that belong to the shared pool, the `List`
254
+
endpoint needs to be used in conjunction with the `GetAllocatableResources` endpoint as explained
255
+
below:
256
+
1. Call `GetAllocatableResources` to get a list of all the allocatable CPUs
257
+
2. Call `GetCpuIds` on all `ContainerResources` in the system
258
+
3. Subtract out all of the CPUs from the `GetCpuIds` calls from the `GetAllocatableResources` call
0 commit comments