What is the highest number of threads that is reas

2019-01-06 13:53发布

I want to use the highest possible number of threads (to use less computers) but without making the bottleneck to be in the client.

9条回答
甜甜的少女心
2楼-- · 2019-01-06 14:19

There is not standard number for this. The maximum number of threads that you can generate from one computer depends completely on the computer's hardware and the OS. The OS by default occupies certain amount of CPU and the RAM.

To find out the maximum threads your computer can handle you can prepare a sample test and run it with only a few threads. Then with each cycle of test run increase the number of threads gradually. During this you also need to monitor the CPU, RAM, Disk I/O and Network I/O of your computer. The moment any of these reach near or beyond 80% (Again for you to decide if near is okay for you or beyond), that is the maximum number of threads your computer can handle. To be on the safer side I would stop at the number when the resource utilization reaches 70%.

查看更多
成全新的幸福
3楼-- · 2019-01-06 14:25

The JMeter Wiki reports cases where JMeter was used with as much as 1000 threads. I have used it with at most 100 threads, but the Links in the Wiki suggest resource reductions I never tried.

查看更多
Anthone
4楼-- · 2019-01-06 14:35

JMeter can simulate a very High Load provided you use it right.

Don't listen to Urban Legends that say JMeter cannot handle high load.

Now as for answer, it depends on:

  • your machine power

  • your jvm 32 bits or 64 bits

  • your jvm allocated memory -Xmx

  • your test plan ( lot of beanshell, post processor, xpath ... Means lots of cpu)

  • your os configuration (tunable)

  • Gui / non gui mode

So there is no theorical answer but following Best Practices will ensure JMeter performs well.

Note that with jmeter you can distribute load through remote testing, read:

And finally use cloud based testing if it's not enough.

Read this for tuning tips:

Read this book for doing load testing and using JMeter correctly.

查看更多
Rolldiameter
5楼-- · 2019-01-06 14:37

One of the issues we had with running JMeter on Windows XP was the Windows XP TCP Connection Limit. Limit should be removed in order to run use the JMeter to workstation’s full potential More info here. AFAIK, does not apply to other OS.

查看更多
【Aperson】
6楼-- · 2019-01-06 14:39

I have used JMeter a fair bit and found it is not great at generating really high load. On a 2Ghz Core2 Duo with 2Gb memory you can reasonably expect about 100 threads.

That being said, it is best to run it on your hardware so that the CPU of the PC does not peak at 100% - a stable 80%-90% is best otherwise the results are affected.

I have also tried WAPT 5 - it successfully ran 1000+ threads from the same PC. It is not free but it is more useable than JMeter but doesn't have all of the features.

Outdated answer since at least version 2.6 see https://stackoverflow.com/a/11922239/460802 for a more up to date one.

查看更多
做个烂人
7楼-- · 2019-01-06 14:39

It is more dependent on the kind of performance testing you do(load, spike, endurance etc) on a specific server (a little on hardware dependency)

Keep in mind around these parameters - the client machine on which you are targeting the run of jmeter, there will be a certain amount of heap memory allocated, ensure to have a healthy allocation so that the script does not error out. The highest i had run on jmeter was 1500 on a local environment ( client - server arch), On a Web arch, the highest i had a run was based upon Non- functional requirement were limited to 250 threads,

so it ideally depends on the kinds of performance testing and deployment style and so on..

查看更多
登录 后发表回答