根據MSDN this文檔中processModel,所述自動配置=真集按照以下屬性與此KB文章:ASP .NET中processModel配置
maxWorkerThreads,maxIoThreads,minFreeThreads,minLocalRequestFreeThreads,MAXCONNECTION
要驗證此設置,我在ASP .NET 3.5有在Page_Load事件下面的代碼示例Web應用程序:
int w, c;
ThreadPool.GetMinThreads(out w, out c);
// Write the numbers of minimum threads
Response.Write("Min: " + string.Format("{0}, {1}", w, c));
w=0;
c = 0;
ThreadPool.GetMaxThreads(out w, out c);
Response.Write(" Max: " + string.Format("{0}, {1}", w, c));
Response.Write(" Maxconnections: " + ServicePointManager.DefaultConnectionLimit);
Configuration conf = ConfigurationManager.OpenMachineConfiguration();
ConfigurationSectionGroup secGrp = conf.SectionGroups["system.web"];
ConfigurationSection sec = secGrp.Sections["httpRuntime"];
Response.Write(" httpruntime settings: " + sec.ElementInformation.Properties["minFreeThreads"].Value + ", " +
sec.ElementInformation.Properties["minLocalRequestFreeThreads"].Value);
Response.Flush();
我得到的弗洛當我AUTOCONFIG運行頁面翼輸出設置爲假,然後設置爲true:
AUTOCONFIG =假:最小:2,2最大:40,40個MAXCONNECTIONS:10個的httpRuntime設置:8,4
autoConfig = true:Min:2,2 Max:200,200 Maxconnections:24 httpruntime設置:8
autoConfig = false按預期工作,默認值可以在輸出中看到,但設置爲真有點驚訝:
- 它確實設置了maxWorkerThreads和maxIoThrea ds屬性正確,因此輸出200(雙核CPU上100x2)。
- 然而,似乎沒有設置minWorkerThreads屬性,該屬性作爲每KB應該是:minWorkerThreads = maxWorkerThreads/2
- 此外,根據MSDN文檔設置AUTOCONFIG =真時,設置minFreeThreads和minLocalRequestFreeThreads屬性KB中推薦的值,但似乎也不是這種情況。我得到8和4的默認值。
我有點困惑,關於這裏發生了什麼的任何想法?我是否有錯誤的樣品?
我試圖提高我的web服務吞吐量(目前僅爲少數用戶獲得100%的CPU負載),並遇到完全相同的問題。 AutoConfig啓用時,我獲得20個MaxWorkerThreads。 – R4cOON 2011-01-17 13:05:47