-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
89 lines (63 loc) · 3.29 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# 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
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
$ 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
To run a test:
Start the server on one host
$ bbperf.py -s
Run the client on another host
$ bbperf.py -c <ip address of server> [additional options as desired]
By default, bbperf will use port 5301 between the client and server.
The first 5 seconds performs a calibration, during which it captures the unloaded latency between endpoints.
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)
By default, the client is the sender and the server is the receiver. That is reversed when
the "-R" option is specified.