Skip to content

Commit ea90443

Browse files
authored
Merge pull request kubernetes#2708 from cynepco3hahue/update_memory_manager_kep
Graduate memory manager to beta
2 parents 922efbc + 660a2c4 commit ea90443

File tree

3 files changed

+48
-73
lines changed

3 files changed

+48
-73
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
kep-number: 1769
22
alpha:
33
approver: "@deads2k"
4+
beta:
5+
approver: "@deads2k"

keps/sig-node/1769-memory-manager/README.md

Lines changed: 43 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ Memory pinning will be validated for Topology Manager `single-numa-node` and `re
429429

430430
#### Phase 2: Beta (target v1.22)
431431
- Extend E2E test coverage.
432+
- Provide memory manager metrics under pod resources API.
432433
- Feature gate is enabled by default.
433434
- Provide beta-level documentation.
434435

@@ -531,7 +532,7 @@ Yes, the admission flow changes for a pod in Guaranteed QoS class. With the Memo
531532
feature, can it break the existing applications?). -->
532533

533534
* **What happens if we reenable the feature if it was previously rolled back?**
534-
The Memory Manager utlizes State file to track memory assignments. If State file is not valid, it must be removed and kubelet restarted. E.g., State file might become invalid when kube/system reserved have changed (increased), which may lead to a situation when some containers cannot be started.
535+
The Memory Manager utilizes the state file to track memory assignments. If State file is not valid, it must be removed and kubelet restarted. E.g., State file might become invalid when kube/system reserved have changed (increased), which may lead to a situation when some containers cannot be started.
535536

536537
* **Are there any tests for feature enablement/disablement?**
537538
Yes, there is a number of Unit Tests designated for State file validation.
@@ -541,69 +542,65 @@ Yes, there is a number of Unit Tests designated for State file validation.
541542
_This section must be completed when targeting beta graduation to a release._
542543

543544
* **How can a rollout fail? Can it impact already running workloads?**
544-
Try to be as paranoid as possible - e.g., what if some components will restart
545-
mid-rollout?
545+
It is possible that the state file will have inconsistent data during the rollout, because of the kubelet restart, but
546+
you can easily to fix it by removing memory manager state file and run kubelet restart. It should not affect any running
547+
workloads.
548+
546549

547550
* **What specific metrics should inform a rollback?**
551+
The pod may fail with the admission error because the kubelet can not provide all resources aligned from the same NUMA node.
552+
You can see the error message under the pod events.
548553

549554
* **Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?**
550-
Describe manual testing that was done and the outcomes.
551-
Longer term, we may want to require automated upgrade/rollback tests, but we
552-
are missing a bunch of machinery and tooling and can't do that now.
555+
Tested it manually by replacing the kubelet binary on the node with the `Static` memory manager policy, but I failed
556+
to find correct procedure how to test upgrade from 1.21 to my custom build with updated kubelet binary.
553557

554558
* **Is the rollout accompanied by any deprecations and/or removals of features, APIs,
555559
fields of API types, flags, etc.?**
556-
Even if applying deprecation policies, they may still surprise some users.
560+
No.
557561

558562
### Monitoring Requirements
559563

560564
_This section must be completed when targeting beta graduation to a release._
561565

562566
* **How can an operator determine if the feature is in use by workloads?**
563-
Ideally, this should be a metric. Operations against the Kubernetes API (e.g.,
564-
checking if there are objects with field X set) may be a last resort. Avoid
565-
logs or events for this purpose.
567+
The memory manager data will be available under pod resources API. When it configured with the static policy
568+
you will see memory related data during call to the pod resources API List method under the container.
566569

567570
* **What are the SLIs (Service Level Indicators) an operator can use to determine
568571
the health of the service?**
569-
- [ ] Metrics
570-
- Metric name:
571-
- [Optional] Aggregation method:
572-
- Components exposing the metric:
573-
- [ ] Other (treat as last resort)
574-
- Details:
572+
573+
*For cluster admins:*
574+
575+
The assumption that the feature should work, once memory manager static policy and reserved memory flags configured under the kubelet
576+
and kubelet succeeded to restart.
577+
578+
*For a pod author:*
579+
580+
* Pod succeeded to start. You have two options to verify if containers pinned to the NUMA node
581+
- Via pod resources API, you will need to connect to grpc socket and get information from it, see [pod resource API doc page](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources) for more information.
582+
- Checking the relevant container CGroup under the node.
583+
584+
* Pod failed to start because of the admission error.
585+
586+
To understand the reason you will need to check via pod resources API
587+
the amount of allocatable memory and memory reserved by containers.
575588

576589
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
577-
At a high level, this usually will be in the form of "high percentile of SLI
578-
per day <= X". It's impossible to provide comprehensive guidance, but at the very
579-
high level (needs more precise definitions) those may be things like:
580-
- per-day percentage of API calls finishing with 5XX errors <= 1%
581-
- 99% percentile over day of absolute value from (job creation time minus expected
582-
job creation time) for cron job <= 10%
583-
- 99,9% of /health requests per day finish with 200 code
590+
This does not seem relevant to this feature.
584591

585592
* **Are there any missing metrics that would be useful to have to improve observability
586593
of this feature?**
587594
Describe the metrics themselves and the reasons why they weren't added (e.g., cost,
588595
implementation difficulties, etc.).
596+
Currently, for the pod author, it is impossible to know containers NUMA pinning without access to the node.
589597

590598
### Dependencies
591599

592600
_This section must be completed when targeting beta graduation to a release._
593601

594602
* **Does this feature depend on any specific services running in the cluster?**
595-
Think about both cluster-level services (e.g. metrics-server) as well
596-
as node-level agents (e.g. specific version of CRI). Focus on external or
597-
optional services that are needed. For example, if this feature depends on
598-
a cloud provider API, or upon an external software-defined storage or network
599-
control plane.
600-
601-
For each of these, fill in the following—thinking about running existing user workloads
602-
and creating new ones, as well as about cluster-level services (e.g. DNS):
603-
- [Dependency name]
604-
- Usage description:
605-
- Impact of its outage on the feature:
606-
- Impact of its degraded performance or high-error rates on the feature:
603+
No.
607604

608605

609606
### Scalability
@@ -617,45 +614,26 @@ _For GA, this section is required: approvers should be able to confirm the
617614
previous answers based on experience in the field._
618615

619616
* **Will enabling / using this feature result in any new API calls?**
620-
Describe them, providing:
621-
- API call type (e.g. PATCH pods)
622-
- estimated throughput
623-
- originating component(s) (e.g. Kubelet, Feature-X-controller)
624-
focusing mostly on:
625-
- components listing and/or watching resources they didn't before
626-
- API calls that may be triggered by changes of some Kubernetes resources
627-
(e.g. update of object X triggers new updates of object Y)
628-
- periodic API calls to reconcile state (e.g. periodic fetching state,
629-
heartbeats, leader election, etc.)
617+
No.
630618

631619
* **Will enabling / using this feature result in introducing new API types?**
632-
Describe them, providing:
633-
- API type
634-
- Supported number of objects per cluster
635-
- Supported number of objects per namespace (for namespace-scoped objects)
620+
No.
636621

637622
* **Will enabling / using this feature result in any new calls to the cloud
638623
provider?**
624+
No.
639625

640626
* **Will enabling / using this feature result in increasing size or count of
641627
the existing API objects?**
642-
Describe them, providing:
643-
- API type(s):
644-
- Estimated increase in size: (e.g., new annotation of size 32B)
645-
- Estimated amount of new objects: (e.g., new Object X for every existing Pod)
628+
No.
646629

647630
* **Will enabling / using this feature result in increasing time taken by any
648631
operations covered by [existing SLIs/SLOs]?**
649-
Think about adding additional work or introducing new steps in between
650-
(e.g. need to do X to start a container), etc. Please describe the details.
632+
No.
651633

652634
* **Will enabling / using this feature result in non-negligible increase of
653635
resource usage (CPU, RAM, disk, IO, ...) in any components?**
654-
Things to keep in mind include: additional in-memory state, additional
655-
non-trivial computations, excessive access to disks (including increased log
656-
volume), significant amount of data sent and/or received over network, etc.
657-
This through this both in small and large cases, again with respect to the
658-
[supported limits].
636+
No.
659637

660638
### Troubleshooting
661639

@@ -666,20 +644,15 @@ details). For now, we leave it here.
666644
_This section must be completed when targeting beta graduation to a release._
667645

668646
* **How does this feature react if the API server and/or etcd is unavailable?**
647+
No impact.
669648

670649
* **What are other known failure modes?**
671-
For each of them, fill in the following information by copying the below template:
672-
- [Failure mode brief description]
673-
- Detection: How can it be detected via metrics? Stated another way:
674-
how can an operator troubleshoot without logging into a master or worker node?
675-
- Mitigations: What can be done to stop the bleeding, especially for already
676-
running user workloads?
677-
- Diagnostics: What are the useful log messages and their required logging
678-
levels that could help debug the issue?
679-
Not required until feature graduated to beta.
680-
- Testing: Are there any tests for failure mode? If not, describe why.
650+
During the enabling and disabling of the memory manager(changing memory manager policy) you must remove the memory
651+
manager state file(`/var/lib/kubelet/memory_manager_state`), otherwise the kubelet start will fail.
652+
You can identify the issue via check of the kubelet log.
681653

682654
* **What steps should be taken if SLOs are not being met to determine the problem?**
655+
Not applicable.
683656

684657
[supported limits]: https://git.k8s.io/community//sig-scalability/configs-and-limits/thresholds.md
685658
[existing SLIs/SLOs]: https://git.k8s.io/community/sig-scalability/slos/slos.md#kubernetes-slisslos

keps/sig-node/1769-memory-manager/kep.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ owning-sig: sig-node
88
participating-sigs:
99
status: implementable
1010
creation-date: 2020-02-03
11-
last-updated: 2021-02-08
11+
last-updated: 2021-05-11
1212
reviewers:
1313
- "@klueska"
1414
- "@derekwaynecarr"
@@ -25,7 +25,7 @@ stage: alpha
2525
# The most recent milestone for which work toward delivery of this KEP has been
2626
# done. This can be the current (upcoming) milestone, if it is being actively
2727
# worked on.
28-
latest-milestone: "v1.21"
28+
latest-milestone: "v1.22"
2929

3030
# The milestone at which this feature was, or is targeted to be, at each stage.
3131
milestone:
@@ -42,4 +42,4 @@ feature-gates:
4242
disable-supported: true
4343

4444
# The following PRR answers are required at beta release
45-
metrics:
45+
metrics:

0 commit comments

Comments
 (0)