provides a simple command-line interface for Faban's
HTTP driver. It will automatically create and compile an HTTP driver
its command-line arguments, execute the driver, and print out a summary
fhb is designed for simple benchmarking situations where you want to
test the throughput of a single GET or POST request emulating some
clients. Scalablity of the clients is limited to a single JVM running
single machine; for more sophisticated usage (including driving a
by running multiple agents in multiple JVMs on multiple clients), you
utilize the Faban harness directly.
After execution, the fhb will print out six pieces of information:
ops/sec: The throughput of the server,
measured in requests per second.
% errors: The number of errors (HTTP
result 4xx or 5xx) as a percentage of the total requests
avg. time: The average time (in
seconds) of each request.
max time: The time (in seconds) of the
90th %: 90% of the requests were
processed in less than this number of seconds.
size: The average size of the pages downloaded.
In addition, the driver will complain if various benchmark conditions
met. These indicate that either the server or the client has become
bottlenecked. Pay close attention to the client in this case, as if the
is the bottleneck, the metrics aren't a valid indication of the server
performance (rather, they are an indication of the client performance).
are three possible errors:
Little's law failed verification: If some client requests
Think time deviation is too high: If the time required by
the driver to get a response and process it is greater than the time
Missed target 90%: This is printed if the target 90%
response time is not met.
The first two of these generally indicate that the client isn't able to
up with the server.
Pass a standard JVM option to the underlying Java Virtual
Machine. You may have multiple of these in the command line to pass
multiple JVM options.
Use the given directory to hold output. The default for
this directory is $java.io.tmpdir/faban_cd. Note that this directory is
removed unless the -s option is present.
Use the provided configuration file. Fields in the
supercedes all command line options except -D (output location).
Amount of time to run the benchmark. The benchmark will
have an initial ramp up of rampUp seconds (default 300). It will then
measure the responsed during the steady interval (default 300 seconds),
and finally ramp down for rampDown seconds (default 120).
Amount of time (in milliseconds) each client should wait
between requests. The think time includes the amount of time to process
the request -- if the driver is unable to process the request within
the given think time, it will print an error. The default value is 0.
Save the output of the benchmark run (in the output
directory). This allows you to examine the raw Faban output files for
more detailed data about the benchmark run.
Perform data substitution on the GET or POST request (see
The number of threads in the driver to run. Each thread
represents a unique connection to the server -- that is, each thread is
a client in a logical sense.
Use the given value as the 90% threshold. The default is
Use the data in the file as a POST request
Send the POST request as binary
(application/octet-stream) data rather than form
Sets the http transport provider. Currently the two
options are "sun"
The apache3 provider uses the Apache HttpClient 3.1 stack as the
underlying transport whereas the Sun provider uses the
java.net.HttpURLConnection and java.net.HttpsURLConnection from JavaSE.
To set the property, just use the command line option -J -Dfhb.http.provider=provider. The default is
Attaches the socket auto-timer above or below the ssl
stack. The two
options are "above"
The ssl auto-timing is only applicable to the apache3 transport
provider which uses the Apache HttpClient 3.1 stack as the
underlying transport. To set the property, just use the
command line option -J
The default is attaching the auto-timer above the ssl stack. Attaching
it below excludes the client-side cryptographic processing from the