Validate passthrough network line rate#4576
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens passthrough network performance validation by (1) driving UDP iperf3 at an explicit target bitrate derived from NIC line rate, and (2) enforcing a minimum delivered-throughput threshold (90% of bottleneck link speed) while also reporting the achieved line-rate percentage as a metric.
Changes:
- Add passthrough line-rate detection (via ethtool / Get-NetAdapter) and enforce a 90% line-rate threshold across iperf3 and ntttcp passthrough performance runs.
- Extend
perf_iperfto optionally set UDP bandwidth (-b) based on a total target Gbps, and return performance messages for downstream validation. - Adjust UDP iperf3 performance message aggregation to sum throughput across iperf instances (instead of averaging), aligning reported throughput with total delivered traffic.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lisa/tools/iperf3.py | Fix UDP throughput aggregation so reported TX/RX reflects total throughput across iperf instances. |
| lisa/microsoft/testsuites/performance/networkperf_passthrough.py | Add link-speed discovery, line-rate threshold assertion, and unified perf metrics for passthrough line-rate percent and thresholds. |
| lisa/microsoft/testsuites/performance/common.py | Add optional UDP bitrate calculation for iperf3 and return perf messages for validations/metrics. |
|
| Count | |
|---|---|
| ✅ Passed | 12 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 3 |
| Total | 15 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_epoll (lisa_0_11) | ✅ PASSED | 195.182 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2023.934 | |
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ✅ PASSED | 5480.628 | |
| perf_nested_hyperv_storage_multidisk (lisa_0_5) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1619.457 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4424.381 | |
| perf_ultra_datadisks_1024k (lisa_0_36) | ✅ PASSED | 1089.509 | |
| perf_storage_generic_fio_test (lisa_0_52) | ✅ PASSED | 4397.123 | |
| perf_ultra_datadisks_4k (lisa_0_35) | ✅ PASSED | 4419.775 | |
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5347.689 | |
| perf_tcp_latency_sriov (lisa_0_13) | ✅ PASSED | 203.808 | |
| perf_tcp_single_pps_sriov (lisa_0_15) | ✅ PASSED | 180.016 | |
| perf_tcp_max_pps_sriov (lisa_0_17) | ✅ PASSED | 145.297 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
lisa/microsoft/testsuites/performance/common.py:789
- Avoid bare
assertstatements inperf_iperf; they can be stripped with Python optimizations and also don't follow the project’s assertpy-based assertion style used elsewhere in this module. Useassert_that(...).is_not_none()(and cast) forserver,client, andenvironmentvalidation.
if server is not None or client is not None:
assert server is not None, "server need to be specified, if client is set"
assert client is not None, "client need to be specified, if server is set"
else:
environment = test_result.environment
|
| Count | |
|---|---|
| ✅ Passed | 12 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 3 |
| Total | 15 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_epoll (lisa_0_11) | ✅ PASSED | 185.907 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2037.068 | |
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ✅ PASSED | 5461.781 | |
| perf_nested_hyperv_storage_multidisk (lisa_0_5) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5333.380 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1619.457 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4411.790 | |
| perf_ultra_datadisks_1024k (lisa_0_36) | ✅ PASSED | 1062.245 | |
| perf_storage_generic_fio_test (lisa_0_52) | ✅ PASSED | 4455.789 | |
| perf_ultra_datadisks_4k (lisa_0_35) | ✅ PASSED | 4368.662 | |
| perf_tcp_latency_sriov (lisa_0_13) | ✅ PASSED | 181.979 | |
| perf_tcp_single_pps_sriov (lisa_0_15) | ✅ PASSED | 167.146 | |
| perf_tcp_max_pps_sriov (lisa_0_17) | ✅ PASSED | 132.495 |
45f5e8d to
4b418c2
Compare
|
| Count | |
|---|---|
| ✅ Passed | 10 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 3 |
| Total | 13 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5343.954 | |
| perf_epoll (lisa_0_11) | ✅ PASSED | 196.222 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2109.270 | |
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ✅ PASSED | 5472.142 | |
| perf_nested_hyperv_storage_multidisk (lisa_0_5) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1632.481 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4427.419 | |
| perf_ultra_datadisks_1024k (lisa_0_36) | ✅ PASSED | 1078.596 | |
| perf_storage_generic_fio_test (lisa_0_52) | ✅ PASSED | 4549.476 | |
| perf_ultra_datadisks_4k (lisa_0_35) | ✅ PASSED | 4392.184 | |
| perf_tcp_latency_sriov (lisa_0_13) | ✅ PASSED | 343.230 |
|
| Count | |
|---|---|
| ✅ Passed | 3 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 1 |
| Total | 4 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_epoll (lisa_0_11) | ✅ PASSED | 189.663 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2119.714 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1612.025 |
|
| Count | |
|---|---|
| ✅ Passed | 12 |
| ❌ Failed | 1 |
| ⏭️ Skipped | 3 |
| Total | 16 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ✅ PASSED | 6022.268 | |
| perf_nested_hyperv_storage_multidisk (lisa_0_5) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_multidisk (lisa_0_3) | ❌ FAILED | 703.713 | failed. LisaException: command '['sudo', 'sh', '-c', 'openssl passwd -6 #EcZLM4eSkQZI%2d']' timeout after 600 seconds. |
| perf_epoll (lisa_0_11) | ✅ PASSED | 196.782 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 1996.081 | |
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5341.313 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1647.612 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4425.988 | |
| perf_ultra_datadisks_1024k (lisa_0_36) | ✅ PASSED | 1063.096 | |
| perf_storage_generic_fio_test (lisa_0_52) | ✅ PASSED | 4460.355 | |
| perf_ultra_datadisks_4k (lisa_0_35) | ✅ PASSED | 4383.827 | |
| perf_tcp_latency_sriov (lisa_0_13) | ✅ PASSED | 199.889 | |
| perf_tcp_single_pps_sriov (lisa_0_15) | ✅ PASSED | 179.217 | |
| perf_tcp_max_pps_sriov (lisa_0_17) | ✅ PASSED | 147.037 |
|
| Count | |
|---|---|
| ✅ Passed | 6 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 1 |
| Total | 7 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5356.793 | |
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ✅ PASSED | 5482.501 | |
| perf_epoll (lisa_0_11) | ✅ PASSED | 195.458 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2050.363 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1614.875 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4422.110 |
Add line-rate validation for network passthrough performance tests and report the result in the top-level test summary. The validation compares the peak delivered throughput sample with the bottleneck NIC line rate and emits unified perf metrics for line rate, peak throughput, and achieved percentage. Drive UDP iperf above line rate so the test can saturate the passthrough NIC, normalize TCP and UDP throughput samples through Decimal, and skip line-rate validation clearly when NIC link speed is unavailable or non-positive. Refresh passthrough NIC state after guest reboots and ntttcp setup, preserve host DHCP state by avoiding host reboot for TasksMax setup, and fall back to uptime when who -b times out during reboot boot-time detection. Address review and CI feedback by deriving threshold text from the configured constant and using non-optional node aliases in perf helper lambdas for mypy.
319c26c to
0cfa11c
Compare
|
| Count | |
|---|---|
| ✅ Passed | 11 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 3 |
| Total | 14 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_epoll (lisa_0_11) | ✅ PASSED | 195.103 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2047.973 | |
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ✅ PASSED | 5512.047 | |
| perf_nested_hyperv_storage_multidisk (lisa_0_5) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5354.848 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1624.794 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4428.974 | |
| perf_ultra_datadisks_1024k (lisa_0_36) | ✅ PASSED | 1066.454 | |
| perf_storage_generic_fio_test (lisa_0_52) | ✅ PASSED | 4445.917 | |
| perf_ultra_datadisks_4k (lisa_0_35) | ✅ PASSED | 4381.209 | |
| perf_tcp_latency_sriov (lisa_0_13) | ✅ PASSED | 215.592 | |
| perf_tcp_single_pps_sriov (lisa_0_15) | ✅ PASSED | 177.477 |
Add line-rate threshold validation for passthrough network performance tests.
Drive UDP iperf tests at the requested line rate so pass and fail decisions use the intended target.
Report the achieved line-rate percentage for passing tests so results expose the measured margin, not only failures.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results