machine.config processModel autoConfig =“真或假". .NET 4.0中的显式值 [英] machine.config processModel autoConfig="true or false" for Explicit values in .net 4.0

查看:206
本文介绍了machine.config processModel autoConfig =“真或假". .NET 4.0中的显式值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更新服务器的machine.config文件的processModel.当前其值如下:

Hi I want to update processModel of my Server's machine.config file. Currently its value is as below:

  <system.web>
    <processModel autoConfig="true"/>
  </system.web>

我想通过以下新更改对其进行更新:

I want to update it with below new changes:

  <system.web>
    <processModel autoConfig="true"
        maxWorkerThreads = "100"
        maxIoThreads = "100"
        minWorkerThreads = "50"
        minIoThreads = "50"
         />
  </system.web>

我想使用processModel的其他值(请参阅默认值:msdn.microsoft.com/en-us/library/7w2sway1(v=vs.100).aspx)作为默认值,上面已明确定义了这些值. 我在这里有一个问题:autoConfig =的值是什么?"正如互联网上的一些帖子建议autoConfig值必须为"True"(请参见

I want to use other values of processModel (see default values at: msdn.microsoft.com/en-us/library/7w2sway1(v=vs.100).aspx) as Default with the values i have Explicitly defined above. I have a Question here: what will be the value of autoConfig="?" as some post over the internet suggest that autoConfig value must be "True" (please see https://tiredblogger.wordpress.com/2008/09/17/tweaking-net-machineconfig-for-production-deployments/), as autoConfig=True sets everything to the defaults except what I explicitly define.

正如其他文章所建议的那样,必须设置autoConfig = false才能使这些自定义值生效. (请参阅: http://geekswithblogs.net/StuartBrierley/archive/2009/09/30/tuning-iis---machine.config-settings.aspx )

Where as other post suggests that it is necessary to set autoConfig = false in order for these custom values to take effect. (see: http://geekswithblogs.net/StuartBrierley/archive/2009/09/30/tuning-iis---machine.config-settings.aspx )

在MSDN(msdn.microsoft.com/zh-cn/library/7w2sway1(v=vs.100).aspx)中,autoConfig ="true/false"的定义是

In MSDN ( msdn.microsoft.com/en-us/library/7w2sway1(v=vs.100).aspx ), the Definition of autoConfig="true/false" is

autoConfig = True:指示ASP.NET根据计算机配置自动配置上述列表中的属性,以实现最佳性能. autoConfig = False:指示ASP.NET应该为上一个列表中的属性使用显式定义的值.

autoConfig=True: Indicates that ASP.NET automatically configures the attributes in the preceding list to achieve optimal performance based on the machine configuration. autoConfig=False: Indicates that ASP.NET should use the explicitly defined values for the attributes in the preceding list.

这里的另一个问题是:根据MSDN,如果我设置autoConfig = False并显式定义processModel的上述4个键值,那么processModel的其他键(如webGarden,memoryLimit,cpuMask等)的值是什么?我还需要设置processModel的其他键/值吗? 我在iis8 Win Server 2012上托管的asp.net 4.0应用程序的machine.config中使用这些设置.

Another Question here is: As per MSDN, if i set autoConfig=False and Explicitly define my above 4 key values of processModel, what will be the values of other keys of processModel like webGarden, memoryLimit, cpuMask etc.? do i need to set other key/values of processModel as well? I am using these settings in machine.config of asp.net 4.0 application, hosted on iis8 Win Server 2012.

在此先感谢您的帮助.

Thanks in advance for your help.

推荐答案

在此处阅读有关processModel autoConfig = true/false的信息时(MSDN http://support.microsoft.com/?id=821268 ".

When reading about processModel autoConfig=true/false here (MSDN https://msdn.microsoft.com/en-us/library/7w2sway1(v=vs.100).aspx), it says that when this value is true, the five configuration attributes listed here (maxWorkerThreads, maxIoThreads, minFreeThreads, minLocalRequestFreeThreads, and maxConnection) "are set according to the KB article at http://support.microsoft.com/?id=821268".

此外,不可能将minWorkerThreads设置为高于maxWorkerThreads….运行时将检测到不一致情况,只需将"min"值设置为其默认值即可. autoConfig不会直接影响minWorkerThreads和minIoThreads,但它们会受到其对应对象(例如maxWorkerThreads和maxIoThreads)的影响.

Moreover, it is not possible to set minWorkerThreads higher than maxWorkerThreads… The runtime detects the inconsistency and simply set the "min" value to its default. autoConfig does not directly influence minWorkerThreads and minIoThreads, but they are instead affected by their counterparts such as maxWorkerThreads and maxIoThreads.

我用autoConfig = true/false对工作线程的不同值做了很少的测试,以下是它们的结果.

I have done few test with different values of worker threads with autoConfig=true/false, below are their results.

<processModel autoConfig="true"
         />

结果: maxWorkerThreads 400 最大线程数400 minWorkerThreads 4 minIoThreads 4

Result: maxWorkerThreads 400 maxIoThreads 400 minWorkerThreads 4 minIoThreads 4

<processModel autoConfig="false"
         />

结果: maxWorkerThreads 400 最大线程数400 minWorkerThreads 4 minIoThreads 4

Result: maxWorkerThreads 400 maxIoThreads 400 minWorkerThreads 4 minIoThreads 4

<processModel autoConfig="true"
        maxWorkerThreads = "70"
        maxIoThreads = "70"
        minWorkerThreads = "35"
        minIoThreads = "35"
         />

结果: maxWorkerThreads = 400 maxIoThreads = 400 minWorkerThreads = 140 minIoThreads = 140

Result: maxWorkerThreads= 400 maxIoThreads= 400 minWorkerThreads= 140 minIoThreads= 140

<processModel autoConfig="false"
        maxWorkerThreads = "70"
        maxIoThreads = "70"
        minWorkerThreads = "35"
        minIoThreads = "35"
         />

结果: maxWorkerThreads = 280 maxIoThreads = 280 minWorkerThreads = 140 minIoThreads = 140

Result: maxWorkerThreads= 280 maxIoThreads =280 minWorkerThreads= 140 minIoThreads =140

<processModel autoConfig="false"
        maxWorkerThreads = "150"
        maxIoThreads = "150"
        minWorkerThreads = "70"
        minIoThreads = "70"
         />

结果:

maxWorkerThreads= 600
maxIoThreads =600
minWorkerThreads =280
minIoThreads =280


<processModel autoConfig="true"
        maxWorkerThreads = "150"
        maxIoThreads = "150"
        minWorkerThreads = "70"
        minIoThreads = "70"
         />

结果:

maxWorkerThreads= 400
maxIoThreads =400
minWorkerThreads =280
minIoThreads =280

这篇关于machine.config processModel autoConfig =“真或假". .NET 4.0中的显式值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆