Search code examples
cachingazureazure-cachingazure-diagnostics

Windows Azure - In-Role Caching, Monitoring


I'm attempting to get In-Role Caching up and running.

I'm having difficulty determining if the cache is being used (as we've got a wrapper around it that gracefully returns null if the cache isn't available--but makes it hell to sort out).

I've been going over these articles: Monitor In-Role Cache In-Role Cache For Windows Azure

I'd like to use the management console to check on reads/writes or other metrics on the cache as a means of determining if the cache is working properly. But I don't see anywhere to view this data.

The add metric window for the role doesn't include any cache data (though I can see that the cache is configured on the Configure screen).

Any advice? I'm going nuts here.


Solution

    1. Add diagnostics.wadcfg to your role with cache performance counters you are interested in i.e.

      <?xml version="1.0" encoding="utf-8"?>
      <DiagnosticMonitorConfiguration configurationChangePollInterval="PT1M" overallQuotaInMB="4096" xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
        <DiagnosticInfrastructureLogs />
        <Directories>
          <CrashDumps container="wad-crash-dumps" />
        </Directories>
        <Logs bufferQuotaInMB="1024" scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Error" />
        <WindowsEventLog bufferQuotaInMB="1024" scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Error">
          <DataSource name="Application!*" />
        </WindowsEventLog>
        <PerformanceCounters bufferQuotaInMB="512" scheduledTransferPeriod="PT5M">
          <PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Available Cache Item Percentage" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Cache Miss Percentage" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Throttled Connections Count" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Allocated Cache Item Count" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Cache Misses /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Client Requests /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Connections Count" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Failure Exceptions /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Get Misses /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Get Requests /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total GetAndLock Requests /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Notification Delivered /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Object Count" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Objects Returned /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Read Requests /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Requests Served /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Retry Exception /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Successful GetAndLock Requests /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Write Operations /sec" sampleRate="PT3M"/>
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Available Cache Item Percentage" sampleRate="PT3M"/>
        </PerformanceCounters>
      </DiagnosticMonitorConfiguration>
      
    2. Redeploy

    3. Turn on verbose monitoring level in azure management portal (tab configure)
    4. Wait an hour or so
    5. Now your cache performance counters should be available to add under tab monitor (add metrics dialog)