Azure的缓存(preVIEW)的OutputCache - 高CPU - 慢 [英] Azure Cache (Preview) OutputCache - High CPU - Slow

查看:201
本文介绍了Azure的缓存(preVIEW)的OutputCache - 高CPU - 慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC 4(剃刀)的网站,我已经启用了Azure的缓存(preVIEW)(共置)会议和供应商的OutputCache两种。自从我启用,每个Web请求导致了大规模的CPU穗导致3-5秒页面响应时间,同时调试。

我已经缩小问题下到的OutputCache提供商。如果我在web.config中禁用它,该网站运行的很好。无CPU峰值。我不使用页面输出缓存尚未...所以没有读/写操作应该发生的。会议提供程序运行通过Azure的缓存(preVIEW)的罚款。下面是我的OutputCache配置。如果我禁用它,该网站运行,而无需CPU峰值。有什么想法?

 <&缓存GT;
  <的OutputCache defaultProvider =DistributedCache>
    <供应商>
      <添加名称=DistributedCacheTYPE =Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider,Microsoft.Web.DistributedCachecacheName =默认dataCacheClientName =默认/>
    < /供应商>
  < /&的OutputCache GT;
< /缓存>


解决方案

它出现的问题是由于网络优化框架。它没有对非默认的缓存提供商(例如Azure的缓存preVIEW)启用服务器高速缓存。因此每一个请求时的时间,网络服务器具有重新打包,这是造成在CPU尖峰。 Microsoft.AspNet.Web.Optimization的未来版本应再次启用服务器高速缓存。

这里的问题上codePLEX 的上。

I have an MVC 4 (Razor) website and I've enabled Azure Cache (Preview) (Co-Located) for both the session and the outputCache providers. Since I enabled it, each web request causes a massive CPU spike and results in 3-5 second page response times while debugging.

I have narrowed the problem down to the outputCache provider. If I disable it in the web.config, the site runs great. No CPU spikes. I am not using page output caching yet... so no reads/writes should be occurring. The session provider runs fine via Azure Cache (Preview). Below is my outputCache config. If I disable it, the site runs without CPU spikes. Any thoughts?

<caching>
  <outputCache defaultProvider="DistributedCache">
    <providers>
      <add name="DistributedCache" type="Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider, Microsoft.Web.DistributedCache" cacheName="default" dataCacheClientName="default" />
    </providers>
  </outputCache>
</caching>

解决方案

It appears the issue is due to the Web Optimization Framework. It does not have server caching enabled for non-default cache providers (e.g. Azure Cache Preview). So each time a request is made, the web server has to rebundle which is causing the CPU spikes. A future version of Microsoft.AspNet.Web.Optimization should enable server caching again.

Here's the issue on on CodePlex.

这篇关于Azure的缓存(preVIEW)的OutputCache - 高CPU - 慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆