【问题标题】:Windows Azure Caching (Preview) Very SlowWindows Azure 缓存(预览版)非常慢
【发布时间】:2013-12-02 11:49:31
【问题描述】:

我设置了 Windows Azure 缓存,因为我想要一种在多个 Web 角色之间共享实时数据的高性能方式。我已经读过旧的共享缓存访问时间超过 10 毫秒通常表明存在问题,而新的 Windows Azure 缓存预览应该更快。但是,仅从缓存中读取和写入单个值就需要花费一秒钟的时间。我认为这可能是我的设置,所以我运行了 azure 延迟测试项目,我得到的这些时间并没有那么糟糕,但仍然很慢:

1000 Add Operations
    Average cache latency/key: 104.318ms
1000 Get Operations
    Average cache latency/key: 96.881ms
1000 Put Operations
    Average cache latency/key: 105.48ms
BulkGet of 1000 Keys from Local Cache
    Average cache latency/key: 4.641ms
1000 Remove Operations
    Average cache latency/key: 254.14ms

这里是代码的链接,而不是试图发布所有代码,这非常大: http://code.msdn.microsoft.com/windowsazure/Windows-Azure-Cache-c3e80a1f

这是我的 web.config 设置:

  <dataCacheClients>
    <dataCacheClient name="default">

      <autoDiscover isEnabled="true" identifier="X" />

      <localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />


      <securityProperties mode="Message" sslEnabled="false">
        <messageSecurity authorizationInfo="X" />
      </securityProperties>
    </dataCacheClient>
  </dataCacheClients>

我是不是错过了什么,或者这是我可以期待的那种令人沮丧的时期?

【问题讨论】:

  • 不,你不应该期待这样的时间。您的缓存和站点是否位于同一数据中心/区域?
  • 是的,虽然我在本地运行性能应用程序,所以不确定性能与在服务器上运行的性能有多接近。性能应用程序正在使用模拟器,尽管我在没有它的情况下运行了测试,结果更慢。
  • 您是否按照@knightpfhor 的建议在 Azure 上运行了测试?我在 Azure 缓存服务中发现了类似的意外缓慢,但仍在调查中。
  • 在服务器本身上运行速度快 100 倍。

标签: c# performance azure azure-caching


【解决方案1】:

如果我正确阅读了示例,那么您应该在运行测试之前将其部署到 Azure。

缓存服务不适合在部署它的数据中心之外使用,因为这样它的性能就会受到相对高延迟的网络连接的限制。 100 毫秒的平均时间很可能是您与缓存服务之间的网络延迟。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多