fhb
provides a simple command-line interface for Faban's
HTTP driver. It will automatically create and compile an HTTP driver
based on
its command-line arguments, execute the driver, and print out a summary
of the
benchmark results.
fhb is designed for simple benchmarking situations where you want to
test the throughput of a single GET or POST request emulating some
number of
clients. Scalablity of the clients is limited to a single JVM running
on a
single machine; for more sophisticated usage (including driving a
larger load
by running multiple agents in multiple JVMs on multiple clients), you
must
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
slowest request.
90th %: 90% of the requests were
processed in less than this number of seconds.
content
size: The average size of the pages downloaded.
In addition, the driver will complain if various benchmark conditions
aren't
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
client
is the bottleneck, the metrics aren't a valid indication of the server
performance (rather, they are an indication of the client performance).
There
are three possible errors:
Little's law failed verification: If some client requests
aren't satisfied
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
requested.
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
keep
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.
-Doutput directory
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.
-ffile
Use the provided configuration file. Fields in the
configuration file
supercedes all command line options except -D (output location).
-rrampUp/steady/rampDown
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).
-WthinkTime
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.
-s
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.
-S
Perform data substitution on the GET or POST request (see
Examples)
-cnumThreads
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.
-t90% threshold
Use the given value as the 90% threshold. The default is
1.0 seconds.
-pfile
Use the data in the file as a POST request
-b
Send the POST request as binary
(application/octet-stream) data rather than form
(application/x-www-form-urlencoded).
Sets the http transport provider. Currently the two
options are "sun"
and "apache3."
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
apache3.
faban.ssl.autotiming
Attaches the socket auto-timer above or below the ssl
stack. The two
options are "above"
and "below."
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
-Dfaban.ssl.autotiming=[above|below].
The default is attaching the auto-timer above the ssl stack. Attaching
it below excludes the client-side cryptographic processing from the
reported times.
The
configuration file allows specifying more elaborate benchmarks, albeit
not as elaborate as writing a full-fledged Faban driver. The steps for
specifying the configuration file are explaining at this location: http://faban.sunsource.net/docs/guide/driver/http.html