�@���������Apache�ɒ��ڂ��āA�p�t�H�[�}���X�E�`���[�j���O�̂��߂̏������s���B�`���[�j���O����ɓ������āA�܂�������\���ɕ��͂��A��̓I�ȖڕW���߂邱�Ƃ���n�߂����B�ڕW���ǂꂾ����̉����邩�͂Ƃ������Ƃ��Ă��A����𐔒l�I�ɒm��������ɁA���R�Ɓu�x���x���v�Ƒ����ł��Ă��d�����Ȃ��B
�@����𐔒l�I�ɂƂ炦��ɂ̓c�[�����K�v�ƂȂ�B������x���`�}�[�N�E�c�[�����BApache�ɂ́A�W���Łuab�v�iApache Bench�j�Ƃ����c�[�����t�����Ă���Bab�̍\���́A
ab [options] URL
�̂悤�ɁA�I�v�V�����ƃe�X�g�����s����URL���w�肷��B
��F
ab -n 100 -c 10 http://172.16.1.2/index.html
ab -n 100 -c 10 -w http://172.16.1.2/index.html > bench.html
ab -n 100 -c 10 -A user:password http://172.16.1.2/index.html
�@ab�̃I�v�V�����́A��{�I�Ɂu�����ڑ����v�Ɓu���N�G�X�g���v���w�肷��i��̓I�ȃI�v�V�������\1���Q�Ɓj�B�Ⴆ�A�����ڑ�����100�A���N�G�X�g����10000�Ƃ���A������100�̃��N�G�X�g�����������Ƃ��ɁA10000���N�G�X�g����������܂ł̐��\�����肳���킯���B
�I�v�V���� | �Ӗ� |
---|---|
-n ���l | �e�X�g�Ŕ��s���郊�N�G�X�g�̉𐔒l�Ŏw�� |
-c ���l | �e�X�g�œ����ɔ��s���郊�N�G�X�g�̐��𐔒l�Ŏw�� |
-t ���l | �T�[�o����̃��X�|���X�̑҂����ԁi�b�j�𐔒l�Ŏw�� |
-p �t�@�C���� | �T�[�o�֑��M����t�@�C��������ꍇ�Ɏw�� |
-T �R���e���c�^�C�v | �T�[�o�֑��M����R���e���c�w�b�_���w�� |
-v ���l | �w�肵�����l�ɉ������������\�� |
-w | ���ʂ�HTML�ŏo�́i�o�͂��t�@�C���ɕۑ������Web�u���E�U�ŕ\�g�݂��ꂽ���̂�������j |
-x ���� | HTML�o�͂�table�^�O�ɑ�����lj��iBORDER�Ȃǁj |
-y ���� | HTML�o�͂�tr�^�O�ɑ�����lj� |
-z ���� | HTML�o�͂�td�܂���th�^�O�ɑ�����lj� |
-C 'Cookie����=�l' | Cookie�l��n���ăe�X�g���� |
-A ���[�U�[��:�p�X���[�h | �x�[�V�b�N�F���K�v�ȃR���e���c�Ƀe�X�g���� |
-P ���[�U�[��:�p�X���[�h | �F�̕K�v�ȃv���L�V��ʂ��ăe�X�g���� |
-X �v���L�V�T�[�o��:�|�[�g�ԍ� | �v���L�V�o�R�Ń��N�G�X�g����ꍇ�Ɏw�� |
-V | ab�̃o�[�W�����ԍ���\�� |
-k | HTTP/1.1��KeepAlive��L���ɂ��ăe�X�g���� |
-h | ab�̃w���v��\�� |
�\1�@ab�̃I�v�V���� |
�@ab���s���̃T���v�������X�g1�A���X�g2�Ɏ������A�����Ŗ��ƂȂ�͎̂���3�_�ł���B
�@ab���C���X�g�[������Ă���R���s���[�^�ƂȂ�ƁA�܂���Web�T�[�o���̂��̂Ƃ������ƂɂȂ邾�낤�B�������AWeb�T�[�o�ł̎��s�́A���ʑ���ɓK���Ă���Ƃ͂�����B�Ȃ��Ȃ�A����͌v�Z���Ԃ𑪒肵�Ă��邾���ł����āA�ڑ��ɗv���鎞�ԂȂǂ𑪒�ł���킯�ł͂Ȃ�����ł���B
�@ab�́A���Ȃ��Ƃ�Web�T�[�o�Ƃ͕ʂ̃R���s���[�^�Ŏ��s�������B�ł���A���[�^�̒��O������i�}1�j���������낤�B�������邱�ƂŁA��茻���I�ȃp�t�H�[�}���X�𑪒�ł��邩��ł���B
�@���N�G�X�g���̓T���v�����O���ʂ�����A���܂葽�߂��Ȃ����x�ɑ傫�߂̒l���w�肷������B����ɑ��A�����ڑ����̎w��͐T�d�ɑI���������B����Web�T�[�o�ւ̓����ڑ��������炩���ߗ\���ł���悤�ł���A���̐��l�̑O��30�����x�͈̔͂ő��肷��������낤�B�\�������Ȃ��ꍇ�͍L���͈͂ő��肷�邵���Ȃ����A�ǂ���ɂ��Ă������ڑ����̌��E�𑪂�̂��d�v�ȃ|�C���g��1���B
�@�܂��A1��̃R���s���[�^�������������铯���ڑ����ɂ��Ă����ӂ������B�Ⴆ�A�����\��UNIX�T�[�o�ɑ��đ��肷��ꍇ�A�����Ȑ��̓����ڑ���������K�v������B�������A���ʂ�PC�T�[�o�Ŕ����������铯���ڑ����ɂ́A���̂��ƌ��E������B�]���āA������̃R���s���[�^��ab�����đ��肵�Ȃ���Ȃ�Ȃ��B���Ƃ��A1��̃R���s���[�^�ł��Ȃ��鐔���Ƃ��Ă��A������ł̑���������Ă݂邱�Ƃ����߂�B
�@�Ō�ɁA���N�G�X�g����URL�ł��邪�A������\���Ɍ�������ׂ����ڂ��Ƃ�����B��ɂ��q�ׂ��Ƃ���A1��Web�y�[�W��\������ɂ́AHTML�t�@�C���ƂƂ��ɉ摜�t�@�C���Ȃǂ��K�v�ɂȂ�B�������Aab�͒P�ꂩ����̃t�@�C�������N�G�X�g���邱�Ƃ����ł��Ȃ��B
�@����́AWeb�T�[�o�ɂƂ��ėL���ȏ����ł̑���ƂȂ��Ă��܂��B�����ŁA������̃R���s���[�^����A���ꂼ��ʂȃt�@�C�������N�G�X�g����Ȃǂ̍H�v�����Ă݂����B�܂��A���N�G�X�g����t�@�C���̗e�ʂɂ���āA�ǂ̂悤�ȕω������邩�Ȃǂ��A���肵�Ă݂�Ƃ������낤�B
�@����ɂ́A�ÓI�ȃt�@�C�������łȂ��A�v���O���������s���č쐬�����y�[�W�ւ̃��N�G�X�g�����肵�����B������A�P���ȃv���O��������A���G�ȃv���O�����܂ő��肵�Ă����B�ǂ�ȏꍇ�ł������邱�Ƃ����A���܂��܂ȃp�^�[���̑�����A��葽���W�߂������A���ʂ̕��͂����p�I�ɍs������̂ł���B
# ./ab -n 10000 -c 100 http://172.16.1.2:8000/HTML/INDEX.htm This is ApacheBench, Version 1.3d <$Revision: 1.59 $> apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking 172.16.1.2 (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Finished 10000 requests Server Software: Apache/1.3.9 Server Hostname: 172.16.1.2 Server Port: 8000 Document Path: /OA_HTML/US/ICXINDEX.htm Document Length: 3413 bytes Concurrency Level: 100 Time taken for tests: 11.662 seconds Complete requests: 10000 Failed requests: 0 Broken pipe errors: 0 Total transferred: 36900274 bytes HTML transferred: 34139446 bytes Requests per second: 857.49 [#/sec] (mean) Time per request: 116.62 [ms] (mean) Time per request: 1.17 [ms] (mean, across all concurrent requests) Transfer rate: 3164.15 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 10 155.7 0 3002 Processing: 26 106 60.6 98 3594 Waiting: 24 105 60.6 98 3593 Total: 26 115 165.2 100 3596 Percentage of the requests served within a certain time (ms) 50% 100 66% 114 75% 122 80% 129 90% 144 95% 174 98% 226 99% 254 100% 3596 (last request)
# ./ab -n 10000 -c 100 http://172.16.1.2:8000/jsp/test.jsp This is ApacheBench, Version 1.3d <$Revision: 1.59 $> apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking 172.16.1.2 (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Finished 10000 requests Server Software: Apache/1.3.9 Server Hostname: 172.16.1.2 Server Port: 8000 Document Path: /OA_HTML/services/login.jsp Document Length: 5029 bytes Concurrency Level: 100 Time taken for tests: 302.561 seconds Complete requests: 10000 Failed requests: 2579 (Connect: 0, Length: 2579, Exceptions: 0) Broken pipe errors: 0 Non-2xx responses: 2579 Total transferred: 41028759 bytes HTML transferred: 38870059 bytes Requests per second: 33.05 [#/sec] (mean) Time per request: 3025.61 [ms] (mean) Time per request: 30.26 [ms] (mean, across all concurrent requests) Transfer rate: 135.60 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 8 152.4 0 2994 Processing: 2 2803 3308.1 1209 165915 Waiting: 2 2802 3308.1 1208 165914 Total: 2 2811 3340.7 1209 165915 Percentage of the requests served within a certain time (ms) 50% 1209 66% 1976 75% 2837 80% 3649 90% 5479 95% 11034 98% 24299 99% 28714 100% 165915 (last request)
�@ab�̌��ʁi���X�g1�A���X�g2�j�̒��ŁA���ڂ��ׂ����ڂ͎��̂Ƃ��肾�B�������A���p����ab�̃o�[�W�����ɂ���Ă͕\�����e���قȂ�A���ڂ����݂��Ȃ����Ƃ�����Bab�����ł��ŐV�̂��̂��g���Ƃ������낤�B���̏ꍇ�́AApache�̍ŐV�ł���肵�đS�̂��R���p�C�����Aab���������o���Ēu������������B
�@���̂ق��ɁA�]�����x�iTransfer rate�j�����āA�l�b�g���[�N���̎������x�����x���悤�ł���A�l�b�g���[�N���̃`���[�j���O���l������B�l�b�g���[�N���̎������x�́A���̃l�b�g���[�N�o�H��̍ł��ׂ������60�����x�Ƃ݂�悢�B�Ⴆ�A�o�H�̈ꕔ��10BASE-T���������Ă����6Mbit�^�b���x�A100BASE-TX���������Ă����60Mbit�^�b���x�Ƃ݂�B
�@�����𑍍��I�Ɍ��āAWeb�T�[�o�̏������E��`���[�j���O�̃|�C���g�����ɂ߂�B����ɁA���̌��ɂ߂���ڕW���߁A�`���[�j���O���{���Ă����킯���B����́A����̓��e�܂��������ŁA�`���[�j���O�̃|�C���g����̓I�ɏЉ��B
Copyright © ITmedia, Inc. All Rights Reserved.