For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

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:

  1. WarmUp phase - create requested number of sessions and warm up the system under test (SUT) with session-setup-rate during hold-time.
  2. Search phase - depending on the search function type (linear or binary), detect the maximum throughput with the given lost-acceptable drop rate.
  3. 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):

bash

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:

bash

is equivalent to the following ~/pps-bench.yaml:

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:

  1. Creates the --concurrent-sessions number of sessions at the --session-setup-rate rate.
  2. For the --hold-time, generates traffic with the given traffic and burst profiles at the --forwarding-rate rate.
  3. 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 function searches the maximum rate with the sequential increase of the throughput from --forwarding-rate with the --forwarding-rate-step size.

Linear search rate graph
Linear search rate graph

During this phase, the function:

  1. Sets the throughput to the --forwarding-rate.
  2. Gathers traffic statistics every 10 seconds for --hold-time.
  3. 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-step to 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.

Binary search function contains two steps:

  1. Search the maximum rate with the sequential increase of the throughput by two.
  2. Search for the throughput with the given --lost-acceptable between 0 and found Max.
Binary search rate graph
Binary search rate graph

During this phase, the function:

  1. Sets the throughput to the --forwarding-rate.
  2. Gathers traffic statistics every 10 seconds for --hold-time.
  3. 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 as Max.
  4. Starts searching for the rate. Sets the rate to the half between [0, Max].
  5. Gathers traffic statistics every 10 seconds for --hold-time.
  6. 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].
  7. Checks the difference between current_rate from 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.

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:

  1. Sets the GTPv2 churn rate to the --session-setup-rate.
  2. Gathers request statistics every 10 seconds for --hold-time.
  3. Decides about the next step:
    • If the average success rate for requests is higher than --success-rate, add the --step-rate-size to 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.

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:

bash

Measure the throughput with the binary search benchmark, with the session churn enabled:

bash

Measure the maximum session setup rate:

bash

Run a benchmark predefined in a configuration file (see Configuration file):

bash

Result example

Here is the example of the test result:

json