Skip to content

Container CPU limits not supported by .NET runtime in process isolation mode -- Windows containers #46889

@richlander

Description

@richlander

We intend to support container limits on both Linux and Windows. It appears that we don't have support for process-isolated containers on Windows. That should be resolved.

In particular, CPUs are not being honored for process-isolated Windows containers. They should behave the same way as Linux containers. We need to fix that. Let's start with .NET 6.0, and then look at backporting needs.

Update -- The new behavior is defined at #53149. CPU and memory limits are now honored for Windows process-isolated containers. Previously, only memory-limits were honored.

Command used in each example:

docker run --rm -p 8080:80 -m 80 --cpus 1 mcr.microsoft.com/dotnet/samples:aspnetapp

Windows process-isolated behavior:

image

Note: My local machine is on insider builds, and so doesn't support process-isolated containers of any kind. This example is from a Windows Server 2019 Azure VM. The examples below are from my local machine. That's why they look different.

Windows Hyper-V-isolated behavior:

image

Linux behavior:

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions