apache - When using the ab tool, set the number of requests to 2000 and the number of concurrency to 1000. However, the number of requests is divided into 10 requests of 200 to complete. Where is the concurrency reflected?
迷茫
迷茫 2017-05-16 17:02:01
0
2
661

Use the ab tool in the windows environment, go to the ab tool directory and type the command

ab -n 2000 -c 1000 http://test.com/

Does this mean that the total number of requests is 2000 and the number of concurrent requests is 1000?

When running the test, it shows completed 200 requests

May I ask why the number of requests is 200 and 200? Where is the number of concurrent requests? Or am I misunderstanding the number of concurrency and number of requests?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
漂亮男人

-c is indeed concurrency. . . But it takes time to return, and it also takes time to send 1,000 concurrent messages. . . The result display just looks better. . If you want to see the real concurrency results, go to the web server log

仅有的幸福

Look at ab’s description of the c parameter. This parameter should be the concurrency number. As for that 200, it should be calculated by ab's own algorithm for preparing requests, and 200 requests are prepared each time. When 1000 is met, execute this request together. That's how I understand it.
If you adjust the size of the c parameter, the number 200 will also change!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template