Home  >  Q&A  >  body text

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?

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?

迷茫迷茫2713 days ago586

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 17:04:01

    -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

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 17:04:01

    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!

    reply
    0
  • Cancelreply