docker - 给 docker 分配多少资源
问题描述
我已经使用 docker 玩了几个月了,现在我们已经准备好运行一些生产容器,这让我开始研究基础设施。
它让我想到了一个问题,我需要为 docker 分配多少资源以及应该为操作系统留多少资源。
例如,我的服务器是 8 核 16GB 内存。我应该分配多少给 docker?我显然想分配最大可能,但是在什么时候它自己的服务器性能会下降?
解决方案
Your question is hard to answer, and here's why: "docker" itself doesn't really require much in the way of resources. On the other hand, the applications that you run using docker will have their own requirements.
For example, if you're hosting a multi-terabyte database in a docker container, you're going to require more memory (and probably a lot more storage) than you would for, say, a single wordpress site.
If you're hosting some sort of video transcoding pipeline in Docker, you might end up consuming a lot more of your available CPU.
The only resource that Docker really consumes on its own is the storage space for images and volumes...and again, how much space you need is entirely dependent on how you're using Docker.
It all depends on exactly what you plan on doing with your system.
推荐阅读
- css - 如何在字母之间放置破折号或下划线但低于使用css的其他字母
- ios - SwiftUI“取消绑定”文本字段中的字符串
- c++ - 制作 sfml c++ 滚动条不会在 veiw 内绘制形状
- reactjs - TodoList 应用程序中的重复问题
- sql - sqlite 将毫秒转换为 HH:MM:SS.SSS
- scrapy - 如何在scrapy中点击一个链接,在新页面解析一些数据然后返回上一页继续解析
- r - 情节错误(qs,道具):未使用的参数(道具)
- python - 为什么我有一个简单的应用程序 /xff 问题
- testng.xml - testng.xml 文件不执行所有方法
- javascript - Ant select如何访问key的值