【发布时间】:2021-03-10 22:05:09
【问题描述】:
我正在尝试在我的 .Net Core 应用程序中使用 Thread_UseAllCpuGroups。将框架与 Web.Config 中的设置一起使用,我在 3990x 处理器上使用所有 128 个 CPU 没有问题,但在将其移至 .Net Core 时,它仅使用 64 个内核(1 组)。
我的项目文件部分有以下几行:
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>false</TieredCompilationQuickJit>
<TieredCompilationQuickJitForLoops>false</TieredCompilationQuickJitForLoops>
<gcServer>true</gcServer>
<gcAllowVeryLargeObjects>true</gcAllowVeryLargeObjects>
<GCHeapAffinitizeRanges>0:1-64,1:1-64</GCHeapAffinitizeRanges>
<Thread_UseAllCpuGroups>true</Thread_UseAllCpuGroups>
<GCCpuGroup>true</GCCpuGroup>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
我看到有关设置环境变量的帖子,但我并不需要这种能力,只针对特定项目。与使用框架的详细信息(完美运行)相比,寻找有关 .Net Core 和处理器组的信息的信息有限。
我的理解是这些类型选项从 web.config 的运行时部分移动到项目文件,但我做错了。
如果我有任何关于我在哪里绊倒的想法,我将不胜感激。
【问题讨论】:
标签: c# multithreading asp.net-core