Docker info 查看报错 WARNING: No swap limit support 解决
docker可以通过启动命令来限制容器可以使用的最大物理内存和swap,但是通常在使用这些命令的时候经常会碰到“WARNING: No swap limit support”警告
大概意思就是不支持swap内存的限制,所以在使用,在国内的腾讯云和阿里云服务器上测试都是报这个警告的。
限制docker容器最大内存使用量
参数:-m 64M --memory-swap=128M
-m 64M 限制了容器运行可以使用的最大物理内存为64M,--memory-swap=128M限制容器可以使用的最大虚拟内存为128M,在出现WARNING: No swap limit support警告时这两个参数是无效的。
解决方法:
1、编辑/etc/default/grub文件。
在GRUB_CMDLINE_LINUX=" ",中并追加 cgroup_enable=memory swapaccount=1
yang@master:~$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration' GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
注:如果GRUB_CMDLINE_LINUX=内有内容,切记不可删除,只需在后面追加cgroup_enable=memory swapaccount=1并用空格和前面的内容分隔开。
2、保存,更新
yang@master:~$ sudo update-grub
3、重启服务器
yang@master:~$ sudo reboot
4、查看
yang@master:~$ docker info
Client:
Context: default
Debug Mode: false
Plugins:
.....
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Docker info 查看报错 WARNING: No swap limit support 解决的更多相关文章
- ubuntu中执行docker info出现警告信息WARNING: No memory limit support 或 WARNING: No swap limit support
docker info 指令报若下错误:WARNING: No memory limit support 或WARNING: No swap limit support 解决方法: 1.打开/etc/ ...
- egg 连接 mysql 的 docker 容器,报错:Client does not support authentication protocol requested by server; consider upgrading MySQL client
egg 连接 mysql 的 docker 容器,报错:Client does not support authentication protocol requested by server; con ...
- Docker运行程序报错 WARNING: IPv4 forwarding is disabled. Networking will not work
WARNING: IPv4 forwarding is disabled. Networking will not work. 第一步:vi /usr/lib/sysctl.d/00-system ...
- docker info 警告"WARNING: No swap limit support"
vim/etc/default/grub 找到 GRUB_CMDLINE_LINUX="" 在双引号里面输入cgroup_enable=memory swapaccount=1 然 ...
- centos 6.5安装docker报错(查看报错详细信息--推荐)
(1)yum安装docker [root@namenode ~]# yum install docker-io (2)启动docker [root@namenode ~]# /etc/init.d/d ...
- Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work.
问题:创建容器的时候报错WARNING: IPv4 forwarding is disabled. Networking will not work. # docker run -it -p 3000 ...
- (TODO:)下载图片,报错:warning: could not load any Objective-C class information from the dyld shared cache. This will significantly reduce the quality of type information available.
想使用NSInvocationOperation下载图片,然而并没有下载下来, NSData为nil, 还有报错:(打断点就报错) warning: could not load any Object ...
- ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE
ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE 打开 /app/base/lib/application/dbtable.php , 替换A ...
- zun 不能创建 docker 容器,报错: datastore for scope "global" is not initialized
问题:zun不能创建docker容器,报错:datastore for scope "global" is not initialized 解决:修改docker 服务配置文件 ...
- 【mysql报错】MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”
MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”在命令行使用密码不安全警 ...
随机推荐
- Spring Boot--自定义异常类
1.业务异常 /** * @Description: 业务异常 * @Author: Yaoson * @Create: 2022/4/21 0:05 **/ public class Busines ...
- [656] C4 Scions Of Destiny Opcodez
[656] C4 Scions Of Destiny Client 00 SendProtocolVersion 01 MoveBackwardToLocation 02 Say 03 Request ...
- IO流(1)
IO流(1) 目录 IO流(1) 文件 创建文件 获取文件信息 目录的操作和文件删除 文件 文件流 文件在程序中以流的形式来操作 输入流:数据从数据源(文件)到程序(内存)的路径 输出流:数据从程序( ...
- Apache和Nginx设置伪静态(URL Rewrite)的方法
在Apache中有两种方法配置,一是通过httpd.conf文件,二是通过.htaccess文件. 使用 httpd.conf 来配置 rewrite 策略. 要使用 httpd.conf 文件来设置 ...
- 用“餐厅打包”的故事说明白Python里面的自定义函数
注:博主并非Python专业程序员,年龄12岁,Python龄不到1岁,才疏学浅,如有错误还请大佬指教! 希望能通过本专栏帮助到一些Python小白! 嗨~大家好!上篇博文咱们说了,万一有一些上万行才 ...
- GIT Authentication failed for错误问题处理
1. Settings ==> Developer settings ==> Personal access tokens ==> Generate new token 生成新的 ...
- idea主题插件 ->Atom Material File Icons
Atom Material File Icons 插件名
- 【B站】B站计算集数时长,调节任意倍速
打开浏览器,任意收藏一个网址,将URL替换为下面的代码并保存 打开任意B站视频页面,点击这个收藏的网址,即可在页面右边看到如下窗口 javascript: (function () { var hou ...
- android9.0之后wifi热点原生接口开发示例
话不多说,直接上代码了,这示例是直接调用原生接口实现的,没有使用反射的方式,如果找不到接口无法编译,请依赖一下对应系统的framewords.jar,并且参考我https://www.cnblogs. ...
- Nuget管理器下载插件出现依赖性相关无法正确下载
话不多说,直接上图: 上面我采用的是PM控制台下载EntityFrameWork最新版本,之所以要这样做,是因为利用Nuget管理器好像不咋管用呀,一直说这个依赖那个依赖啥的,还不如最底层 用命令控制 ...