* mod_perlの効果を測定する [#g01a72aa] #setlinebreak(on); #html(<DIV style="font-size:30px;font-weight:bolod;width:300px;height:100px;border:1px solid #000000;text-align:center;padding-top:50px;background:white;">まだッス</DIV>) 【負荷テスト概要】 以下の2つの負荷テストを行う。 ・abを利用した簡単な負荷テスト(ストレステスト) ・JMETERを使用したシナリオテストを兼ねた負荷テスト また、それぞれのテスト時に、サーバ側のCPU、メモリの使用状況も集計(vmstat、top、free等で)する。 【abを利用した簡単な負荷テスト】 ◆テスト内容 abを利用して以下の3つのURLにアクセスし、レスポンスを計測する。 /cgi-bin/file_write.cgi /cgi-perl-run/file_write.cgi /cgi-registry/file_write.cgi 処理内容は モジュールを require して呼ぶだけの単純なもの。 ※今回は、PerlRunの性能を見たいので、とりあえずrequireだけしてみたが、 時間があれば、も少しマシなものを作ってみたい。 #html(<div style="background:black;color:white;padding:4px;">) C:\tmp>ab -n 100 -c 10 http://192.168.24.101/cgi-bin/file_write.cgi This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.24.101 (be patient).....done Server Software: Apache Server Hostname: 192.168.24.101 Server Port: 80 Document Path: /cgi-bin/file_write.cgi Document Length: 128 bytes Concurrency Level: 10 Time taken for tests: 15.937500 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 26222 bytes HTML transferred: 12800 bytes Requests per second: 6.27 [#/sec] (mean) Time per request: 1593.750 [ms] (mean) Time per request: 159.375 [ms] (mean, across all concurrent requests) Transfer rate: 1.57 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 62 157 39.4 156 281 Processing: 47 1394 316.3 1453 1906 Waiting: 46 790 440.7 765 1796 Total: 203 1551 328.9 1640 2078 Percentage of the requests served within a certain time (ms) 50% 1640 66% 1671 75% 1703 80% 1718 90% 1828 95% 1953 98% 2000 99% 2078 100% 2078 (longest request) C:\tmp>ab -n 100 -c 10 http://192.168.24.101/cgi-perl-run/file_write.cgi This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.24.101 (be patient).....done Server Software: Apache Server Hostname: 192.168.24.101 Server Port: 80 Document Path: /cgi-perl-run/file_write.cgi Document Length: 128 bytes Concurrency Level: 10 Time taken for tests: 15.593750 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 24500 bytes HTML transferred: 12800 bytes Requests per second: 6.41 [#/sec] (mean) Time per request: 1559.375 [ms] (mean) Time per request: 155.938 [ms] (mean, across all concurrent requests) Transfer rate: 1.47 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 62 154 32.6 156 234 Processing: 31 1366 286.0 1437 1547 Waiting: 31 810 406.8 796 1546 Total: 265 1521 289.7 1593 1718 Percentage of the requests served within a certain time (ms) 50% 1593 66% 1640 75% 1671 80% 1671 90% 1687 95% 1703 98% 1703 99% 1718 100% 1718 (longest request) C:\tmp>ab -n 100 -c 10 http://192.168.24.101/cgi-registry/file_write.cgi This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.24.101 (be patient).....done Server Software: Apache Server Hostname: 192.168.24.101 Server Port: 80 Document Path: /cgi-registry/file_write.cgi Document Length: 128 bytes Concurrency Level: 10 Time taken for tests: 13.984375 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 24500 bytes HTML transferred: 12800 bytes Requests per second: 7.15 [#/sec] (mean) Time per request: 1398.438 [ms] (mean) Time per request: 139.844 [ms] (mean, across all concurrent requests) Transfer rate: 1.64 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 78 137 26.8 140 218 Processing: 16 1223 264.2 1312 1422 Waiting: 15 693 384.8 703 1390 Total: 156 1360 273.0 1453 1578 Percentage of the requests served within a certain time (ms) 50% 1453 66% 1484 75% 1500 80% 1515 90% 1531 95% 1562 98% 1578 99% 1578 100% 1578 (longest request) #html(</div>) 後は後日。。