From @sebastienros :
First thing I found is that the runtime is getting the quotas from the global cgroup, and not from a custom one that it could run from.
When we use “docker --cpus" it’s actually defining the quotas in the global cgroup files, and this is these files that the runtime is reading. In my services I was creating named groups, and starting the process using these. What I was seeing is that dotnet was not respecting the values, and either on 3.0 or 3.1 I would see 12 processors. This might be another issue we want to track, as it’s not respecting the “current” cgroups that is associated to a process, but only the system one.