简体   繁体   English

我们基于 Java 的 web 应用程序的吞吐量随着更高的并发性而变慢

[英]Throughput of our Java based web application is slowing down with higher concurrency

We got Jmeter performance results for our Java based web application which looks like below - We ran 30 mins test with 50 Users and 50 Threads and another test with 100 users and 100 Threads.我们得到了基于 Java 的 web 应用程序的 Jmeter 性能结果,如下所示 - 我们用 50 个用户和 050 个用户和另一个线程测试运行了 30 分钟 10 线程测试。 We observed the Elapsed Time for both 50 Users and 100 Users Run.我们观察了 50 个用户和 100 个用户运行的经过时间。 Under 50 Users test elapsed time consistently remains the same. 50 名以下用户测试经过的时间始终保持不变。 However under 100 Users, for the first 10 minutes API response times are good but then suddenly start to degrade.然而,在 100 个用户下,前 10 分钟 API 响应时间很好,但随后突然开始下降。

What can be the probable causes here which I should investigate?我应该调查的可能原因是什么?

  1. Make sure that your application has enough headroom to operate in terms of CPU, RAM, Network, Disk, etc. as increased response times might be caused by lack of any of the above.确保您的应用程序在 CPU、RAM、网络、磁盘等方面有足够的空间来运行,因为缺少上述任何一项都可能导致响应时间增加。 If you don't have a better monitoring toolchain you can consider using JMeter PerfMon Plugin for this如果您没有更好的监控工具链,您可以考虑为此使用JMeter PerfMon Plugin
  2. Double check your application server, database server and any middleware configuration, defaults are not suitable for high loads and most probably you need to tune it somehow (increase number of maximum threads, adjust memory usage, etc.)仔细检查您的应用程序服务器、数据库服务器和任何中间件配置,默认值不适合高负载,很可能您需要以某种方式对其进行调整(增加最大线程数,调整 memory 使用情况等)
  3. Use a profiler tool which can give you comprehensive information regarding the slowest application parts, largest objects, heaviest DB queries and so on使用分析器工具,它可以为您提供有关最慢的应用程序部分、最大的对象、最重的 DB 查询等的全面信息
  4. And last but not the least make sure to follow JMeter Best Practices as it might be the case it's JMeter who cannot send requests fast enough and reporting false negative results最后但并非最不重要的一点是确保遵循JMeter 最佳实践,因为它可能是 JMeter 无法足够快地发送请求并报告假阴性结果的情况

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM