Conversation
Add a test script to compare network performance of minikube drivers
(krunkit, vfkit) using iperf3 benchmarks.
The test creates two minikube clusters (server and client) for each
driver, deploys iperf3 using kustomize overlays, and runs benchmarks
across all combinations of:
- Drivers: krunkit, vfkit
- Networks: host (direct VM IP), pod (Kubernetes NodePort)
- Where: host (iperf3 on macOS), vm (iperf3 inside VM)
- Tests: tx, rx, bidir
Command line arguments allow testing specific combinations for
debugging:
% ./test.py run -d krunkit -n host --tests tx rx
The analyze command generates line plots and a markdown report from
the results:
% ./test.py analyze
Example:
% cd test/minikube
% ./test.py run --minikube ~/src/minikube/out/minikube -t 60
Setup krunkit server
Setup krunkit client
Deploying host
Testing krunkit-host-host-tx...
...
Cleanup vfkit
% ./test.py analyze
Created out/plots/host-host.png
Created out/plots/host-vm.png
Created out/plots/pod-host.png
Created out/plots/pod-vm.png
Created out/report.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Results from minikube iperf3 benchmarks comparing krunkit (with offloading) and vfkit drivers on M2 Max. Key findings: - Host network: krunkit 3-5x faster than vfkit (~30 Gbits/s tx, ~47 Gbits/s rx vs ~7-10 Gbits/s) thanks to TSO offloading. - Pod network from host: krunkit still faster (~13 Gbits/s tx, ~50 Gbits/s rx). - Pod network from VM: krunkit broken (~0 Gbits/s) - offloading and pod network don't work together from inside the VM. - Krunkit bidir shows periodic TX/RX oscillation not seen in vfkit, likely a fairness issue in libkrun's virtio-net.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test/minikube/test.pyto compare network performance of minikube drivers(krunkit, vfkit) using iperf3 benchmarks
and direction (tx/rx/bidir) — 24 tests total
Usage
Initial findings (M2 Max, krunkit with offloading)
~47 Gbits/s rx vs ~7-10 Gbits/s)
~50 Gbits/s rx)
and pod network don't work together from inside the VM
seen in vfkit
Issues