Skip to main content

An end-to-end performance and bufferbloat measurement tool

Project description

bbperf - An end-to-end performance and bufferbloat measurement tool

bbperf measures the following for both TCP and UDP:

  • End-to-end latency, both unloaded and loaded
  • Throughput
  • Bandwidth Delay Product (BDP)
  • Usage of buffers between the endpoints
  • Bufferbloat (when the usage of buffers is excessive)

Features that distinguish this tool from existing tools include:

  • Latency, both unloaded and loaded, is measured by the same flow that is under test.

    Other tools will commonly measure latency using a different flow or different protocol. One of the reasons why using different protocols and/or different flows is not desirable is because fair queuing will cause the latency of those other flows to be much lower (better) than the flow that matters.

  • Bufferbloat is calculated

    It is often assumed that TCP receive buffers are the only source of bufferbloat. While that is common, it misses many other locations where bufferbloat may occur. This tool reports the effects of all sources of bufferbloat, not just TCP receive buffers.

  • Automatic generation of graphs

  • The UDP option will automatically adjust the sending rate to just above the goodput rate so that any bufferbloat issues are measured.

Usage

To run a test:

  1. Start the server on one host
    $ bbperf.py -s
  1. Run the client on another host
    $ bbperf.py -c <ip address of server> [additional options as desired]

bbperf will use port 5301 between the client and server (by default).

The first 5 seconds performs a calibration, during which it captures the unloaded latency between endpoints.

The direction of data flow is from the client to the server. That is reversed when the "-R" option is specified.

$ bbperf.py --help
usage: bbperf.py [-h] [-v] [-q] [-s] [-c SERVER_IP] [-p SERVER_PORT] [-R] [-t SECONDS] [-u] [-g] [-k] [-J JSON_FILE]

bbperf: end to end performance and bufferbloat measurement tool

options:
  -h, --help            show this help message and exit
  -v, --verbosity       increase output verbosity (can be repeated)
  -q, --quiet           decrease output verbosity (can be repeated)
  -s, --server          run in server mode
  -c, --client SERVER_IP
                        run in client mode
  -p, --port SERVER_PORT
                        server port (default: 5301)
  -R, --reverse         data flow in download direction (server to client)
  -t, --time SECONDS    duration of run in seconds
  -u, --udp             run in UDP mode (default: TCP mode)
  -g, --graph           generate graph (requires gnuplot)
  -k, --keep            keep data file
  -J, --json-file JSON_FILE
                        JSON output file

Output from bbperf includes the following information:

    sent_time       time when a packet was sent
    recv_time       time when a packet was received
    sender_pps      packets per second sent
    sender_Mbps     bits per second sent
    receiver_pps    packets per second received
    receiver_Mbps   bits per second received
    unloaded_rtt_ms unloaded RTT in milliseconds (determined during calibration)
    rtt_ms          RTT in milliseconds
    BDP_bytes       Calculated BDP in bytes
    buffered_bytes  Actual bytes in flight
    bloat           Ratio of buffered bytes to BDP
    pkts_dropped    number of packets dropped (UDP only)
    drop%           percentage of packets dropped (UDP only)

Output to standard out is controlled via the --verbosity and --quiet options as follows:

    -qq           nothing to stdout except errors
    -q            run summary in json format
(neither option)  progress update once per second plus run summary in json format (default)
    -v            progress update once per 0.1 seconds, additional output, and run summary in json format
    -vv           debugging info useful for developers only

Installation

bbperf is available via PyPI repository (pypi.org) and can be installed using pip.

python3 -m venv bbperf-venv
. bbperf-venv/bin/active
pip install bbperf

bbperf.py [options]

In the event python3 is not already installed on the host:

apt-get install python3 python3-pip  (Debian/Ubuntu)
dnf install python3 python3-pip      (Fedora/RHEL)

Copyright (c) 2024 Cloudflare, Inc.
Licensed under the Apache 2.0 license found in the LICENSE file or at https://www.apache.org/licenses/LICENSE-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bbperf-0.0.4.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bbperf-0.0.4-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file bbperf-0.0.4.tar.gz.

File metadata

  • Download URL: bbperf-0.0.4.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for bbperf-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4179b8496f4e113c1b177fc5f4064818354d04cd68717ae776356b72c2ee8cca
MD5 142f77aca5e92d84799b4addb0be5cab
BLAKE2b-256 1621f2eb092be888ca7385390a7e1bc386ba1df4feb394b02129361ebc957f20

See more details on using hashes here.

File details

Details for the file bbperf-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: bbperf-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for bbperf-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d449931d2b26c0c731e03ed95f8e1b78557d3039305d09b822122f158db74c1d
MD5 9877e0becdd5f6c407b2b4a0657e41d3
BLAKE2b-256 11b3a3d2c35cc6ae6e1da14cef0e2793d96ee0ee0a99132ee1478530c64a1832

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page