Skip to content

Arm64: Revisit the heuristics for IO completion poller threads #67266

@kunalspathak

Description

@kunalspathak

Today, depending on the number of processors, we create IO completion poller threads. Back then, we did our analysis on older Arm64 machines to come up with the heuristic and they can be different on modern Arm64 machines. We need to revisit them or have some kind of auto-tuning of number of threads creation.

Architecture architecture = RuntimeInformation.ProcessArchitecture;
int coresPerEngine = architecture == Architecture.Arm64 || architecture == Architecture.Arm
? 8
: 30;
return Math.Max(1, (int)Math.Round(Environment.ProcessorCount / (double)coresPerEngine));

int processorsPerPoller =
AppContextConfigHelper.GetInt32Config("System.Threading.ThreadPool.ProcessorsPerIOPollerThread", 12, false);
return (Environment.ProcessorCount - 1) / processorsPerPoller + 1;

Related: #67180

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions