Wednesday, April 29, 2009

Apache Benchmarking

Apache Benchmarking biasa di singkat dengan AB, jadi ab tuh apa-an... , AB adalah sebuah tools untuk menguji performace dari apache server kita.... so... dengan AB kita bisa bikin simulasi membuat request http sebanyak2-nya perdetik, jadi bisa tahu seberapa handal apache kita menangani banyak request...

udah kebayang belum ni.... kegunaan Apache Benchmarking, kalau gitu kita masuk cara instalasi dan pemakaiannya...

sebelumnya gw kasih tau dulu OS yg gw pake Ubuntu 9.04 - the Jaunty Jackalope

1. cara instalasinya ketikan perintah dibawah ini, menggunakan console

sudo apt-get install apache2-utils


2. sebagai contoh server yang akan di test adalah localhost

ab -n 10 http://localhost/

penjelasannya begini

ab = nama dari tools Apache Benchmarking
-n = jumlah request

kalau ingin liat ada feature/parameter-nya apa aja bisa diliat begini dan penjelasan detailnya bisa dilihat di http://httpd.apache.org/docs/2.0/programs/ab.html

ab -help



3. hasil dari benchmarking diatas hasil nya begini:

This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done


Server Software: Apache/2.2.9
Server Hostname: localhost
Server Port: 80

Document Path: /
Document Length: 1692 bytes

Concurrency Level: 1
Time taken for tests: 0.057 seconds
Complete requests: 10
Failed requests: 0
Write errors: 0
Total transferred: 19220 bytes
HTML transferred: 16920 bytes
Requests per second: 175.52 [#/sec] (mean)
Time per request: 5.697 [ms] (mean)
Time per request: 5.697 [ms] (mean, across all concurrent requests)
Transfer rate: 329.43 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 5 6 1.5 5 9
Waiting: 0 1 2.2 0 5
Total: 5 6 1.5 5 10

Percentage of the requests served within a certain time (ms)
50% 5
66% 5
75% 5
80% 7
90% 10
95% 10
98% 10
99% 10
100% 10 (longest request)


kurang lebih dari hasil diatas bisa diliat request time-nya dan apakah request-nya berhasil atau tidak..







No comments:

Post a Comment