比如我們在machine.config中進行了這樣的設置(8核CPU):
<PRocessModel maxWorkerThreads="100" maxIoThreads="100" minWorkerThreads="50" minIoThreads="50"/>
那如何檢查這個設置是否生效呢?答案是用windbg的!theadpool命令進行查看。
操作步驟如下:
1. 運行windbg,File->Attach a Process,選擇一個w3wp.exe進程,然后點擊OK。
2. 在命令窗口輸入命令:
.load C:/Windows/Microsoft.NET/Framework64/v4.0.30319/sos.dll
3. 接著輸入命令:
!threadpool
得到如下結果:
Worker Thread: Total: 17 Running: 0 Idle: 17 MaxLimit: 800 MinLimit: 400Work Request in Queue: 0--------------------------------------Number of Timers: 2--------------------------------------Completion Port Thread:Total: 2 Free: 2 MaxFree: 16 CurrentLimit: 2 MaxLimit: 800 MinLimit: 400
800=100*8, 400=50*8,設置正確。
新聞熱點
疑難解答