Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement confidence intervals #55

Merged

Conversation

smalleni
Copy link
Collaborator

@smalleni smalleni commented Apr 3, 2023

Resolves: #42

Confidence Interval improves with number of samples - example below

bash-3.2$ ./bin/${ARCH}/k8s-netperf podNetwork --iperf
INFO[2023-04-03 16:43:18] 📒 Reading netperf.yml file.                  
INFO[2023-04-03 16:43:19] 🔬 openshift-monitoring namespace found       
INFO[2023-04-03 16:43:19] Deploying in us-west-2a zone                 
INFO[2023-04-03 16:43:20] ♻️  Using existing Service                   
INFO[2023-04-03 16:43:20] ♻️  Using existing Service                   
INFO[2023-04-03 16:43:20] ♻️  Using existing Deployment                
INFO[2023-04-03 16:43:20] ⏰ Checking for client-across Pods to become ready... 
INFO[2023-04-03 16:43:20] ♻️  Using existing Deployment                
INFO[2023-04-03 16:43:20] ⏰ Checking for server Pods to become ready... 
INFO[2023-04-03 16:43:21] 🗒️  Running netperf TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:43:29] 🗒️  Running netperf TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:43:36] 🗒️  Running iperf3 TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:43:42] 🗒️  Running iperf3 TCP_STREAM (service false) for 5s 
+-------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+--------------------+--------------------------------+
|    RESULT TYPE    | DRIVER  |  SCENARIO  | PARALLELISM | HOST NETWORK | SERVICE | MESSAGE SIZE | SAME NODE | DURATION | SAMPLES |     AVG VALUE      |    95% CONFIDENCE INTERVAL     |
+-------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+--------------------+--------------------------------+
| 📊 Stream Results | netperf | TCP_STREAM | 1           | false        | false   | 1024         | false     | 5        | 2       | 4931.600000 (Mb/s) | 4916.860803-4946.339197 (Mb/s) |
| 📊 Stream Results | iperf3  | TCP_STREAM | 1           | false        | false   | 1024         | false     | 5        | 2       | 2902.035968 (Mb/s) | 2565.730174-3238.341762 (Mb/s) |
+-------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+--------------------+--------------------------------+
+---------------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+-----------------+
|        RESULT TYPE        | DRIVER  |  SCENARIO  | PARALLELISM | HOST NETWORK | SERVICE | MESSAGE SIZE | SAME NODE | DURATION | SAMPLES |  99%TILE VALUE  |
+---------------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+-----------------+
| 📊 Stream Latency Results | netperf | TCP_STREAM | 1           | false        | false   | 1024         | false     | 5        | 2       | 4.000000 (usec) |
+---------------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+-----------------+
(reverse-i-search)`vi': vi containers/Dockerfile 
bash-3.2$ vi netperf.yml 
bash-3.2$ ./bin/${ARCH}/k8s-netperf podNetwork --iperf
INFO[2023-04-03 16:44:23] 📒 Reading netperf.yml file.                  
INFO[2023-04-03 16:44:23] 🔬 openshift-monitoring namespace found       
INFO[2023-04-03 16:44:24] Deploying in us-west-2a zone                 
INFO[2023-04-03 16:44:25] ♻️  Using existing Service                   
INFO[2023-04-03 16:44:25] ♻️  Using existing Service                   
INFO[2023-04-03 16:44:25] ♻️  Using existing Deployment                
INFO[2023-04-03 16:44:25] ⏰ Checking for client-across Pods to become ready... 
INFO[2023-04-03 16:44:25] ♻️  Using existing Deployment                
INFO[2023-04-03 16:44:25] ⏰ Checking for server Pods to become ready... 
INFO[2023-04-03 16:44:26] 🗒️  Running netperf TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:44:34] 🗒️  Running netperf TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:44:41] 🗒️  Running netperf TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:44:49] 🗒️  Running netperf TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:44:57] 🗒️  Running netperf TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:45:05] 🗒️  Running iperf3 TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:45:10] 🗒️  Running iperf3 TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:45:16] 🗒️  Running iperf3 TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:45:22] 🗒️  Running iperf3 TCP_STREAM (service false) for 5s 
INFO[2023-04-03 16:45:28] 🗒️  Running iperf3 TCP_STREAM (service false) for 5s 
+-------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+--------------------+--------------------------------+
|    RESULT TYPE    | DRIVER  |  SCENARIO  | PARALLELISM | HOST NETWORK | SERVICE | MESSAGE SIZE | SAME NODE | DURATION | SAMPLES |     AVG VALUE      |    95% CONFIDENCE INTERVAL     |
+-------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+--------------------+--------------------------------+
| 📊 Stream Results | netperf | TCP_STREAM | 1           | false        | false   | 1024         | false     | 5        | 5       | 4929.180000 (Mb/s) | 4919.596023-4938.763977 (Mb/s) |
| 📊 Stream Results | iperf3  | TCP_STREAM | 1           | false        | false   | 1024         | false     | 5        | 5       | 2807.974605 (Mb/s) | 2593.552710-3022.396500 (Mb/s) |
+-------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+--------------------+--------------------------------+
+---------------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+-----------------+
|        RESULT TYPE        | DRIVER  |  SCENARIO  | PARALLELISM | HOST NETWORK | SERVICE | MESSAGE SIZE | SAME NODE | DURATION | SAMPLES |  99%TILE VALUE  |
+---------------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+-----------------+
| 📊 Stream Latency Results | netperf | TCP_STREAM | 1           | false        | false   | 1024         | false     | 5        | 5       | 4.000000 (usec) |
+---------------------------+---------+------------+-------------+--------------+---------+--------------+-----------+----------+---------+-----------------+

@smalleni smalleni force-pushed the confidence_interval_throughput branch 2 times, most recently from 4f18ba5 to 57b69c7 Compare April 3, 2023 21:56
@vishnuchalla
Copy link
Collaborator

Code changes look good to me. But looks like netperf and iperf differ by more than 1.5 times when it comes to throughput.

@jtaleric
Copy link
Member

jtaleric commented Apr 4, 2023

Code changes look good to me. But looks like netperf and iperf differ by more than 1.5 times when it comes to throughput.

Yeah, I noticed this at smaller packet sizes...

@jtaleric
Copy link
Member

jtaleric commented Apr 5, 2023

Code changes look good to me. But looks like netperf and iperf differ by more than 1.5 times when it comes to throughput.

Yeah, I noticed this at smaller packet sizes...

Seems relevant - esnet/iperf#1078

also, w/ jumbo frames, and smaller message sizes (1024 or really anything < 4096) w/ iperf3 we see a significant difference between netperf and iperf3.

@jtaleric
Copy link
Member

jtaleric commented Apr 6, 2023

Can you push another commit after running; go mod tidy; go mod vendor

Copy link
Collaborator

@vishnuchalla vishnuchalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core logic looks good to me except for the workflow check failures.

@jtaleric
Copy link
Member

jtaleric commented Apr 6, 2023

Core logic looks good to me except for the workflow check failures.

locally it failed to build for me, i had to run go mod tidy; go mod vendor

20:44 $ make clean; make build
GOARCH=amd64 CGO_ENABLED=0 go build -v -mod vendor -o bin/amd64/k8s-netperf  ./cmd/k8s-netperf
pkg/results/result.go:16:2: cannot find package "." in:
	/home/jtaleric/code/k8s-netperf/vendor/github.com/aclements/go-moremath/stats
make: *** [Makefile:32: bin/amd64/k8s-netperf] Error 1
GOARCH=amd64 CGO_ENABLED=0 go build -v -mod vendor -o bin/amd64/k8s-netperf  ./cmd/k8s-netperf
pkg/results/result.go:16:2: cannot find package "." in:
	/home/jtaleric/code/k8s-netperf/vendor/github.com/aclements/go-moremath/stats
make: *** [Makefile:32: bin/amd64/k8s-netperf] Error 1

@smalleni smalleni force-pushed the confidence_interval_throughput branch from 57b69c7 to 542510a Compare April 6, 2023 14:14
Resolves: cloud-bulldozer#42

Signed-off-by: Sai Sindhur Malleni <[email protected]>
@smalleni smalleni force-pushed the confidence_interval_throughput branch from 542510a to 89f1cb3 Compare April 6, 2023 15:22
@jtaleric jtaleric merged commit 0359a2e into cloud-bulldozer:main Apr 6, 2023
@rsevilla87
Copy link
Member

@smalleni @jtaleric , some of the research on the iperf3 side about this in case you have interest:
esnet/iperf#1078 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Confidence score in the end result
4 participants