Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I simulate 1000 concurrent users as real?

I need to do a load testing for a web service. It requires at least 1000 concurrent users.

I know some testing tools (e.g JMeter) could simulate a bunch of concurrent users with multiple-threads. But those users are not really concurrent.

If I run the JMeter program in a machine with only 2 CPU cores, there is only 2 concurrent users active in a time, even though there are 1000 multiple threads generated with the testing tool.

Is there any way to create real concurrent users?

like image 800
JuliaLi Avatar asked Jun 25 '12 09:06

JuliaLi


2 Answers

From the point of view of the web service, those users are concurrent. A CPU with two cores can easily swap between 1000 threads; most of the time, the thread will be waiting for network I/O, so it's very similar to how it would work if you actually had 1000 cores.

So JMeter should be fine. It's possible that if the test thread has to do a load of CPU-intensive work, then that might bias the results. But usually, the test threads are just waiting for a response.

like image 150
artbristol Avatar answered Oct 15 '22 11:10

artbristol


You can try *nix tool Siege after reading FAQ about concurrent users.

like image 41
Arcadien Avatar answered Oct 15 '22 09:10

Arcadien