Skip to content

Commit e81fd39

Browse files
committed
refactor
almost there Removing binary from pr
1 parent 1b40647 commit e81fd39

37 files changed

+3058
-1296
lines changed

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
dist/
2-
mperf
3-
./nperf
4-
hperf
51
./hperf
6-
deploy.sh
2+
hperf

CREDITS

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131

3232
================================================================
3333

34-
github.com/dustin/go-humanize
35-
https://github.com/dustin/go-humanize
36-
----------------------------------------------------------------
37-
Copyright (c) 2005-2008 Dustin Sallings <[email protected]>
38-
39-
Permission is hereby granted, free of charge, to any person obtaining a copy
40-
of this software and associated documentation files (the "Software"), to deal
41-
in the Software without restriction, including without limitation the rights
42-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
43-
copies of the Software, and to permit persons to whom the Software is
44-
furnished to do so, subject to the following conditions:
45-
46-
The above copyright notice and this permission notice shall be included in
47-
all copies or substantial portions of the Software.
48-
49-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
51-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55-
SOFTWARE.
56-
57-
<http://www.opensource.org/licenses/mit-license.php>
58-
59-
================================================================
60-
6134
github.com/google/uuid
6235
https://github.com/google/uuid
6336
----------------------------------------------------------------

README.md

Lines changed: 54 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,69 @@
22

33
hperf is a tool for active measurements of the maximum achievable bandwidth between N peers, measuring RX/TX bandwidth for each peers.
44

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.
68

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
1310

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.
1713

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
1920
```
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
3522

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
4930
```
5031

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
5238

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)
5956

57+
## Example test output which uses all stat types
6058
```
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
6460
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
6870
```
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

Comments
 (0)