linux - VM 或 Hypervisor 中的 Linux 内核配置范围
问题描述
在生产中,我们将部署一个 redis 服务器,并且需要overcommit_memory=1
在内核中设置和禁用透明大页面。
问题是目前我们只有一台巨型服务器,并且要被许多其他应用程序共享。我们只想要 redis 服务器中的那些内核配置。我想知道我们是否可以通过为 redis 启动专用 VM 来实现它。在 docker 中这样做当然没有意义。我的问题是:
即使主机操作系统没有相同的配置,这些内核配置是否会在 redis VM 中实际生效?我对此表示怀疑,因为硬件资源最终是由主机分配的。
redis 虚拟机中的内核配置会影响运行其他应用程序的其他虚拟机吗?我认为不会,只是想确认一下。
为了实现这个目标,我们应该使用什么样的虚拟机或管理程序?
如果在 VM 中无法做到这一点,那么为 redis 配备单独的服务器(硬件)是唯一的方法吗?
解决方案
If you're running a real kernel on a virtual machine, the VM should be able to correctly handle overcommitted memory.
The host server will grant a fixed chunk of memory to the VM. The VM should manage that memory as it sees fit, including overcommitting its own address space.
This will not affect other applications running on the host (apart from the fact that is has less memory available). If it does, there is a problem with your hypervisor.
This should work with any Hypervisor. KVM is a good place to start.
Note that I have not actually tried this -- experiment results are welcome!
推荐阅读
- python - 我需要一个由调用组成的列表,例如 os.system('ls' + path)
- docker - 无法在 Azure 容器实例中进行 DNS 查找 - Windows 容器
- julia - 如何绘制混合整数问题结果?
- regex - 如何为 .htaccess 编写 RewriteRules?
- python - Mongodb如何更新许多并设置特定于id的配置文件
- python - sklearn中的logloss和Pytorch中的BCEloss之间的区别?
- python - 将 PCA 应用于一个样本
- php - 如何从mysql数据库中提取while循环中的数组值
- c# - 在 IIS Express,VS 2017 中运行网站时出现未处理的访问异常
- php - 登录时不断收到“密码错误”