|
2 | 2 |
|
3 | 3 | hperf is a tool for active measurements of the maximum achievable bandwidth between N peers, measuring RX/TX bandwidth for each peers.
|
4 | 4 |
|
5 |
| -## Download |
| 5 | +## What is hperf for |
| 6 | +Hperf was made to test networks in large infrastructure. It's highly scalable and cabaple of running parallel tests over |
| 7 | +a long period of time. |
6 | 8 |
|
7 |
| -[Download Binary Releases](https://github.com/minio/hperf/releases) for various platforms. |
8 |
| - |
9 |
| -## Usecases |
10 |
| -- Calculate baseline RX/TX |
11 |
| -- Debug TOR Switch bottlenecks |
12 |
| -- Calculate roundtrip MS for http requests |
| 9 | +## Getting started |
13 | 10 |
|
14 |
| -## Usage |
15 |
| -Various configurations have been added for controling everything from payload size to http read/write buffers. All flags |
16 |
| -can be seen via `-help`. |
| 11 | +### Download |
| 12 | +[Download Binary Releases](https://github.com/minio/hperf/releases) for various platforms. |
17 | 13 |
|
18 |
| -Hperf can be used without any configuration, just run hperf on all the servers IP1 IP2 IP3 ... respectively. |
| 14 | +### Server |
| 15 | +1. Download hperf and place it in a directory of your choosing |
| 16 | + - This can be automated with deployment tools, hperf is just a single binary |
| 17 | +2. Run hperf help to see a list of available server commands flags and example |
| 18 | +```bash |
| 19 | +$ ./hperf server --help |
19 | 20 | ```
|
20 |
| -./hperf -stream=false -hosts 10.10.1.{1...10} |
21 |
| -┌────────────┬────────────┬───────┬──────────┬───────┬──────────┬─────────────────┬───────────────────┬──────┐ |
22 |
| -│ Local │ Remote │ #RX │ RX │ #TX │ TX │ TX(ms) high/low │ TTFB(ms) high/low │ #Err │ |
23 |
| -├────────────┼────────────┼───────┼──────────┼───────┼──────────┼─────────────────┼───────────────────┼──────┤ |
24 |
| -│ 10.10.10.1 │ 10.10.10.6 │ 14927 │ 1.3 GB/s │ 10681 │ 1.2 GB/s │ 312 / 2 │ 13 / 0 │ 0 │ |
25 |
| -│ 10.10.10.1 │ 10.10.10.2 │ 10880 │ 1.3 GB/s │ 18187 │ 1.2 GB/s │ 260 / 2 │ 13 / 0 │ 0 │ |
26 |
| -│ 10.10.10.1 │ 10.10.10.3 │ 16804 │ 1.3 GB/s │ 17141 │ 1.2 GB/s │ 299 / 2 │ 13 / 0 │ 0 │ |
27 |
| -│ 10.10.10.1 │ 10.10.10.4 │ 18670 │ 1.4 GB/s │ 18920 │ 1.3 GB/s │ 321 / 2 │ 10 / 0 │ 0 │ |
28 |
| -│ 10.10.10.1 │ 10.10.10.5 │ 30070 │ 1.2 GB/s │ 29626 │ 1.3 GB/s │ 636 / 2 │ 10 / 0 │ 0 │ |
29 |
| -│ 10.10.10.1 │ 10.10.10.7 │ 24031 │ 1.3 GB/s │ 27004 │ 1.3 GB/s │ 600 / 2 │ 16 / 0 │ 0 │ |
30 |
| -│ 10.10.10.1 │ 10.10.10.8 │ 20844 │ 1.2 GB/s │ 21870 │ 1.2 GB/s │ 297 / 1 │ 13 / 0 │ 0 │ |
31 |
| -└────────────┴────────────┴───────┴──────────┴───────┴──────────┴─────────────────┴───────────────────┴──────┘ |
32 |
| -``` |
33 |
| - |
34 |
| -Default ports are `9999` make sure your firewalls allow this port. You may optionally configure `./hperf` to use a custom port as well `-port MYPORT` |
| 21 | +3. Run the server with your preferred settings |
35 | 22 |
|
36 |
| -``` |
37 |
| -./hperf -port MYPORT -stream=false -hosts 10.10.1.{1...10} |
38 |
| -┌────────────┬────────────┬───────┬──────────┬───────┬──────────┬─────────────────┬───────────────────┬──────┐ |
39 |
| -│ Local │ Remote │ #RX │ RX │ #TX │ TX │ TX(ms) high/low │ TTFB(ms) high/low │ #Err │ |
40 |
| -├────────────┼────────────┼───────┼──────────┼───────┼──────────┼─────────────────┼───────────────────┼──────┤ |
41 |
| -│ 10.10.10.1 │ 10.10.10.6 │ 14927 │ 1.3 GB/s │ 10681 │ 1.2 GB/s │ 312 / 2 │ 13 / 0 │ 0 │ |
42 |
| -│ 10.10.10.1 │ 10.10.10.2 │ 10880 │ 1.3 GB/s │ 18187 │ 1.2 GB/s │ 260 / 2 │ 13 / 0 │ 0 │ |
43 |
| -│ 10.10.10.1 │ 10.10.10.3 │ 16804 │ 1.3 GB/s │ 17141 │ 1.2 GB/s │ 299 / 2 │ 13 / 0 │ 0 │ |
44 |
| -│ 10.10.10.1 │ 10.10.10.4 │ 18670 │ 1.4 GB/s │ 18920 │ 1.3 GB/s │ 321 / 2 │ 10 / 0 │ 0 │ |
45 |
| -│ 10.10.10.1 │ 10.10.10.5 │ 30070 │ 1.2 GB/s │ 29626 │ 1.3 GB/s │ 636 / 2 │ 10 / 0 │ 0 │ |
46 |
| -│ 10.10.10.1 │ 10.10.10.7 │ 24031 │ 1.3 GB/s │ 27004 │ 1.3 GB/s │ 600 / 2 │ 16 / 0 │ 0 │ |
47 |
| -│ 10.10.10.1 │ 10.10.10.8 │ 20844 │ 1.2 GB/s │ 21870 │ 1.2 GB/s │ 297 / 1 │ 13 / 0 │ 0 │ |
48 |
| -└────────────┴────────────┴───────┴──────────┴───────┴──────────┴─────────────────┴───────────────────┴──────┘ |
| 23 | +### Client |
| 24 | +1. Download hperf |
| 25 | +2. Run hperf help to see available commands, flags and examples |
| 26 | + - The `--hosts` and `--id` flags are especially important to understand |
| 27 | +```bash |
| 28 | +$ ./hperf --help |
| 29 | +$ ./hperf [command] --help |
49 | 30 | ```
|
50 | 31 |
|
51 |
| -## On k8s |
| 32 | +## Common use cases |
| 33 | +- Debugging link/nic MTU issues |
| 34 | +- Optimizing throughput speed for specific payload/buffer sizes |
| 35 | +- Finding servers that present latency on the application level when ping is showing no latency |
| 36 | +- Testing overall network throughput |
| 37 | +- Testing server to server reachability |
52 | 38 |
|
53 |
| -### Using helm |
54 |
| -``` |
55 |
| -helm install https://github.com/minio/hperf/raw/main/helm-releases/hperf-v4.0.0.tgz --generate-name --namespace <my-namespace> |
56 |
| -``` |
57 |
| - |
58 |
| -### Using `yaml` |
| 39 | +## Available Statistics |
| 40 | + - Payload Roundtrip (PMS high/low): |
| 41 | + - Payload transfer time (Milliseconds) |
| 42 | + - Time to first byte (TTFB high/low): |
| 43 | + - This is the amount of time (Milliseconds) it takes between a request being made and the first byte being requested by the receiver |
| 44 | + - Transferred bytes (TX): |
| 45 | + - Bandwidth throughput in KB/s, MB/s, GB/s, etc.. |
| 46 | + - Request count (#TX): |
| 47 | + - The number of HTTP/s requests made |
| 48 | + - Error Count (#ERR): |
| 49 | + - Number of encountered errors |
| 50 | + - Dropped Packets (#Dropped): |
| 51 | + - Total dropped packets on the server (total for all time) |
| 52 | + - Memory (MemUsed): |
| 53 | + - Total memory in use (total for all time) |
| 54 | + - CPU (CPUUsed): |
| 55 | + - Total memory in use (total for all time) |
59 | 56 |
|
| 57 | +## Example test output which uses all stat types |
60 | 58 | ```
|
61 |
| -export NAMESPACE=<my-namespace> |
62 |
| -kubectl apply -f https://github.com/minio/hperf/raw/main/hperf.yaml --namespace $NAMESPACE |
63 |
| -``` |
| 59 | +$ ./hperf requests --hosts 10.10.10.1,10.10.10.2 --id http-test-1 --duration 5 --concurrency 12 |
64 | 60 |
|
65 |
| -### Observe the output |
66 |
| -``` |
67 |
| -kubectl logs --namespace <my-namespace> --max-log-requests <replica-count> -l "app=hperf" -f |
| 61 | +Created Local Remote PMSH PMSL TTFBH TTFBL TX #TX #ERR #Dropped MemUsed CPUUsed |
| 62 | +14:42:09 10.10.10.1 10.10.10.2 19 0 6 0 2.70 GB/s 5129 0 0 40 73 |
| 63 | +14:42:09 10.10.10.2 10.10.10.1 18 0 7 0 2.70 GB/s 5111 0 0 40 63 |
| 64 | +14:42:10 10.10.10.2 10.10.10.1 16 0 8 0 2.69 GB/s 7799 0 0 40 63 |
| 65 | +14:42:10 10.10.10.1 10.10.10.2 17 0 6 0 2.73 GB/s 7862 0 0 40 73 |
| 66 | +14:42:11 10.10.10.1 10.10.10.2 19 0 9 0 2.68 GB/s 10553 0 0 40 89 |
| 67 | +14:42:11 10.10.10.2 10.10.10.1 20 0 6 0 2.67 GB/s 10472 0 0 40 88 |
| 68 | +14:42:12 10.10.10.1 10.10.10.2 17 0 5 0 2.69 GB/s 13238 0 0 40 89 |
| 69 | +14:42:12 10.10.10.2 10.10.10.1 17 0 7 0 2.69 GB/s 13175 0 0 40 88 |
68 | 70 | ```
|
69 |
| - |
70 |
| -### LICENSE |
71 |
| -Use of `hperf` tool is governed by the GNU AGPLv3 license that can be found in the [LICENSE](./LICENSE) file. |
0 commit comments