调整我部署到 Azure 的 MVC3 应用程序

发布于 2024-11-09 08:46:00 字数 277 浏览 0 评论 0原文

我刚刚将一个使用表存储的 MVC3 应用程序部署到 Windows Azure。性能很慢,我不确定出了什么问题。我正在使用 firebug,它报告在从少于 20 行的表中查找数据时,涉及一些非常简单的基于键的表查找的页面等待大约 2 秒。

有人可以建议我应该检查一些事情吗?例如,部署时是否以调试模式部署?我可以用其他东西来监控性能并检查速度慢的原因怎么样?人们通常使用什么来检查性能。

抱歉,我的问题不是很具体,但这是我第一次部署到生产中,此时我想获得一些有关要研究的内容的提示。

马里塞尔

I just deployed a MVC3 application that uses Table Storage to Windows Azure. Performance is slow and I am not sure what is wrong. I am using firebug and it reports waiting of around 2 seconds for pages that involve some very simple key based table lookup when looking up data from tables with less than 20 rows.

Can someone suggest some things I should check. For example when deployed does it deploy in debug mode? How about other things that I could use to monitor performance and check why things are slow. What do people normally use to check out performance.

Sorry my question is not very specific but this is the first time I have deployed into production and I would at this moment like to get some hints on things to look into.

Maricel

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冷清清 2024-11-16 08:46:00

对于表存储来说,这听起来非常慢。

一些可能需要尝试/检查的事情:

  • 您可以使用本地调试计算实例但使用真正的天蓝色存储密钥来调试应用程序 - 如果您这样做,那么性能如何?
  • 您可以检查您的代码以确认您对 Azure 存储进行了多少次调用吗?
  • 您能否隔离导致问题的原因 - 尤其是是否可以隔离诸如成员资格或会话存储之类的问题,而不是取回特定的行?
  • 您可以调试打印一些有关对 Azure 存储的各个调用所花费的时间的跟踪吗?
  • http://www.microsoft.com/windowsazure/support 上是否报告了任何问题/status/servicedashboard.aspx? (目前我没有看到任何)
  • 您的存储和计算服务是否位于同一个数据中心? (即使不是,我期望性能比您所说的更好)
  • 您可以启用上传到 Azure 存储的 iis 日志吗? - 然后您可以检查 IIS 报告的 http 调用时间。

希望其中一些有所帮助...

This sounds very slow for table storage.

Some possible things to try/check:

  • can you debug the application using your local debug compute instance but using your real azure storage keys - if you do this, then what's the performance?
  • can you check your code over to confirm how many calls you are making to Azure storage?
  • can you isolate what's causing the problems - especially can you isolate if it's something like Membership or Session storage rather than getting your specific rows back?
  • can you debug print some trace about the time individual calls to Azure storage are taking?
  • are there any problems reported on http://www.microsoft.com/windowsazure/support/status/servicedashboard.aspx? (Currently I don't see any)
  • are your storage and compute services located in the same data center? (Even if they weren't I'd expect better performance than you are saying)
  • can you enable iis logs uploaded to Azure Storage? - then you can check the times of your http calls as reported by IIS.

Hope some of those help...

星星的軌跡 2024-11-16 08:46:00

建议:

  • 远程进入实例并监控
    通过 Perfmon 进行性能。有了它,
    你可以看看问题是否出在CPU上
    利用率、IO 或其他内容
  • 您如何读取表存储?您是否可能读取了很多行但只处理了 20 行?或者整个表有20行吗?
  • 当请求发送到存储时,CPU 利用率是否会上升?如果是这样,这可能是因为 Azure 正在序列化表存储中的对象。这些是大物体吗?一个快速提示,请确保让您的代码知道您正在从存储中读取的对象类型,这样它就不必弄清楚它。序列化通常会占用大量 CPU 时间,因为您的代码可能不知道它正在读取的对象类型。 对象的类型

查看上下文对象上的 ResolveType 属性,让您的代码了解它正在处理HTH 的

Suggestions:

  • Remote into the instance and monitor
    performance via Perfmon. With it,
    you can see if the issue is with CPU
    utilization, IO, or anything else
  • How are you reading the table storage? Are you perhaps reading a lot of rows and only processing 20? Or does the whole table have 20 rows?
  • If CPU utilization spikes up when requests are sent to storage? If so, this maybe because Azure is serializing the objects from table storage. Are these big objects? A quick tip, make sure to let your code know what type of an object you're reading from storage, so that it does not have to figure it out. A lot of cpu time is often given to serialization because your code may not know what type of an object it is reading. Look into ResolveType property on the context object to let your code know about the type of an object it is dealing with

HTH

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文