Run the benchmark test using TPLoad CLI
TPLoad CLI supports the benchmark command to measure the throughput between left and right Generators or the session setup rate of the Packet Gateway (PGW).
Benchmark test has three phases:
- WarmUp phase - create requested number of sessions and warm up the system under test (SUT) with
session-setup-rateduringhold-time. - Search phase - depending on the search function type (linear or binary), detect the maximum throughput with the given
lost-acceptabledrop rate. - TearDown phase - delete all created sessions and report the result.
Flags
Both types of the search function have flags that can be divided into four groups: general, benchmark, common, and function-specific (for the linear and binary search groups respectively).
General group
The general group contains flags for connecting to TPLoad and selecting the search function:
Control Plane group
The Control Plane group contains flags that control the sessions used in the benchmark test:
Data Plane group
The Data Plane group contains flags that control the traffic generated during the benchmark test:
Linear search group
The linear search group contains the flag specific to the linear search function:
Binary search group
The binary search group contains the flag specific to the binary search function:
Rate setup group
The rate setup group contains flags specific to the session setup rate benchmark:
Configuration file
Instead of passing every flag on the command line, you can predefine a benchmark run in a YAML file and point to it with --config (or -c):
Each key in the file matches a benchmark flag name (the same name as the long flag, without the leading --). For example, the following command:
is equivalent to the following ~/pps-bench.yaml:
Notes:
- Command-line flags override the configuration file. This lets you keep a base configuration and tweak individual values, for example:
--config ~/pps-bench.yaml --concurrent-sessions 5000. - Unknown keys are rejected. A key that does not match a benchmark flag aborts the run with an error, which helps catch typos.
- Missing or malformed files are rejected with a descriptive error.
- Any flag omitted from the file keeps its default value.
Usage
WarmUp phase
During this phase, the benchmark test:
- Creates the
--concurrent-sessionsnumber of sessions at the--session-setup-raterate. - For the
--hold-time, generates traffic with the given traffic and burst profiles at the--forwarding-raterate. - After the
--hold-time, the WarmUp phase stops.
Search phase
The search phase can use two different types of the search function that you can specify with the --type flag.
Linear search
Linear search function searches the maximum rate with the sequential increase of the throughput from --forwarding-rate with the --forwarding-rate-step size.
During this phase, the function:
- Sets the throughput to the
--forwarding-rate. - Gathers traffic statistics every 10 seconds for
--hold-time. - Takes a decision about the next step:
- If more than half of the points have a combined drop rate (upload + download) lower than
--lost-acceptable, add the--forwarding-rate-stepto the current rate. - If more than half of the points have a combined drop rate higher than
--lost-acceptable, take the statistics from the previous step as the result.
- If more than half of the points have a combined drop rate (upload + download) lower than
Binary search
Binary search function contains two steps:
- Search the maximum rate with the sequential increase of the throughput by two.
- Search for the throughput with the given
--lost-acceptablebetween 0 and foundMax.
During this phase, the function:
- Sets the throughput to the
--forwarding-rate. - Gathers traffic statistics every 10 seconds for
--hold-time. - Takes a decision of the next step:
- If more than half of the points have a combined drop rate (upload + download) lower than
--lost-acceptable, multiply the current rate by two. - If more than half of the points have a combined drop rate higher than
--lost-acceptable, take the current rate asMax.
- If more than half of the points have a combined drop rate (upload + download) lower than
- Starts searching for the rate. Sets the rate to the half between [
0,Max]. - Gathers traffic statistics every 10 seconds for
--hold-time. - Takes a decision about the next step:
- If more than half of the points have combined drop rate (upload + download) lower than
--lost-acceptable, set the current rate to half between [current_rate,Max]. - If more than half of the points have a combined drop rate higher than
--lost-acceptable, set the current rate to half between [0,current_rate].
- If more than half of the points have combined drop rate (upload + download) lower than
- Checks the difference between
current_ratefrom this and previous step.- If the difference is lower than
--convergence, stop the test and take the result. - If the difference is higher, continue the search.
- If the difference is lower than
Rate setup
Rate setup function measures the maximum setup rate of the Packet Gateway (PGW) with the sequential increase of the CSR-DSR rate from --session-setup-rate with the --step-rate-size. This benchmark requires the session churn enabled.
During this phase, the function:
- Sets the GTPv2 churn rate to the
--session-setup-rate. - Gathers request statistics every 10 seconds for
--hold-time. - Decides about the next step:
- If the average success rate for requests is higher than
--success-rate, add the--step-rate-sizeto the current rate. - If the average success rate for requests is lower than
--success-rate, take the statistics from the previous step as the result.
- If the average success rate for requests is higher than
TearDown phase
During the TearDown phase, the benchmark test terminates the sessions at the --session-setup-rate rate and writes raw and human-readable data to the --output-file.
Examples
Measure the throughput with the linear search benchmark, with the session churn enabled:
Measure the throughput with the binary search benchmark, with the session churn enabled:
Measure the maximum session setup rate:
Run a benchmark predefined in a configuration file (see Configuration file):
Result example
Here is the example of the test result: