apache---압력 테스트 도구 ab.exe
2936 단어 apache.
기본 값 은/usr/bin/ab 에 설치 되 어 있 습 니 다.
/usr/bin/ab -n 100 -c 100 http://192.168.4.51/ci/index.php/home/login/index
-n:요청 횟수
-c:동시 다발 수,즉 동시 몇 명 방문
Server Software: web
Server Hostname:
Server Port:
Document Path:
Document Length:
Concurrency Level:
Time taken for tests:
Complete requests:
Failed requests:
Write errors:
Total transferred: , http
HTML transferred: html ,
Requests per second: , ( )
Time per request: ,
Time per request:
Transfer rate: ( )
실례
Server Software: Apache/2.2.15
Server Hostname: 192.168.4.51
Server Port: 80
Document Path: /ci/index.php/home/login/index
Document Length: 2079 bytes
Concurrency Level: 100------------------------
Time taken for tests: 1.636 seconds--------------
Complete requests: 100------------------------
Failed requests: 0--------------------------
Write errors: 0
Total transferred: 246800 bytes
HTML transferred: 207900 bytes
Requests per second: 61.13 [#/sec] (mean)-----------------
Time per request: 1635.852 [ms] (mean)-----------------100
Time per request: 16.359 [ms] (mean, across all concurrent requests)----------------1
Transfer rate: 147.33 [Kbytes/sec] received
기타 주의사항
1)
ab 병발 수 는 요청 수 보다 많 으 면 안 됩 니 다.
ab: Cannot use concurrency level greater than total number of requests
2)
요청 수 는 기본적으로 1024 개 를 초과 할 수 없습니다.
socket: Too many open files (24)
ulimit-n 명령 으로 수정 할 수 있 습 니 다.예 를 들 어 ulimit-n 8192(사용자 가 동시에 열 수 있 는 최대 파일 수 설정).
3)
병발 수 는 기본적으로 20000 개 이상 일 수 없습니다.알려 드 립 니 다.
ab: Invalid Concurrency [Range 0..20000]
apache 소스 코드 support 디 렉 터 리 에서 ab.c 파일 을 수정 해 야 합 니 다.찾 을 수 있 습 니 다:
#define MAX_CONCURRENCY 20000
매크로 정의 값 을 크게 바 꾸 고 apache 를 다시 컴 파일 합 니 다.
4)
제시 하 다.
apr_socket_recv: Connection reset by peer (104)
사실 병발 수가 서버 하드웨어 부 하 를 초과 하면 이 오 류 를 보고 합 니 다.
인터넷 에서 apr-util 에 문제 가 있어 서 불안정 하 다 고 하 는데 몇 번 더 해 보면 돼 요.
5)
그리고 단독 apache bench 소스 패키지 와 ab 튜 토리 얼 을 따로 설치 하 는 방법 도 있 습 니 다.
다운로드:http://apachebench-standalone.googlecode.com/files/ab-standalone-0.1.tar.bz2
설치 튜 토리 얼:https://code.google.com/p/apachebench-standalone/wiki/HowToBuild
6)테스트 중 다음 과 같은 오류 발견
...
Failed requests: 998
(Connect: 0, Receive: 0, Length: 998, Exceptions: 0)
...
동적 페이지 를 테스트 할 때 되 돌아 오 는 길이 가 처음 과 다 르 기 때문에 ab 는 판단 에 실 패 했 고 동적 페이지 에 대해 합 리 적 입 니 다.참고 가능:http://mib168.iteye.com/blog/1299990
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
자바 파일 압축 및 압축 풀기파일 의 간단 한 압축 과 압축 해 제 를 실현 하 였 다.주요 테스트 용 에는 급 하 게 쓸 수 있 는 부분 이 있 으 니 불편 한 점 이 있 으 면 아낌없이 가르쳐 주 십시오. 1. 중국어 문 제 를 해 결 했 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.