远程 jmeter-server 将所有输出发送到控制 jmeter 实例

发布于 2024-09-27 02:40:09 字数 651 浏览 2 评论 0原文

我的工作场所通过有线互联网连接,上行/下行有限,因此为了对 Web 应用程序进行负载测试,我使用分布式方法:

  • jmeter-server (v2.4) 的实例在具有适当互联网的远程 Linux 机器上运行连接性。
  • 控制 jmeter GUI(也是 2.4)正在我的桌面上运行。
  • 两者通过 VPN 连接。
  • SUT 是托管在另一个数据中心的 Web 应用程序。

这工作正常 - 我能够从 jmeter GUI 启动远程线程执行并在摘要报告中接收实时结果。

奇怪的是,我在 SUT 上施加实际负载的能力受到我的本地互联网连接(入站、下游)的限制。跟踪本地 jmeter GUI 和远程 jmeter-server 之间的链接,我可以看到从 SUT 到 jmeter-server 的所有 HTTP 流量都发送到本地 jmeter GUI。因此,如果 jmeter-server 从 SUT 检索 1MB 文件,则会将其发送到我的本地 jmeter GUI(通过我的慢速互联网链接)。

事情应该是这样吗?我预计只会传输关键的测量结果(成功、延迟等)。

[PS:我知道我可以将我的测试计划 scp 到远程盒子并在无头 jmeter 中运行它。但后来我没有看到实时结果......]

My workplace is connected via cable internet with limited up/downstream, so for load-testing a web application I am using a distributed approach:

  • An instance of jmeter-server (v2.4) is running on a remote linux box which has proper internet connectivity.
  • The controlling jmeter GUI (also 2.4) is running on my desktop.
  • The two are connected via a VPN.
  • The SUT is a web-application hosted in another datacenter.

This works fine - I am able to start the remote thread execution from the jmeter GUI and receive live results in the Summary Report.

The weird part is that my ability to put real load on the SUT is limited by my local internet connection (inbound, downstream). Tracing the link between the local jmeter GUI and the remote jmeter-server, I can see that all HTTP-traffic from SUT towards jmeter-server is sent to the local jmeter GUI. So if the jmeter-server is retrieving a 1MB file from the SUT, it's then sending it to my local jmeter GUI (over my slow internet link).

Is that how it should be? I was expecting that only the key measurements would be transported (success, latency, etc).

[PS: I know I can scp my testplan across to the remote box and run it in a headless jmeter. But then I don't see live results...]

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

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

发布评论

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

评论(3

绝不放开 2024-10-04 02:40:09

这可能是因为您的 jmeter 脚本中有一个“查看树结果”。这告诉服务器将所有响应发送回主服务器,以便您可以查看它们。这将很快填满您的带宽并且占用大量内存。尝试禁用脚本中的所有侦听器,并仅在其中包含“查看聚合结果”侦听器。

在高负载下,您对个别结果不感兴趣。如果您使用 ssl 隧道,也无需在数据中心打开防火墙。我已经在博客文章中记录了这一点,因为我无法在线找到简单的分步说明,您可能也想在 http://rolfje.com/2012/02/16/distributed-jmeter-through-vpn-and-ssl/

This is probably because you are having a "View Tree Results" in your jmeter script. This tells the server to send all responses back to the master so you can view them. That will quickly fill your bandwith and is memory intensive. Try to disable all listeners in your script and only have the "View Aggregate results" one in there.

With high load, you're not interested in individual results. There is also no need to open up your firewall in your datacenter if you use ssl tunneling. I've documented that in a blogpost because I couldn't find a simple step-by-step online, you might want to check that out too at http://rolfje.com/2012/02/16/distributed-jmeter-through-vpn-and-ssl/

黯然#的苍凉 2024-10-04 02:40:09

我建议您将结果写入文件。在此之前,您可以选择通过单击配置按钮和/或检查写入成功/错误到日志来选择/取消选择结果保存配置。通过取消选择结果采样器数据、保存响应消息等,您可以减少发送到控制台的数据量。

I would recommend you to write your results to a file. Before doing so, you can optionally perform a select / deselect of result save configuration by clicking on configure button and/or by checking write success/error to log. By unselecting result sampler data, save response messages etc you can reduce the amount of data being sent to your console.

手心的温暖 2024-10-04 02:40:09

认为按照您的设置方式,Jmeter 的本地实例和远程实例同时运行脚本,因此流量被定向到您的本地盒子。

我发现更有效的方法是远程进入运行 JMeter 的机器。一切都在适当的机器本地,我不必担心瓶颈。

我建议使用一个简单的数据写入器元素,将其保存到远程 Linux 机器上的文件中。

在 GUI 中,您仍然可以只获得汇总报告来关注正在发生的情况。

希望这有帮助。如果没有,我建议发布到 JMeter 用户组:

http://jmeter.512774.n5.nabble .com/

I THINK the way you have it set up, both the Local instance of Jmeter and the remote are running the script at the same time, hence traffic is being directed to your local box.

What I've found to be more effective is to remote INTO the machine running JMeter. Everything is then local to the proper machine, and I don't have to worry about bottle necks.

I would recommend having a simple data writer element that saves to a file on the REMOTE linux box.

In the GUI, you could still have just the aggregate report to keep an eye on what's happening.

Hope this helps. If not, I would recommend posting to the JMeter user group:

http://jmeter.512774.n5.nabble.com/

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