IIS 7 静态页面请求的性能问题

发布于 2024-10-31 01:46:22 字数 662 浏览 3 评论 0原文

我需要帮助提高 IIS Web 服务器的性能。我的简单测试表明,即使是提供静态 HTML 页面,我也无法延长响应时间。

详细信息如下:

我有一个大小约为 20 KB 的静态 HTML 页面,由 IIS 7 及其默认配置提供服务。我正在使用 Microsoft VSTS 2008 测试套件对此静态页面执行负载测试。

以下是负载测试配置:

  1. 5000 个用户的恒定负载模式
  2. 负载测试持续时间 5 分钟
  3. 新用户百分比:100(为了将每个用户视为新用户并且不使用缓存)
  4. Web 测试连接模型:每个用户

的 连接 配置托管 HTML 页面的服务器:

  1. 8 GB RAM
  2. 8 核 Intel Xeon 处理器 (X 2)
  3. Windows Server 2008 R2 Enterprise Edition 操作系统
  4. IIS 7

结果:

请求数/秒 最小 平均 最大 130 310 540

响应时间(秒) 最小 平均 最大 0.51 9.76 18.71

这些似乎是非常低的数字,因为它表明对于 5000 个用户的恒定负载,平均而言,用户必须等待近 10 秒才能获得响应。什么可能导致性能下降?

I need help scaling up the performance of an IIS webserver. My simple tests indicate that I am unable to scale up the response time even for serving static HTML pages.

Details as below:

I have a static HTML page of size about 20 KB getting served from IIS 7 with its default configurations. I am performing a load test on this static page using the Microsoft VSTS 2008 Test Suite.

Following are the load test configurations:

  1. Constant Load Pattern of 5000 users
  2. Load test duration of 5 minutes
  3. Percentage of new users: 100 (in order to treat every user as new and to not use caching)
  4. Web Test Connection Model: Connection per user

Configuration of the server that hosts the HTML page:

  1. 8 GB RAM
  2. 8 core Intel Xeon Processor (X 2)
  3. Windows Server 2008 R2 Enterprise edition operating System
  4. IIS 7

Results:

Requests / Second
Minimum Average Maximum
130 310 540

Response Time (seconds)
Minimum Average Maximum
0.51 9.76 18.71

These seem to be very low numbers, as it indicates that for a constant load of 5000 users, on an average, the users would have to wait for almost 10 seconds to get the response. What could possibly be contributing to this reduction in performance?

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

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

发布评论

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

评论(1

山色无中 2024-11-07 01:46:22

我会查看加载您的服务器的服务器。当 5000 个虚拟用户访问静态 html 页面时,它的 CPU 必须达到最大,这意味着您将等待 CPU 来执行所有任务,包括获取计时数据。当测试像这样“热”运行时,您将不会得到非常有意义的结果。

我对静态 html 的经验是,IIS 7非常擅长针对此类负载进行优化,而实际上,您的瓶颈将在于服务提供商的带宽。

尝试使用逐步添加虚拟用户的测试,从 100 个左右开始,然后不断增加。跟踪您的测试服务器 CPU 并在达到最大值之前检查结果。这将使您清楚地了解可以推出多少个静态页面。

一个更简单的计算是,一旦外部带宽达到 75% 左右,您的某些请求的响应时间将呈指数级增长(大多数请求的响应时间为亚秒级)。

事实上,根据你的数字,我可以猜测两台机器之间有一个 100Mb/s 的网络,这可能是瓶颈。

I would look at the server loading your server. With 5000 virtual users hitting a static html page, it's CPU must be maxed out, meaning that you are getting waits on CPU for all tasks including getting timing data. When the test is running "hot" like this you are not going to get very meaningful results.

My experience with static html is that IIS 7 is very good at optimising for this type of load and in practice you bottleneck will be with the bandwidth to your service provider.

Try using a test the gradually adds virtual users, starting at 100 or so and going up. Keep track of your test servers CPU and check the results when before maxes out. That will give you a good idea of how many of these static pages you can push out.

A simpler calculation is that once you get to 75% or so of external bandwidth you are going to get exponentially increasing response times for some of your requests (most go through sub second).

In fact, based on your numbers I could make a guess that you have a 100Mb/s network between the two machines, which could be the bottleneck.

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