简体   繁体   English

输出缓存总命中数未在IIS性能监视器中反映出来

[英]Output Cache Total Hits not being reflected in IIS performance monitor

We use output caching profiles in Web.Config like so: 我们在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>

In perfmon , we're seeing 100% misses (no hits) in Output Cache counters. perfmon ,我们在输出缓存计数器中看到100%未命中(无命中)。 We're basically seeing 0s across the board for Output Cache counters (except misses). 对于输出缓存计数器(除了未命中),我们基本上看到了0。

See screenshot below. 见下面的截图。

输出缓存的性能监视器计数器快照

The kicker is that I'm fairly sure it's enabled. 踢球者是我相当确定它已启用。 If I add enabled="false" to each output cache profile, and then hit a target page, it will return in 300ms consistently. 如果我将enabled="false"添加到每个输出缓存配置文件,然后点击目标页面,它将始终以300毫秒返回。 If I keep them enabled, it will return in 90ms consistently, which isn't super fast, but it's consistently faster than 300ms. 如果我让它们保持启用状态,它将始终以90ms的速度返回,这不是超快,但它始终快于300ms。

Edit: Am I wrong to think that Output Cache * counters are the correct counters? 编辑:我错误地认为输出缓存*计数器是正确的计数器? URI Cache counters seem to have higher hit %, but I thought that was just for IIS URI metadata. URI缓存计数器似乎具有更高的命中率%,但我认为这仅适用于IIS URI元数据。

Hope you had gone through these links. 希望你已经通过这些链接。 https://serverfault.com/questions/448942/why-is-iis-7-5-flushing-file-cache-very-often . https://serverfault.com/questions/448942/why-is-iis-7-5-flushing-file-cache-very-often http://www.iis.net/configreference/system.webserver/caching . http://www.iis.net/configreference/system.webserver/caching

It says, you need to use <caching enabled="true" enableKernelCache="true"> 它说,你需要使用<caching enabled="true" enableKernelCache="true">

But also it says that, this property is by default true, still i would say, give a try! 但它也说,这个属性默认是真的,我仍然会说,试一试!

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

Ah-hah! 啊,哈!

Not to be confused with all the other counters that include Output Cache values, the counter you need to use (in this situation) is the ASP.NET Applications counter. 不要与包含输出缓存值的所有其他计数器混淆,您需要使用的计数器(在这种情况下)是ASP.NET Applications计数器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM