Apache Ab



Apache Bench

httpd and IHS ship with a cool little command line utility called Apache Bench (ab). At its simplest, you pass the number of requests you want to send (-n), at what concurrency (-c) and the URL to benchmark. ab will return various statistics on the responses (mean, median, max, standard deviation, etc.). This is really useful when you want to 'spot check' backend server performance or compare two different environments, because you do not need to install complex load testing software, and since IHS usually has direct access to WAS, you do not have to worry about firewalls, etc.

  • The output should be compared with the contents of the SHA256 file. Similarly for other hashes (SHA512, SHA1, MD5 etc) which may be provided. Windows 7 and later systems should all now have certUtil.
  • Apache ab 一、Apache ab介绍. Apache ab是一个用于测试HTTP每次请求处理时间的工具, Apache ab也可以模拟并发数量来进行负载测试。也会用到Apache AB进行测试Nginx、IIS 、LVS、Zuul等反向代理的性能。.

Apache FTP module for Apache HTTP Server released as 0.9.6-beta 2008-10-08.

Below is an example execution.

Apache

The key things to look at are:

Apache benchmark windowsApache Ab
  1. Time taken for tests: This is how long it took for all requests finish. When comparing two environments, if your mean and median are similar but total time is worse in one case, this may suggest queueing effects.
  2. Failed requests, write errors, and Non-2xx responses: These may indicate some problem. See below for a caveat on 'Failed requests.'
  3. Requests per second: Throughput.
  4. Total: Look at min, mean, median, max and sd (standard deviation). Usually the mean is the place to start.
  5. Percentage of the requests served within a certain time: Response times on a percentile basis. Many customers look at 95%, but this is arbitrary and usually based on what percentage of requests are expected to have errors or do weird behavior.
Apache ab gui

Apache Abbreviation

Apache Ab

Apache Ab Json Request

Some important notes:

  1. ab has odd behavior in that it counts requests with varying Content-Length headers as 'Failed requests' due to 'length;' for example:

    It is common to have different content lengths, so usually this can be disregarded (only if the 'Length' number counts all the 'failed' requests). There is a patch for this, but it has never made it into the core code: https://issues.apache.org/bugzilla/show_bug.cgi?id=27888.

  2. Non-2xx responses may or may not be okay. HTTP status codes are usually okay if they are 304 (Not Modified), for example. They are usually not okay if they are 4xx or 5xx. To get details on the response code, use '-v 2' which will print a warning for non-2xx response codes and list what the code was.

  3. ab is not a browser, so when you request a page, ab will not fetch any resources within the page such as images, scripts, iframes, etc.

Previous Section (R Project) | Next Section (awk) | Back to Table of Contents





Comments are closed.