|
| 1 | +--- |
| 2 | +layout: blog |
| 3 | +title: "Kubernetes v1.32:内存管理器进阶至 GA" |
| 4 | +date: 2024-12-13 |
| 5 | +slug: memory-manager-goes-ga |
| 6 | +author: > |
| 7 | + [Talor Itzhak](https://github.com/Tal-or) (Red Hat) |
| 8 | +translator: > |
| 9 | + [Michael Yao](https://github.com/windsonsea) (DaoCloud) |
| 10 | +--- |
| 11 | +<!-- |
| 12 | +layout: blog |
| 13 | +title: "Kubernetes v1.32: Memory Manager Goes GA" |
| 14 | +date: 2024-12-13 |
| 15 | +slug: memory-manager-goes-ga |
| 16 | +author: > |
| 17 | + [Talor Itzhak](https://github.com/Tal-or) (Red Hat) |
| 18 | +--> |
| 19 | + |
| 20 | +<!-- |
| 21 | +With Kubernetes 1.32, the memory manager has officially graduated to General Availability (GA), |
| 22 | +marking a significant milestone in the journey toward efficient and predictable memory allocation for containerized applications. |
| 23 | +Since Kubernetes v1.22, where it graduated to beta, the memory manager has proved itself reliable, stable and a good complementary feature for the |
| 24 | +[CPU Manager](/docs/tasks/administer-cluster/cpu-management-policies/). |
| 25 | +--> |
| 26 | +随着 Kubernetes 1.32 的发布,内存管理器已进阶至正式发布(GA), |
| 27 | +这标志着在为容器化应用实现高效和可预测的内存分配的旅程中迈出了重要的一步。 |
| 28 | +内存管理器自 Kubernetes v1.22 进阶至 Beta 后,其可靠性、稳定性已得到证实, |
| 29 | +是 [CPU 管理器](/zh-cn/docs/tasks/administer-cluster/cpu-management-policies/)的一个良好补充特性。 |
| 30 | + |
| 31 | +<!-- |
| 32 | +As part of kubelet's workload admission process, |
| 33 | +the memory manager provides topology hints |
| 34 | +to optimize memory allocation and alignment. |
| 35 | +This enables users to allocate exclusive |
| 36 | +memory for Pods in the [Guaranteed](/docs/concepts/workloads/pods/pod-qos/#guaranteed) QoS class. |
| 37 | +More details about the process can be found in the memory manager goes to beta [blog](/blog/2021/08/11/kubernetes-1-22-feature-memory-manager-moves-to-beta/). |
| 38 | +--> |
| 39 | +作为 kubelet 的工作负载准入过程的一部分,内存管理器提供拓扑提示以优化内存分配和对齐。这使得用户能够为 |
| 40 | +[Guaranteed](/zh-cn/docs/concepts/workloads/pods/pod-qos/#guaranteed) QoS 类的 Pod 分配独占的内存。 |
| 41 | +有关此过程的细节,参见博客:[内存管理器进阶至 Beta](/blog/2021/08/11/kubernetes-1-22-feature-memory-manager-moves-to-beta/)。 |
| 42 | + |
| 43 | +<!-- |
| 44 | +Most of the changes introduced since the Beta are bug fixes, internal refactoring and |
| 45 | +observability improvements, such as metrics and better logging. |
| 46 | +--> |
| 47 | +自 Beta 以来引入的大部分变更是修复 Bug、内部重构以及改进可观测性(例如优化指标和日志)。 |
| 48 | + |
| 49 | +<!-- |
| 50 | +## Observability improvements |
| 51 | +
|
| 52 | +As part of the effort |
| 53 | +to increase the observability of memory manager, new metrics have been added |
| 54 | +to provide some statistics on memory allocation patterns. |
| 55 | +--> |
| 56 | +## 改进可观测性 {#observability-improvements} |
| 57 | + |
| 58 | +作为提高内存管理器可观测性工作的一部分,新增了一些指标以提供关于内存分配模式的某些统计信息。 |
| 59 | + |
| 60 | +<!-- |
| 61 | +* **memory_manager_pinning_requests_total** - |
| 62 | +tracks the number of times the pod spec required the memory manager to pin memory pages. |
| 63 | +
|
| 64 | +* **memory_manager_pinning_errors_total** - |
| 65 | +tracks the number of times the pod spec required the memory manager |
| 66 | +to pin memory pages, but the allocation failed. |
| 67 | +--> |
| 68 | +* **memory_manager_pinning_requests_total** - |
| 69 | + 跟踪 Pod 规约要求内存管理器锁定内存页的次数。 |
| 70 | + |
| 71 | +* **memory_manager_pinning_errors_total** - |
| 72 | + 跟踪 Pod 规约要求内存管理器锁定内存页但分配失败的次数。 |
| 73 | + |
| 74 | +<!-- |
| 75 | +## Improving memory manager reliability and consistency |
| 76 | +
|
| 77 | +The kubelet does not guarantee pod ordering |
| 78 | +when admitting pods after a restart or reboot. |
| 79 | +
|
| 80 | +In certain edge cases, this behavior could cause |
| 81 | +the memory manager to reject some pods, |
| 82 | +and in more extreme cases, it may cause kubelet to fail upon restart. |
| 83 | +--> |
| 84 | +## 提高内存管理器可靠性和一致性 {#improving-memory-manager-reliability-and-consistency} |
| 85 | + |
| 86 | +kubelet 不保证在 Pod 重启或重新引导后准入 Pod 的顺序。 |
| 87 | + |
| 88 | +在某些边缘情况下,这种行为可能导致内存管理器拒绝某些 Pod, |
| 89 | +在更极端的情况下,可能导致 kubelet 在重启时失败。 |
| 90 | + |
| 91 | +<!-- |
| 92 | +Previously, the beta implementation lacked certain checks and logic to prevent |
| 93 | +these issues. |
| 94 | +
|
| 95 | +To stabilize the memory manager for general availability (GA) readiness, |
| 96 | +small but critical refinements have been |
| 97 | +made to the algorithm, improving its robustness and handling of edge cases. |
| 98 | +--> |
| 99 | +以前,Beta 实现缺乏某些检查和逻辑来防止这些问题的发生。 |
| 100 | + |
| 101 | +为了使内存管理器更为稳定,以便为进阶至正式发布(GA)做好准备, |
| 102 | +我们对算法进行了小而美的改进,提高了其稳健性和对边缘场景的处理能力。 |
| 103 | + |
| 104 | +<!-- |
| 105 | +## Future development |
| 106 | +
|
| 107 | +There is more to come for the future of Topology Manager in general, |
| 108 | +and memory manager in particular. |
| 109 | +Notably, ongoing efforts are underway |
| 110 | +to extend [memory manager support to Windows](https://github.com/kubernetes/kubernetes/pull/128560), |
| 111 | +enabling CPU and memory affinity on a Windows operating system. |
| 112 | +--> |
| 113 | +## 未来发展 {#future-development} |
| 114 | + |
| 115 | +总体而言,未来对拓扑管理器(Topology Manager),特别是内存管理器,会有更多特性推出。 |
| 116 | +值得一提的是,目前的工作重心是将[内存管理器支持扩展到 Windows](https://github.com/kubernetes/kubernetes/pull/128560), |
| 117 | +使得在 Windows 操作系统上实现 CPU 和内存亲和性成为可能。 |
| 118 | + |
| 119 | +<!-- |
| 120 | +## Getting involved |
| 121 | +
|
| 122 | +This feature is driven by the [SIG Node](https://github.com/Kubernetes/community/blob/master/sig-node/README.md) community. |
| 123 | +Please join us to connect with the community |
| 124 | +and share your ideas and feedback around the above feature and |
| 125 | +beyond. |
| 126 | +We look forward to hearing from you! |
| 127 | +--> |
| 128 | +## 参与其中 {#getting-involved} |
| 129 | + |
| 130 | +此特性由 [SIG Node](https://github.com/Kubernetes/community/blob/master/sig-node/README.md) |
| 131 | +社区推动。请加入我们,与社区建立联系,分享你对上述特性及其他方面的想法和反馈。 |
| 132 | +我们期待听到你的声音! |
0 commit comments