文章出處

比如我們在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: 400
Work 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,設置正確。

【參考資料】

使用Windbg找出死鎖,解決生產環境中運行的軟件不響應請求的問題


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()