【问题标题】:Output Cache Total Hits not being reflected in IIS performance monitor输出缓存总命中数未反映在 IIS 性能监视器中
【发布时间】:2014-09-04 23:57:20
【问题描述】:

我们在 Web.Config 中使用输出缓存配置文件,如下所示:

    <caching>
        <outputCacheSettings>
            <outputCacheProfiles>
                <clear />
                <add name="CacheHourly" location="Server" duration="3600" varyByParam="*" varyByCustom="IsMobile" />
                <add name="CacheDaily" location="Server" duration="86400" varyByParam="*" varyByCustom="IsMobile" />
            </outputCacheProfiles>
        </outputCacheSettings>
    </caching>

perfmon 中,我们看到输出缓存计数器中有 100% 未命中(无命中)。我们基本上看到了输出缓存计数器的全面 0(未命中除外)。

请看下面的截图。

关键是我相当确定它已启用。如果我将enabled="false" 添加到每个输出缓存配置文件,然后点击目标页面,它将始终在 300 毫秒内返回。如果我保持启用它们,它将始终在 90 毫秒内返回,这不是超快,但始终比 300 毫秒快。

编辑:我认为 Output Cache * 计数器是正确的计数器是错误的吗? URI 缓存计数器的命中率似乎更高,但我认为这仅适用于 IIS URI 元数据。

【问题讨论】:

    标签: iis iis-8 outputcache perfmon


    【解决方案1】:

    希望您已经浏览了这些链接。 https://serverfault.com/questions/448942/why-is-iis-7-5-flushing-file-cache-very-oftenhttp://www.iis.net/configreference/system.webserver/caching.

    上面说,你需要使用&lt;caching enabled="true" enableKernelCache="true"&gt;

    但它也说,这个属性默认为真,我还是会说,试试看!

    关于性能计数器,您正在研究正确的指标。 https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/852720c8-7589-49c3-a9d1-73fdfc9126f0.mspx?mfr=true

    【讨论】:

      【解决方案2】:

      啊哈!

      不要与包含输出缓存值的所有其他计数器混淆,您需要使用的计数器(在这种情况下)是 ASP.NET Applications 计数器。

      【讨论】:

        猜你喜欢
        • 2023-03-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-03-12
        • 1970-01-01
        • 1970-01-01
        • 2023-04-03
        相关资源
        最近更新 更多