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)

For UDP, it also measures:

  • Packet rates
  • Packet loss rates

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

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] [-s] [-c SERVER_IP] [-p SERVER_PORT] [-R] [-t SECONDS] [-u] [-b BANDWIDTH] [-g] [-k]

bbperf: end to end performance and bufferbloat measurement tool

options:
  -h, --help            show this help message and exit
  -v, --verbosity       increase output verbosity
  -s, --server          run in server mode
  -c SERVER_IP, --client SERVER_IP
                        run in client mode
  -p SERVER_PORT, --port SERVER_PORT
                        server port (default: 5301)
  -R, --reverse         data flow in download direction (server to client)
  -t SECONDS, --time SECONDS
                        duration of run in seconds
  -u, --udp             run in UDP mode (default: TCP mode)
  -b BANDWIDTH, --bandwidth BANDWIDTH
                        n[kmgKMG] | n[kmgKMG]pps
  -g, --graph           generate graph (requires gnuplot)
  -k, --keep            keep data 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)

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.1.tar.gz (13.5 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.1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bbperf-0.0.1.tar.gz
  • Upload date:
  • Size: 13.5 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.1.tar.gz
Algorithm Hash digest
SHA256 09f37885640cd72ee7ab0f59bb8aa6a5e5ea25d0f12b60c94fef7185b802b7ab
MD5 57b9f978d3b22d5dcaa1c3e72bec8238
BLAKE2b-256 f0bbd5d53d37114d81f3722b09573cf11345ca7384d8c558927f1d7152926b17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bbperf-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44d6bd379dd57fb813b997d2320f3c1575458723bb050350638a8e63446ab874
MD5 0bc54de27e058841db813e48d8461de0
BLAKE2b-256 47ec686c45b7456876182e1281ff82cc00b3dffc71160a55ca557cef33b8f4f3

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