리눅스
[리눅스] ab(Apache Bench) tools 에러
변군이글루
2021. 5. 30. 20:56
반응형
ab(Apache Bench) tools 에러
ab 명령어
Usage: ab [options] [http[s]://]hostname[:port]/path
Options are:
-n requests Number of requests to perform (= 요청수)
-c concurrency Number of multiple requests to make at a time (=동시 요청수(사용자))
-t timelimit Seconds to max. to spend on benchmarking
This implies -n 50000
-s timeout Seconds to max. wait for each response
Default is 30 seconds
ab 에러
ab -c 10000 -n 1000 http://localhost/
$ ab -c 10000 -n 1000 http://localhost/
ab: Cannot use concurrency level greater than total number of requests
: 총 요청 수(requests)보다 큰 동시성(concurrency) 수준을 사용할 수 없다.
ab 명령어에서 이 오류가 발생하는 경우는 동시 접속 수(-c 옵션)를 총 요청 수(-n 옵션)보다 크게 설정했기 때문입니다.
예를 들어, -c 10 (10개의 동시 접속) 옵션과 -n 5 (5개의 요청) 옵션을 사용했다면, 이 오류가 발생합니다. -c 옵션과 -n 옵션을 조정하여, 동시 접속 수가 총 요청 수 이하로 설정하면 이 오류를 해결할 수 있습니다.
예를 들어, -c 5 (5개의 동시 접속) 옵션과 -n 10 (10개의 요청) 옵션을 사용하면, 각 동시 접속당 2번씩 요청이 전송되는 것이기 때문에 이 오류를 피할 수 있습니다.
ab -c 100000 -n 100000 http://localhost/
$ ab -c 100000 -n 100000 http://localhost/
ab: Invalid Concurrency [Range 0..20000]
: 동시성(concurrency) 범위는 0 ~ 20,000
728x90
반응형