简体   繁体   English

Windows 容器内的物理 memory 限制,带进程隔离

[英]Physical memory limits inside Windows container with process isolation

It seems to be available under Hyper-V isolation mode.它似乎在 Hyper-V 隔离模式下可用。 Is this possible in process isolation mode?这在进程隔离模式下可行吗?

In particular, want to limit under Windows node of Kubernetes.特别要限制在Kubernetes的Windows节点下。 However, physical memory inside the container seems the amount of all memory capacity is allocated, even if set resources: limits: memory: .但是,容器内部的物理 memory 似乎是所有 memory 容量的分配量,即使设置resources: limits: memory:

For Hyper-V isolation mode the memory limit is 1GB.对于 Hyper-V 隔离模式,memory 限制为 1GB。

For process isolation mode it is unlimited so basically the same memory as the host.对于进程隔离模式,它是无限的,因此与主机基本相同的 memory。

You can find more details documented here .您可以在此处找到记录的更多详细信息。

You can set the limits while using docker-compose, for example:您可以在使用 docker-compose 时设置限制,例如:

services:
 mssql:
  image: microsoft/mssql-server-windows-express
  mem_limit: 2048m

would result with 2GB of available memory.将产生 2GB 的可用 memory。

Please let me know if that helped.请让我知道这是否有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM