Java Reference
In-Depth Information
There are many open source and commercial load-generating tools. The examples in this topic
utilize Faban , an open source, Java-based load generator. Faban comes with a simple program
( fhb ) that can be used to measure the performance of a simple URL:
% fhb -W 1000 -r 300/300/60 -c 25 http://host:port/StockServlet?stock=SDO
ops/sec: 8.247
% errors: 0.0
avg. time: 0.022
max time: 0.045
90th %: 0.030
95th %: 0.035
99th %: 0.035
This example measures 25 clients ( -c 25 ) making requests to the stock servlet (requesting sym-
bol SDO); each request has a 1-second cycle time ( -W 1000 ). The benchmark has a 5-minute
(300-second) warm-up period, followed by a 5-minute measurement period and a 1-minute ramp-
down period ( -r 300/300/60 ). Following the test, fhb reports the OPS and various response
times for the test (and because this example includes think time, the response times are the im-
portant metric, while the OPS will be more or less constant).
fhb can handle POST data with limited substitutions, and limited scripting with multiple URLs.
For more complex tests, Faban has a useful framework for defining benchmark load generators in
1. Batch-oriented tests (or any test without a warm-up period) have been infre-
quently used in Java performance testing, but they can yield valuable results.
2. Other tests can measure either throughput or response time, depending on whether
the load comes in at a fixed rate (i.e., based on emulating think time in the client).
Search WWH ::

Custom Search