Buy @ Amazon

Search This Blog

October 20, 2010

Benchmarking Web Application with Autobench

When it comes to do performance testing of a web application, there crops up crazy many questions like,  "What all aspects of the web application do we need to cover as part of performance testing?", "What are the different tools that are readily available?", "How much money can we or the company spend in this effort?", "Where do I start from?", "What all tools should I consider?", "On what basis should I filter some of them for further consideration?", etc.

I'm not going to provide insight on what is the best way to go about it or even publish how we went about doing it all. I will however blog on those points sooner or later. If you however have crossed these points and made up your mind to spike or consider using Autobench, then read on......and share me your experience or comments.

What is Autobench?
Autobench is an open-sourced tool to do fairly decent performance testing of any web application. It is a wrapper on top of another open-sourced tool called Httperf. This is a command-line tool like its partner Httperf.

What are its features?
Some of the feature of Autobench are as follows:
  • Its open-sourced.
  • Its commnad-line tool.
  • It can generate reports in tsv (tab seperated view) or csv (comma seperated view) formats.
  • From the tsv report, graphs can be generated with accompanying tool called bench2graph that gets installed along with autobench.
  • Easy to install.

What are its drabacks?
Some of its drawbacks being:
  • Its graphs are not very intutive enough in the sense that x-axis and y-axis are not marked with requests/sec and responses/sec respectively.
  • Its not very handy tool to do soak-testing of an application.

What is the installation procedure?
  • Download the Autobench source tarball from http://www.xenoclast.org/autobench/ (For the purpose of example, let it be autobench-2.1.2.tar.gz)
  • Untar it with the following command:
    • $ tar xvfz autobench-2.1.2.tar.gz
  • Now change present working directory to the extracted directory (autobench-2.1.2)
    • $ sudo make
      Command output:
      gcc -O2 -Wall -o crfile crfile.c
      crfile.c: In function ‘write_buffer’:
      crfile.c:81: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
      crfile.c: In function ‘main’:
      crfile.c:173: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
      gcc -O2 -Wall -o sesslog sesslog.c 

  • And finally run the below mentioned command:
    • $ sudo make install
      Command output:
      mkdir -p /usr/local/bin /usr/local/etc /usr/local/man/man1
      perl -pi -e 's/my \$MASTER_CONFIG =.*$/my \$MASTER_CONFIG = "$ENV{AB_CFG}";/' autobench
      cp crfile autobench autobenchd autobench_admin sesslog bench2graph /usr/local/bin
      cp autobenchd.1 autobench_admin.1 crfile.1 autobench.1 sesslog.1 bench2graph.1 /usr/local/man/man1
      cp autobench.conf /usr/local/etc


Testing/Using autobench and bench2graph


$ autobench
    Autobench configuration file not found
     - installing new copy in /home/karthik/.autobench.conf
    Installation complete - please rerun autobench
Note that, /usr/local/etc/autobench.conf
Default configuration file, copied into the user's home directory when autobench is first run.


$HOME/.autobench.conf   #The active autobench configuration file.


$ bench2graph
    Usage          : bench2graph PARAM_1 PARAM_2 [PARAM_3 ... PARAM_N]
    Parameter 1    : autobench results file
    Parameter 2    : name of the postscript output file
    Parameter 3..N : [optional] columns to display in the graphic

$ bench2graph autobench_results.tsv autobench_results_graph.ps
    Enter the title : Test Graphical Results For All Data
    /usr/local/bin/bench2graph: 90: gnuplot: not found


[Work In Progress...Do visit again...]