【问题标题】:WCF 4: Default Throttling Settings for WCF ServicesWCF 4:WCF 服务的默认限制设置
【发布时间】:2012-06-20 21:09:17
【问题描述】:

我正在阅读Wenlong Dong's blog article about the default throttling settings for WCF services in WCF 4,并且对默认设置的值有疑问:

MaxConcurrentSessions:默认为 100 * ProcessorCount

MaxConcurrentCalls:默认为 16 * ProcessorCount

MaxConcurrentInstances:默认为以上两者之和,即 遵循与以前相同的模式。

ProcessorCount 指的是:

  1. 物理 CPU/插槽的数量
  2. 所有 CPU 的物理内核数
  3. 逻辑内核的数量(如果启用了超线程)?

谢谢,

-- 帕特里克

【问题讨论】:

    标签: wcf


    【解决方案1】:

    处理器数表示逻辑内核。该值实际上是 System.Environment.ProcessorCount

    提供的值

    【讨论】:

    • 如果启用了超线程,您将看到 cores*2。例如,在我的 i7 机器上,ProcessorCount 为 8,并据此设置了节流。
    • 我有这个值 = 2。我将这一行添加到行为中 然后我打开这个设置并读取其他两个值,它们是 16 和 100,但如果它相乘在环境中的处理器数量上,它将是 32 和 200 为什么我将默认值视为 16 和 100?以这种方式获取其他值 var config = WebConfigurationManager.OpenWebConfiguration("/");
    【解决方案2】:

    【讨论】:

    • 来自第一篇文章:“将 maxConcurrentCalls、maxConcurrentSessions 和 maxConcurrentInstances 设置为大于 16 * CPU 或 CPU 核心数的值。”。他们的例子暗示它是核心的数量,但它是物理核心还是逻辑核心?
    猜你喜欢
    • 2012-02-15
    • 1970-01-01
    • 2011-01-03
    • 2010-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-14
    相关资源
    最近更新 更多