gpt4 book ai didi

caching - Windows Azure - 角色内缓存、监控

转载 作者:行者123 更新时间:2023-12-02 21:27:32 24 4
gpt4 key购买 nike

我正在尝试启动并运行角色内缓存。

我很难确定缓存是否正在使用(因为我们有一个包装器,如果缓存不可用,它会优雅地返回 null,但很难解决)。

我一直在阅读这些文章: Monitor In-Role Cache In-Role Cache For Windows Azure

我想使用管理控制台检查缓存的读/写或其他指标,作为确定缓存是否正常工作的一种方法。但我没有看到任何地方可以查看这些数据。

角色的添加指标窗口不包含任何缓存数据(尽管我可以看到缓存是在“配置”屏幕上配置的)。

有什么建议吗?我要疯了。

最佳答案

  1. 将diagnostics.wadcfg 添加到您的角色,其中包含您感兴趣的缓存性能计数器,即

    <?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. 重新部署

  3. 在 Azure 管理门户中启用详细监控级别(选项卡配置)
  4. 等待一个小时左右
  5. 现在您的缓存性能计数器应该可以在标签监视器下添加(添加指标对话框)

关于caching - Windows Azure - 角色内缓存、监控,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23145360/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com