As a standard part of the Apache distribution, Apache Bench or “ab” as it is commonly called, is an easy way to quickly judge the performance of a web server. The program is operated from the command line, making it ideal for deployment on a regular testing basis, via cron or other means. The program can be directed to test a specific url, with cookies attached as well. This adds a higher degree of control to the testing abilities of the program.

When Apache Bench completes a test, it responds with a list of standard performance statistics. These statistics usually include the time taken to connect, the total amount of data transferred, and the time it took to transfer that data on average. Apache Benchmark can be initiated with a set of command line parameters, such as the number of requests to make, and the level of concurrency to use. When a higher concurrency level is selected, Apache Bench will make requests at the same time, adding further load to the server.

Apache Bench is capable of running both on the server and remotely. When run on the server, it represents the performance of the machine and its code. Running remotely allows the tester to factor in network delays and other problems. When operating remotely, Apache Bench can perform basic authentication tasks, allowing it to work over secure connections.

As a command line process, Apache Bench is easy to automate using cron or other tools. Even better, the results of a test can be saved to a CSV format file. This allows the tester to incorporate test results in programs such as Excel, or a graphing utility.

Apache Bench is an excellent way to regularly test the performance of individual software components. The command line cookie addition allows the program to individually test scripts with the correct inputs. Running these tests on a schedule over a remote connection can help to build an accurate picture of overall server performance. Apache Bench has virtually no learning curve, and can be run with very minimal effort on the part of the tester.

On the other hand, Apache Bench does not offer the comprehensive testing options found in some enterprise solutions. Although cookies can be added to the scenario, the detailed web services testing found in plugins like Selenium is not to be found here. For simple load testing needs, however, Apache Bench should suffice.

Similar Posts