{"id":313,"date":"2009-04-27T16:44:24","date_gmt":"2009-04-27T09:44:24","guid":{"rendered":"http:\/\/adityo.blog.binusian.org\/?p=313"},"modified":"2009-05-06T15:58:37","modified_gmt":"2009-05-06T08:58:37","slug":"how-to-benchmark-your-apache-and-iis","status":"publish","type":"post","link":"https:\/\/adityo.blog.binusian.org\/?p=313","title":{"rendered":"How to Benchmark your Apache and IIS ?"},"content":{"rendered":"<p>Just several days ago someone ask me , can we benchmark the apache server ? can we set a custom environment to test the apache and server performance ? and i found this tool called ab.<\/p>\n<h3>What is Ab ?<\/h3>\n<p><code>ab<\/code>\u00a0is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs<\/p>\n<p>\u00a0<\/p>\n<h3>Apache Benchmark Procedures<\/h3>\n<ul>\n<li>You need to use same hardware configuration and kernel (OS) for all tests<\/li>\n<li>You need to use same network configuration. For example, use 100Mbps port for all tests<\/li>\n<li>First record server load using top or uptime command<\/li>\n<li>Take at least 3-5 readings and use the best result<\/li>\n<li>After each test reboot the server and carry out test on next configuration (web server)<\/li>\n<li>Again record server load using top or uptime command<\/li>\n<li>Carry on test using static html\/php files and dynamic pages<\/li>\n<li>It also important to carry out test using the Non-KeepAlive and KeepAlive (the\u00a0<a href=\"http:\/\/httpd.apache.org\/docs\/1.3\/mod\/core.html#keepalive\">Keep-Alive extension<\/a>\u00a0to provide long-lived HTTP sessions, which allow multiple requests to be sent over the same TCP connection) features<\/li>\n<li>Also don&#8217;t forget to carry out test using fast-cgi and\/or perl tests<\/li>\n<\/ul>\n<p>Okay let&#8217; start the benchmark<\/p>\n<p>\u00a0<\/p>\n<ol>\n<h3>Benchmarking using HTML only script:<\/h3>\n<\/ol>\n<p>Creat a simple html script<\/p>\n<p>#vim tes.html<\/p>\n<p>&lt;!DOCTYPE HTML <strong>PUBLIC<\/strong> &#8220;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&#8221;&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>&lt;title&gt;Ab test &lt;\/title&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>Test using Ab.<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p># ab -n 1000 -c 5 http:\/\/202.58.111.111\/tes.html<\/p>\n<p>Where,<\/p>\n<ul>\n<li>\u00a0\u00a0-n 1000: ab will send 1000 number of requests to server 202.58.111.111 ( you can changes it to your own ip server) in order to perform for the benchmarking session<\/li>\n<li>\u00a0\u00a0-c 5 : 5 is concurrency number i.e. ab will send 5 number of multiple requests to perform at a time to server 202.58.111.111<\/li>\n<\/ul>\n<p>Output:<\/p>\n<p>This is ApacheBench, Version 2.0.40-dev &lt;$Revision: 1.146 $&gt; apache-2.0<\/p>\n<p>Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href=\"http:\/\/www.zeustech.net\/\">http:\/\/www.zeustech.net\/<\/a><\/p>\n<p>Copyright 2006 The Apache Software Foundation, <a href=\"http:\/\/www.apache.org\/\">http:\/\/www.apache.org\/<\/a><\/p>\n<p>Benchmarking 202.58.182.129 (be patient)<\/p>\n<p>Completed 100 requests<\/p>\n<p>Completed 200 requests<\/p>\n<p>Completed 300 requests<\/p>\n<p>Completed 400 requests<\/p>\n<p>Completed 500 requests<\/p>\n<p>Completed 600 requests<\/p>\n<p>Completed 700 requests<\/p>\n<p>Completed 800 requests<\/p>\n<p>Completed 900 requests<\/p>\n<p>Finished 1000 requests<\/p>\n<p>\u00a0<\/p>\n<p>Server Software:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Apache\/2.2.8<\/p>\n<p>Server Hostname:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 202.58.182.129<\/p>\n<p>Server Port:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 80<\/p>\n<p>\u00a0<\/p>\n<p>Document Path:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/tes.html<\/p>\n<p>Document Length:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 170 bytes<\/p>\n<p>\u00a0<\/p>\n<p>Concurrency Level:\u00a0\u00a0\u00a0\u00a0\u00a0 5<\/p>\n<p>Time taken for tests:\u00a0\u00a0 0.168989 seconds<\/p>\n<p>Complete requests:\u00a0\u00a0\u00a0\u00a0\u00a0 1000<\/p>\n<p>Failed requests:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>Write errors:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>Total transferred:\u00a0\u00a0\u00a0\u00a0\u00a0 531531 bytes<\/p>\n<p>HTML transferred:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 170170 bytes<\/p>\n<p>Requests per second:\u00a0\u00a0\u00a0 5917.54 [#\/sec] (mean)<\/p>\n<p>Time per request:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.845 [ms] (mean)<\/p>\n<p>Time per request:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.169 [ms] (mean, across all concurrent requests)<\/p>\n<p>Transfer rate:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3071.21 [Kbytes\/sec] received<\/p>\n<p>Connection Times (ms)<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 min\u00a0 mean[+\/-sd] median\u00a0\u00a0 max<\/p>\n<p>Connect:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 0\u00a0\u00a0 0.0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>Processing:\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 0\u00a0\u00a0 0.5\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 6<\/p>\n<p>Waiting:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 0\u00a0\u00a0 0.3\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 6<\/p>\n<p>Total:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 0\u00a0\u00a0 0.5\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 6<\/p>\n<p>\u00a0<\/p>\n<p>Percentage of the requests served within a certain time (ms)<\/p>\n<p>\u00a0 50%\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>\u00a0 66%\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>\u00a0 75%\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>\u00a0 80%\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>\u00a0 90%\u00a0\u00a0\u00a0\u00a0\u00a0 1<\/p>\n<p>\u00a0 95%\u00a0\u00a0\u00a0\u00a0\u00a0 1<\/p>\n<p>\u00a0 98%\u00a0\u00a0\u00a0\u00a0\u00a0 1<\/p>\n<p>\u00a0 99%\u00a0\u00a0\u00a0\u00a0\u00a0 1<\/p>\n<p>\u00a0100%\u00a0\u00a0\u00a0\u00a0\u00a0 6 (longest request)<\/p>\n<h3>\u00a0\u00a0 \u00a0 \u00a0 Benchmarking using php-mysql script<\/h3>\n<p>Create the script first<\/p>\n<p># vim phpsql.php<\/p>\n<div>\n<p class=\"MsoNormal\"><strong>&lt;?php<\/strong><\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0 $link = <a href=\"http:\/\/www.php.net\/mysql_connect\">mysql_connect<\/a>(&#8220;localhost&#8221;, &#8220;USERNAME&#8221;, &#8220;PASSWORD&#8221;);<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0 <a href=\"http:\/\/www.php.net\/mysql_select_db\">mysql_select_db<\/a>(&#8220;DATABASE&#8221;);<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0 $query = &#8220;SELECT * FROM TABLENAME&#8221;;<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0 $result = <a href=\"http:\/\/www.php.net\/mysql_query\">mysql_query<\/a>($query);<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0 while ($line = <a href=\"http:\/\/www.php.net\/mysql_fetch_array\">mysql_fetch_array<\/a>($result))<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0 {<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0\u00a0\u00a0 foreach ($line as $value)<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <a href=\"http:\/\/www.php.net\/print\">print<\/a> &#8220;$value<strong>\\n<\/strong>&#8220;;<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0\u00a0\u00a0 }<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0 }<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0 <a href=\"http:\/\/www.php.net\/mysql_close\">mysql_close<\/a>($link);<\/p>\n<p class=\"MsoNormal\"><strong>?&gt;<\/strong><\/p>\n<p class=\"MsoNormal\">Where,<\/p>\n<ul>\n<li>&#8220;localhost&#8221;,\u00a0&#8220;USERNAME&#8221;,\u00a0&#8220;PASSWORD&#8221; and\u00a0\u00a0&#8220;TABLENAME&#8221; are refer to your mysql db settings<\/li>\n<\/ul>\n<\/div>\n<p>Output:<\/p>\n<p>Test benchmark 1:<\/p>\n<p>ab -n 1000 -c 5 http:\/\/ 202.58.111.111\/phpsql.php<\/p>\n<p>where,<\/p>\n<ul class=\"unIndentedList\">\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -n 1000 -&gt; send request to server as much \u00a01000 request<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -c 300\u00a0 -&gt; will send 300 number of multiple requests to perform at a time to server 202.58.111.111<\/li>\n<\/ul>\n<p># ab -n 1000 -c 300 http:\/\/ 202.58.111.111\/phpsql.php<\/p>\n<p>This is ApacheBench, Version 2.0.40-dev &lt;$Revision: 1.146 $&gt; apache-2.0<\/p>\n<p>Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href=\"http:\/\/www.zeustech.net\/\">http:\/\/www.zeustech.net\/<\/a><\/p>\n<p>Copyright 2006 The Apache Software Foundation, <a href=\"http:\/\/www.apache.org\/\">http:\/\/www.apache.org\/<\/a><\/p>\n<p>Benchmarking 202.58.182.129 (be patient)<\/p>\n<p>Completed 100 requests<\/p>\n<p>Completed 200 requests<\/p>\n<p>Completed 300 requests<\/p>\n<p>Completed 400 requests<\/p>\n<p>Completed 500 requests<\/p>\n<p>Completed 600 requests<\/p>\n<p>Completed 700 requests<\/p>\n<p>Completed 800 requests<\/p>\n<p>Completed 900 requests<\/p>\n<p>Finished 1000 requests<\/p>\n<p>\u00a0<\/p>\n<p>Server Software:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Apache\/2.2.8<\/p>\n<p>Server Hostname:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 202.58.182.129<\/p>\n<p>Server Port:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 80<\/p>\n<p>Document Path:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/psql.php<\/p>\n<p>Document Length:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 157315 bytes<\/p>\n<p>Concurrency Level:\u00a0\u00a0\u00a0\u00a0\u00a0 300<\/p>\n<p>Time taken for tests:\u00a0\u00a0 7.890645 seconds<\/p>\n<p>Complete requests:\u00a0\u00a0\u00a0\u00a0\u00a0 1000<\/p>\n<p><span style=\"color: #ff0000\">Failed requests:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 37<\/span><\/p>\n<p>\u00a0\u00a0 (Connect: 0, <span style=\"color: #ff0000\">Length: 37<\/span>, Exceptions: 0)<\/p>\n<p>Write errors:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>Total transferred:\u00a0\u00a0\u00a0\u00a0\u00a0 152002245 bytes<\/p>\n<p>HTML transferred:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 151726883 bytes<\/p>\n<p>Requests per second:\u00a0\u00a0\u00a0 126.73 [#\/sec] (mean)<\/p>\n<p>Time per request:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2367.194 [ms] (mean)<\/p>\n<p>Time per request:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7.891 [ms] (mean, across all concurrent requests)<\/p>\n<p>Transfer rate:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 18812.02 [Kbytes\/sec] received<\/p>\n<p>Connection Times (ms)<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 min\u00a0 mean[+\/-sd] median\u00a0\u00a0 max<\/p>\n<p>Connect:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0 260 843.5\u00a0\u00a0 \u00a0\u00a0\u00a00\u00a0\u00a0\u00a0 3017<\/p>\n<p>Processing:\u00a0\u00a0\u00a0 10 1570 1692.6\u00a0\u00a0 1070\u00a0\u00a0\u00a0 7880<\/p>\n<p>Waiting:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 9 1531 1699.7\u00a0\u00a0 1027\u00a0\u00a0\u00a0 7861<\/p>\n<p>Total:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 52 1830 2008.5\u00a0\u00a0 1074\u00a0\u00a0\u00a0 7886<\/p>\n<p>Percentage of the requests served within a certain time (ms)<\/p>\n<p>\u00a0 50%\u00a0\u00a0 1074<\/p>\n<p>\u00a0 66%\u00a0\u00a0 1106<\/p>\n<p>\u00a0 75%\u00a0\u00a0 1134<\/p>\n<p>\u00a0 80%\u00a0\u00a0 1218<\/p>\n<p>\u00a0 90%\u00a0\u00a0 4792<\/p>\n<p>\u00a0 95%\u00a0\u00a0 7494<\/p>\n<p>\u00a0 98%\u00a0\u00a0 7605<\/p>\n<p>\u00a0 99%\u00a0\u00a0 7810<\/p>\n<p>\u00a0100%\u00a0\u00a0 7886 (longest request)<\/p>\n<p>On this test there were <span style=\"color: #ff0000\">failed request = \u00a037<\/span> failed length it can be because of the dynamic script, ab \u00a0needs the content to be returned of identical length from one request to the next, so if your<\/p>\n<p>content is dynamic in any way, it may &#8220;fail&#8221;. If there are any real Apache::ASP errors, they should show up \u00a0in your apache error_log.<\/p>\n<p>The server performance:<\/p>\n<p># top<\/p>\n<p>top &#8211; 15:21:37 up 33 days, 19:42,\u00a0 3 users,\u00a0 load average: <span style=\"color: #ff0000\">2.12<\/span>, 1.96, 1.48<\/p>\n<p>Tasks: 133 total,\u00a0\u00a0 2 running, 130 sleeping,\u00a0\u00a0 0 stopped,\u00a0\u00a0 1 zombie<\/p>\n<p>Cpu(s):\u00a0 2.3%us,\u00a0 0.5%sy,\u00a0 0.0%ni, 97.0%id,\u00a0 0.0%wa,\u00a0 0.0%hi,\u00a0 0.2%si,\u00a0 0.0%st<\/p>\n<p>Mem:\u00a0\u00a0 4153976k total, \u00a0<span style=\"color: #ff0000\">2800284k used<\/span>,\u00a0 1353692k free,\u00a0\u00a0 689188k buffers<\/p>\n<p>Swap:\u00a0 7783288k total,\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0k used,\u00a0 7783288k free,\u00a0 1728880k cached<\/p>\n<p>Load average pull up become \u00a02.12 \u00a0, memory also raising to<span style=\"color: #ff0000\"> 2800284k<\/span> \u00a0but the server still okay<\/p>\n<p>Test benchmark 2:<\/p>\n<p>\u00a0<\/p>\n<p>ab -n 10000 -c 300 http:\/\/ 202.58.111.111\/phpsql.php<\/p>\n<p>where,<\/p>\n<ul class=\"unIndentedList\">\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -n 1000 -&gt; send request to server as much \u00a010000 request<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -c 300\u00a0 -&gt; will send 300 number of multiple requests to perform at a time to server 202.58.111.111<\/li>\n<\/ul>\n<p>ab -n 10000 -c 300 http:\/\/ 202.58.111.111\/phpsql.php<\/p>\n<p>\u00a0<\/p>\n<p>This is ApacheBench, Version 2.0.40-dev &lt;$Revision: 1.146 $&gt; apache-2.0<\/p>\n<p>Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href=\"http:\/\/www.zeustech.net\/\">http:\/\/www.zeustech.net\/<\/a><\/p>\n<p>Copyright 2006 The Apache Software Foundation, <a href=\"http:\/\/www.apache.org\/\">http:\/\/www.apache.org\/<\/a><\/p>\n<p>\u00a0<\/p>\n<p>Benchmarking 202.58.182.129 (be patient)<\/p>\n<p>Completed 1000 requests<\/p>\n<p>Completed 2000 requests<\/p>\n<p>Completed 3000 requests<\/p>\n<p>Completed 4000 requests<\/p>\n<p>Completed 5000 requests<\/p>\n<p>Completed 6000 requests<\/p>\n<p>Completed 7000 requests<\/p>\n<p>Completed 8000 requests<\/p>\n<p>Completed 9000 requests<\/p>\n<p>Finished 10000 requests<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>Server Software:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Apache\/2.2.8<\/p>\n<p>Server Hostname:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 202.58.182.129<\/p>\n<p>Server Port:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 80<\/p>\n<p>\u00a0<\/p>\n<p>Document Path:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/psql.php<\/p>\n<p>Document Length:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 157315 bytes<\/p>\n<p>\u00a0<\/p>\n<p>Concurrency Level:\u00a0\u00a0\u00a0\u00a0\u00a0 300<\/p>\n<p>Time taken for tests:\u00a0\u00a0 41.466140 seconds<\/p>\n<p>Complete requests:\u00a0\u00a0\u00a0\u00a0\u00a0 10000<\/p>\n<p><span style=\"color: #ff0000\">Failed requests:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 5158<\/span><\/p>\n<p>\u00a0\u00a0 (Connect: 0, <span style=\"color: #ff0000\">Length: 5158<\/span>, Exceptions: 0)<\/p>\n<p>Write errors:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>Total transferred:\u00a0\u00a0\u00a0\u00a0\u00a0 772220127 bytes<\/p>\n<p>HTML transferred:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 769366660 bytes<\/p>\n<p>Requests per second:\u00a0\u00a0\u00a0 241.16 [#\/sec] (mean)<\/p>\n<p>Time per request:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1243.984 [ms] (mean)<\/p>\n<p>Time per request:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 4.147 [ms] (mean, across all concurrent requests)<\/p>\n<p>Transfer rate:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 18186.43 [Kbytes\/sec] received<\/p>\n<p>\u00a0<\/p>\n<p>Connection Times (ms)<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 min\u00a0 mean[+\/-sd] median\u00a0\u00a0 max<\/p>\n<p>Connect:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0 114 389.0\u00a0\u00a0\u00a0\u00a0 23\u00a0\u00a0\u00a0 3419<\/p>\n<p>Processing:\u00a0\u00a0\u00a0 15 1071 1492.6\u00a0\u00a0\u00a0 707\u00a0\u00a0 20874<\/p>\n<p>Waiting:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 13\u00a0 813 1376.7\u00a0\u00a0\u00a0 586\u00a0\u00a0 20854<\/p>\n<p>Total:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 30 1186 1539.6\u00a0\u00a0\u00a0 839\u00a0\u00a0 21036<\/p>\n<p>\u00a0<\/p>\n<p>Percentage of the requests served within a certain time (ms)<\/p>\n<p>\u00a0 50%\u00a0\u00a0\u00a0 839<\/p>\n<p>\u00a0 66%\u00a0\u00a0 1414<\/p>\n<p>\u00a0 75%\u00a0\u00a0 1720<\/p>\n<p>\u00a0 80%\u00a0\u00a0 1846<\/p>\n<p>\u00a0 90%\u00a0\u00a0 2088<\/p>\n<p>\u00a0 95%\u00a0\u00a0 3188<\/p>\n<p>\u00a0 98%\u00a0\u00a0 6012<\/p>\n<p>\u00a0 99%\u00a0 10190<\/p>\n<p>\u00a0100%\u00a0 21036 (longest request)<\/p>\n<p>\u00a0<\/p>\n<p>Server load performance<\/p>\n<p># top<\/p>\n<p>top &#8211; 15:15:04 up 33 days, 19:35,\u00a0 3 users,\u00a0 load average: <span style=\"color: #ff0000\">12.57<\/span>, 4.27, 1.80<\/p>\n<p>Tasks: 211 total,\u00a0\u00a0 1 running, 209 sleeping,\u00a0\u00a0 0 stopped,\u00a0\u00a0 1 zombie<\/p>\n<p>Cpu(s): 40.5%us,\u00a0 2.9%sy,\u00a0 0.0%ni, 56.0%id,\u00a0 0.0%wa,\u00a0 0.0%hi,\u00a0 0.5%si,\u00a0 0.0%st<\/p>\n<p>Mem:\u00a0\u00a0 4153976k total,\u00a0 <span style=\"color: #ff0000\">3063280k<\/span> used,\u00a0 1090696k free,\u00a0\u00a0 689184k buffers<\/p>\n<p>Swap:\u00a0 7783288k total,\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0k used,\u00a0 7783288k free,\u00a0 1728440k cached<\/p>\n<p>\u00a0<\/p>\n<p>Load average raise to <span style=\"color: #ff0000\">12.57<\/span> and the memory also raising becoming <span style=\"color: #ff0000\">3063280k<\/span> but the server still okay<\/p>\n<h4>uptime<\/h4>\n<p>\u00a015:23:45 up 33 days, 19:44,\u00a0 3 users,\u00a0 load average: 0.28, 1.28, 1.28<\/p>\n<h5>Take at least 3-5 readings and use the best result<\/h5>\n<h3>Okay that&#8217;s for apache how about for windows ( IIS) ?<\/h3>\n<p>You can use microsoft tools called wast ,\u00a0<\/p>\n<ul type=\"disc\">\n<li><strong><em>Web Application Stress Tool (WAST)<\/em><\/strong>: You can use WAST to simulate the following:\n<ul>\n<li>Simulate the effect of multiple web browsers concurrently connecting to IIS to run applications<\/li>\n<li>Simulate the effect of multiple web browsers concurrently connecting to IIS to download Web content<\/li>\n<li>Simulate different loads so that you can determine the effect on the Web server.\u00a0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>As for the settings you can refer here <a href=\"\/\/www.west-wind.com\/presentations\/webstress\/webstress.htm\">http:\/\/www.west-wind.com\/presentations\/webstress\/webstress.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just several days ago someone ask me , can we benchmark the apache server ? can we set a custom environment to test the apache and server performance ? and i found this tool called ab. What is Ab ? ab\u00a0is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed [&hellip;]<\/p>\n","protected":false},"author":386,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1587],"tags":[1671],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-apache","tag-apache-and-iis-benchmark"],"_links":{"self":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/users\/386"}],"replies":[{"embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=313"}],"version-history":[{"count":15,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":319,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/313\/revisions\/319"}],"wp:attachment":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}