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.”在命令行使用密码不安全警 ...
随机推荐
- Linux 命令 diff
比较两个文件不同 $ diff file1 file2 比较两个目录不同 $ diff --brief --recursive dir1/ dir2/ --brief 仅显示有无差异,不显示详细的信息 ...
- Mysql-不同场景下操作/查询数据库表
1. 通过关联字段把一张表的字段值更新另一张表的字段值 update table_a a, table_b b set a.username = b.username where a.id = b.i ...
- C#校验GPS数据
从#或$后开始,到*之前是GPS数据,*之后是校验位. public bool Verified(string gps) { gps = gps.TrimStart('#', '$'); var s ...
- Python的入门学习Day 14~15——form”夜曲编程“
Day 14 time: 2021.8.11. 原文再续,输接上一回.在数据结构之上,我们又开启了新一章"循环"的学习.而今天,我们首先学习了"for"循环 ...
- JAVA的作用
JAVA的用途广泛:1 .银行系统,政企信息系统,支付系统,大数据平台,网站平台. 2 .Saas云,手机app,云管理系统后台,电商系统后台,桌面工具. JAVA和PYTHON的抉择:JAVA是C语 ...
- Go--生成excel表格,读取excel表格数据
先下载第三方依赖包: go get -u github.com/xuri/excelize/v2 代码: package main import ( "fmt" "git ...
- win10 U盘重装系统
1.做好U盘 2.F7选择U盘启动,不用F2切换启动顺序 3.IQY一键安装 4.重启前拔掉U盘 5.如果重启后蓝屏显示 恢复,重新进入PE使用 windows引导恢复,再重新启动
- 剑指 Offer 栈与队列
09. 用两个栈实现队列 没啥意思 不要想复杂了 就是暴力 class CQueue { public: CQueue() { } /* 一个主栈 一个缓存栈 来回导 得到队头 copy后一端变空了 ...
- Ginan-PEA例程下载
输入以下命令可在Ubuntu系统中进行下载,但受到网络限制并不能有效下载或者下载很慢 python3 scripts/download_examples.py 通过阅读python脚本,可将下载网址拷 ...
- 开启Runjar , 使用beeline连接hive
要先开启hadoop服务 进入root用户hive目录 输入bin/hiveservices.sh stop 停止 输入bin/hiveservices.sh start ...