Many tools that can be used to measure the performance of web servers, one using the web stress tool for windows. But can also use the Apache Benchmark (AB) from the Apache HTTP Server one that is widely used Web server on the internet.
Apache Benchmark is a tool to measure the performance of apache, with ab we can see the capabilities of apache to serve the client request. But the question is that we often find on the apache benchmark is how to install and where to download apache benchmark this.
AB has been installed automatically when installing the Apache HTTP Server, if apache is already installed then this benchmarking tool is automatically there. Ab tool location is typically in-directory. Apache benchmark tool can be used not only for Apache, but for other web servers as well as Lighthttpd, Nginx or Miscrosoft IIS.
How to use the AB is as follows:
# Ab-c 1000-n 1000 'http://202.xxx.xxx.xxx/mongotest/comment/get_data/20/10'
Apache Benchmark is a tool to measure the performance of apache, with ab we can see the capabilities of apache to serve the client request. But the question is that we often find on the apache benchmark is how to install and where to download apache benchmark this.
AB has been installed automatically when installing the Apache HTTP Server, if apache is already installed then this benchmarking tool is automatically there. Ab tool location is typically in-directory. Apache benchmark tool can be used not only for Apache, but for other web servers as well as Lighthttpd, Nginx or Miscrosoft IIS.
How to use the AB is as follows:
# Ab-c 1000-n 1000 'http://202.xxx.xxx.xxx/mongotest/comment/get_data/20/10'
- The parameter c is the number of concurrent requests (concurrent) made, with the example above means the number of requests that are made is 1000 requests at a time.
- The parameter n is the number of connections made to the destination server, with the example above means that the connection was made is 1000 connections. This Ab consume server resources, ranging from memory (RAM), bandwidth and processor. Enter the number of connections and conccurent requests are appropriate, so the web server does not run out of resources and then hangs.
- The last parameter is the URL, the page will be processed by the web server on-benchmark.
Sample benchmark results as follows:
[Root @ monggo-lho-mas ~] # / usr/local/apache2/bin/ab-c 1000-n 1000 'http://202.xxx.xxx.xxx/mongotest/comment/get_data/20/10' This is ApacheBench, Version 2.3 <$ Revision: $ 655,654> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to the Apache Software Foundation, http://www.apache.org/
202.xxx.xxx.xxx Benchmarking (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests
Finished 1000 requests
Server Software: Apache/2.2.11 Server Hostname: 202.xxx.xxx.xxx
Server Port: 80
Document Path: / mongotest/comment/get_data/20/10 Document Length: 8407 bytes
Concurrency Level: 1000 Time taken for tests: 53,292 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total Transferred: 8621000 bytes HTML Transferred: 8407000 bytes Requests per second: 18.76 [# / sec] (mean) Time per request: 53291.611 [ms] (mean) Time per request: 53 292 [ms] (mean, across all concurrent requests) Transfer rate: 157.98 [Kbytes / sec] received Connection Times (ms) min mean [+ /-sd] median max Connect: 1 101 20.4 103 132 Processing: 87 15912 17447.4 53 159 7328 Waiting: 87 15909 17447.3 53 159 7326
Total: 88 16014 17458.6 7441 5329
Percentage of the requests served Within a perform certain time (ms) 50% 7441 66% 14 105 75% 26 339 80% 26 871 90% 51 923 95% 52 661 98% 52 947 99% 53 134
100% 53 290 (Longest request)
Note the points Time per request, meaning that the server is able to serve 18.76 requests per second for URLs that are benchmarks. Apache benchmark is a pretty good tool, the results are quite informative. Apache benchmark can be used to complete the benchmark results that are used with other tools.
No comments:
Post a Comment