Dev9 min reading time

Your .NET parallel loop can become serial in a one-CPU container

StackOverflow
Read the full article
Limiting a container to one CPU can nearly double the processing time of a .NET Parallel.ForEachAsync loop, as it restricts concurrency to a single operation despite asynchronous waits. This occurs because .NET uses the CPU count to set the maximum degree of parallelism, which does not account for I/O-bound tasks that can run concurrently without CPU contention.

More in Dev