简体   繁体   中英

Output Cache Total Hits not being reflected in IIS performance monitor

We use output caching profiles in Web.Config like so:

    <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. We're basically seeing 0s across the board for Output Cache counters (except misses).

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. If I keep them enabled, it will return in 90ms consistently, which isn't super fast, but it's consistently faster than 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.

Hope you had gone through these links. https://serverfault.com/questions/448942/why-is-iis-7-5-flushing-file-cache-very-often . http://www.iis.net/configreference/system.webserver/caching .

It says, you need to use <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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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