K8S必需条件中memory and swap accounting是什么?

阅读: 评论:0

K8S必需条件中memory and swap accounting是什么?

K8S必需条件中memory and swap accounting是什么?

memory and swap accounting是什么?

memory and swap accounting是 统计Linux内核的内存和交换区

为什么需要开启memory and swap?

这是docker官方提示的内容

Adjust memory and swap accounting
When users run Docker, they may see these messages when working with an image:WARNING: Your kernel does not support cgroup swap limit. WARNING: Your
kernel does not support swap limit capabilities. Limitation discarded.
To prevent these messages, enable memory and swap accounting on your system. To enable these on system using GNU GRUB (GNU GRand Unified Bootloader), do the following.Log into Ubuntu as a user with sudo privileges.Edit the /etc/default/grub file.Set the GRUB_CMDLINE_LINUX value as follows:GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
Save and close the file.Update GRUB.$ sudo update-grub
Reboot your system.

这两个特性具体有什么意义,其实我也没搞太清楚。猜测是用来限制一个docker容器的内存使用上限。

开启步骤

开启 memory and swap on system 使用 GNU GRUB (GNU GRand Unified Bootloader),步骤如下:

  1. 使用具有 sudo 权限的用户登录你的系统。
  2. 编辑 /etc/default/grub 文件。
  3. 设置 GRUB_CMDLINE_LINUX 的值如下:
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
  1. 保存并关闭文件。
  2. 更新 GRUB。
$ sudo update-grub

6.重启你的系统

本文发布于:2024-02-01 17:44:21,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170678153238389.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:条件   K8S   memory   accounting   swap
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23