我在ubuntu的mono 4.0.1上运行了一个.net应用程序。
该应用程序是多线程的,但4核心机器上的CPU使用率不超过25%。
我认为mono只是在其中一个内核上运行而不是使用服务器上的所有cpu内核。
我运行了mono profiler,请找到截断的输出
Monitor lock summary
Lock object 0x7f0a621b6f58: 21 contentions
0.000609 secs total wait time, 0.000049 max, 0.000029 average
Lock object 0x7f0a703c9270: 14 contentions
0.000311 secs total wait time, 0.000034 max, 0.000022 average
Lock object 0x7f0a74b8cbc8: 1 contentions
0.000023 secs total wait time, 0.000023 max, 0.000023 average
Lock object 0x7f0a703cae90: 1 contentions
0.000020 secs total wait time, 0.000020 max, 0.000020 average
Lock object 0x7f0a7489c4b0: 1 contentions
0.000017 secs total wait time, 0.000017 max, 0.000017 average
Lock object 0x7f0a703d5c00: 1 contentions
0.000017 secs total wait time, 0.000017 max, 0.000017 average
Lock object 0x7f0a74afdf60: 1 contentions
0.000012 secs total wait time, 0.000012 max, 0.000012 average
Lock object 0x7f0a74b21d60: 1 contentions
0.000010 secs total wait time, 0.000010 max, 0.000010 average
Lock object 0x7f0a74b21ac8: 1 contentions
0.000010 secs total wait time, 0.000010 max, 0.000010 average
Lock contentions: 42
Lock acquired: 42
Lock failures: 0
Thread summary
Thread: 0x7f0a711ff700, name: "Timer-Scheduler"
Thread: 0x7f0a604ff700, name: "Threadpool worker"
Thread: 0x7f0a635de700, name: "Threadpool worker"
Thread: 0x7f0a63dfe700, name: "Threadpool worker"
Thread: 0x7f0a63fff700, name: "Threadpool worker"
Thread: 0x7f0a71786700, name: "Finalizer"
Thread: 0x7f0a75ebb7c0, name: ""
Thread: (nil), name: "Main"
Counters:
Mono System:
User Time : 0.000ms
System Time : 20.000ms
Total Time : 0.000ms
Working Set : 9244672
Private Bytes : 168361984
Virtual Bytes : 214839296
Page Faults : 2742
CPU Load Average - 1min : 0.020000
CPU Load Average - 5min : 0.050000
CPU Load Average - 15min : 0.050000
Mono JIT:
Methods from AOT : 0
Methods JITted using mono JIT : 6
Methods JITted using LLVM : 0
Total time spent JITting (sec) : 0.000597
如何设置单声道以使用服务器上的所有核心?这是在服务器上运行的唯一进程。
由于