首页 > 学院 > 开发设计 > 正文

用windbg检查.NET线程池设置

2019-11-17 03:26:17
字体:
来源:转载
供稿:网友

比如我们在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,设置正确。


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表