负载测试网络应用程序

发布于 2024-09-11 16:39:29 字数 87 浏览 4 评论 0原文

在对基本 Web 应用程序进行负载测试时,除了预期响应时间之外,您还会进行哪些健全性检查?
要求峰值内存使用情况公平吗?
您还进行哪些其他检查?

When load testing a basic web application, what sanity checks do you do other than expected response time?
Is it fair to ask for peak memory usage?
What other checks do you make?

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

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

发布评论

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

评论(4

冷月断魂刀 2024-09-18 16:39:29

在服务器上,

  • 应用程序可以承受每秒
  • 命中数据库的请求数(如果有的话,与上面的数字相关,但将它们作为单独的数字很有用)
  • 传输的带宽(如果可能,按媒体类型分隔)
  • CPU 利用率
  • 内存利用率

在客户端上

  • 响应时间
  • 平均页面的权重
  • CPU 使用率是否在任何时候都很高
  • 运行类似 YSlow 的东西,看看可以对输出进行哪些优化,以加快用户的速度

压力测试工具通常附带大多数这些措施(内存、CPU 和数据库使用情况除外),就像 YSlow 或 Firebug 在客户端上所做的那样。

On the server

  • Requests per second the application can withstand
  • Requests per second that hit the database (if any, related to the number above, but it's useful to have them as separate figures)
  • Transferred bandwidth (separated by media type, if possible)
  • CPU utilization
  • Memory utilization

On the client

  • Response time
  • Weight of the average page
  • Is the CPU usage high at any time
  • Run something like YSlow to see what can you optimize on the output to make it quick for users

Stress testing tools usually come with most of these measures (except for Memory, CPU and database usage), as do YSlow or Firebug do on the client.

热风软妹 2024-09-18 16:39:29

在分析负载测试结果时,我们会考虑各种各样的指标。

在服务器上,我们从这 4 个主要类别开始:

  • CPU(利用率、上下文切换/秒、进程队列长度)
  • 内存(使用率、页面读取/秒、页面写入/秒)
  • 带宽(传入、传出、发送和发送)接收错误、连接数、连接失败、段重新传输/秒)
  • 磁盘(磁盘 I/O 时间 %、平均服务时间、队列长度、读取和写入/秒)

我们还喜欢查看特定于 Web 服务器和应用程序服务器的指标使用。例如,在 IIS 中,我们查看 IIS 连接计数、缓存命中率和周转频率等。在 .NET 中,我们将查看 ASP.NET 请求数/秒、ASP.NET 最后请求执行时间、ASP.NET 当前请求数、ASP.NET 排队请求、ASP.NET 请求等待时间、ASP.NET 错误/秒等等。

在客户端,我们主要关注页面的总加载时间、关键事务的持续时间和 TTFB(第一个字节的时间)、带宽使用情况、平均页面大小和故障率。我们还发现两个非常有用的指标 - 我们称之为等待用户和平均等待时间。没有多少工具具有这些功能 - 它们在每个采样周期准确地告诉您有多少模拟用户正在从服务器检索资源,以及他们平均等待资源到达的时间。我们发现这些对于

  • 确定服务器何时达到其容量、
  • 发现服务器已停止响应某些类型的请求(通常针对某些资源,例如需要数据库查询的资源)非常有用

We look at a pretty wide variety of metrics when analyzing the results of a load test.

On the server, we start with these main 4 categories:

  • CPU (% utilization, context switches/sec, process queue length)
  • Memory (% use, page reads/sec, page writes/sec)
  • Bandwidth (incoming, outgoing, send & receive errors, # connections, connection failures, segment retransmits/sec)
  • Disk (Disk I/O Time %, avg service time, queue length, reads and writes/sec)

We also like look at metrics specific to the webserver and application server in use. For example, in IIS we look at IIS connection counts, cache hit rates and turnover frequency, etc. In .NET, we would be looking at ASP.NET Requests/sec, ASP.NET Last Request Execution Time, ASP.NET Current Requests, ASP.NET Queued Requests, ASP.NET Request Wait Time, ASP.NET Errors/sec and many others.

On the client side, we are primarily looking at total load time for the pages, duration and TTFB (time to first byte) for critical transactions, bandwidth usage, average page size and failure rate. We also find two metrics very useful - we call them Waiting Users and Average Wait Time. Not many tools have these - they tell you at each sample period exactly how many simulated users are in the process of retrieving a resource from the server and how long, on average, they have been waiting for the resource to arrive. We find these very useful for

  • determining when the server has reached its capacity
  • discovering that the server has stopped responding to certain types of requests (typically for certain resources, such as those requiring a database query)
坏尐絯 2024-09-18 16:39:29

另一个好的健全性检查是运行测试至少 24 小时。我们这样做是因为一个应用程序运行良好几个小时,然后就降级了。发现计划任务和数据库连接池的一些问题。

Another good sanity check is to run the tests for at least 24 hours. We do that because one app ran nicely for a few hours then degraded. Discovered some issues with scheduled tasks as well as db connection pooling.

岁月打碎记忆 2024-09-18 16:39:29

有许多在线服务也可以为您进行此类测试。当然,这种方法的缺点之一是很难将来自服务的数据(可以从外部观察到的数据)与您自己的有关磁盘 I/O、DB 操作等的内部数据关联起来。如果您最终走这条路,我建议找到一个供应商,让您能够以编程方式访问原始测试结果数据。

There are a number of services online that can do this type of testing for you as well. Of course, one of the downsides to this approach is that its harder to correlate the data from the service (which is what can be observed externally) with your own internal data about disk I/O, DB ops, etc. If you end up going this route I would suggest finding a vendor that will give you programmatic access to the raw test result data.

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