TFS 负载测试 Web 测试
我正在配置负载测试,并对设置感到好奇/困惑。我正在测试一个内联网网站,预计有 6000 个并发用户。我的雇主以前的一些顾问告诉他们,负载测试用户并不重要,我们需要担心每秒的请求数。他们之前确定这 6000 个用户将产生 30 rps,但我觉得这不正确,我们需要证明我们可以超过这个数字。之前的负载测试只设置了200个用户,结果显示确实超过了200rps。他们对结果很满意,但我不这么理解。
我的问题是,如果我们需要支持 6000 个并发用户,我应该将用户设置为 6000 并运行,还是 rps 是一个足够依赖的数据?
I am configuring a load test and am curious/confused on settings. I am testing an intranet website, that is expected to have 6000 concurrent users. My employer had some previous consultant tell them that the load test users does not matter and that we need to worry about requests/second. They have previously determined that those 6000 users would generate 30 rps, while I feel that is not correct we need to show that we can exceed that number. The previous load test was set for only 200 users and the results showed that it did exceed the 200 rps. They were happy with the results, but that is not how I understand this.
My question is, if we need to support 6000 concurrent users should I just set my users to 6000 and run, or is the rps an adequate piece of data to rely on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“虚拟用户”的苹果与真人的橘子确实很难衡量。一个真实的人可能需要几秒钟到几分钟的时间来阅读网页,然后采取一些行动。虚拟用户每隔几秒钟就能够处理一个网页。
为了充分测试,您需要找出真实用户和我们可以使用 Visual Studio 生成的负载之间的公共“工作”单元。顾问可能建议使用 RPS,因为它很容易从任何负载测试及其内部的任何 Web 测试中进行测量。这是一个很好的措施。
RPS 测量的准确性取决于对用户所做的假设。
数学原理有点像:
我有 6000 个用户,他们每天都需要使用该网站。他们大多在早上登录,在早茶前工作一会儿,并在下午 2 点至 3:30 期间更频繁地访问该网站。假设
查看某个站点之前的日志或者只是猜测您可以说:
也许在高峰期,用户每分钟左右都会访问该网站。
据统计,在网站使用高峰期,30% 的用户正在工作。
所以
用户:6000
峰值百分比:30%
RPS/用户:1/60
6000 * 30% * 1/60 = 30 RPS。
因此,如果该网站可以处理 200RPS,我们可以粗略地说,这相当于每分钟有 6000 个用户访问该网站的一个页面。
6000 * 100% * 1/60 = 200 RPS。
当您更改有关真实用户的假设时,RPS 的数量通常会发生巨大变化。
It is really hard to measure the apples of a "Virtual User" with the orange that is a real person. A real person may take seconds to minutes to read a webpage and then take some action. A virtual user will be able to process a webpage every few seconds.
To test adequately you need to figure out a common unit of "work" between real users and the load we can generate with Visual Studio. The consultant probably recommended that RPS be used as it is easy to measure from any loadtest with whatever webtests inside it. It is a good measure.
The accuracy of the RPS measure rests on the assumptions made about your users.
The math works a little like:
I have 6000 users, who need to use the site every day. Mostly they log in in the mornining, work a bit before morning tea and hit the site more heavily from 2pm-3:30pm. Say
Looking at previous logs for a site or just guessing you can say:
Maybe at peak a users hits the site every minute or so.
Figuring at peak site usage 30% of the users are working.
So
Users:6000
Peak percentage: 30%
RPS/users: 1/60
6000 * 30% * 1/60 = 30 RPS.
So if the site can process 200RPS we can roughly say it is equivalent to all 6000 users hitting the site for a page every minute.
6000 * 100% * 1/60 = 200 RPS.
When you change the assumptions about your real users, the number of RPS changes, often dramatically.