-
Notifications
You must be signed in to change notification settings - Fork 64
Add NTTTCP full duplex mode #692
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
Open
rudraptpsingh
wants to merge
1
commit into
microsoft:main
Choose a base branch
from
rudraptpsingh:user/rudrasingh/ntttcp-full-duplex
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
718 changes: 718 additions & 0 deletions
718
src/VirtualClient/VirtualClient.Actions.UnitTests/Network/NTttcp/NTttcpFullDuplexTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
371 changes: 346 additions & 25 deletions
371
src/VirtualClient/VirtualClient.Actions/Network/NetworkingWorkload/NTttcp/NTttcpExecutor.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
82 changes: 82 additions & 0 deletions
82
website/docs/workloads/network-suite/network-ntttcp-fullduplex.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # NTTTCP Full-Duplex Mode | ||
| The existing `PERF-NETWORK-NTTTCP.json` profile supports an optional `DuplexMode` parameter that enables bidirectional network throughput testing. | ||
| In full-duplex mode, both nodes simultaneously send and receive traffic, producing separate TX and RX throughput metrics per direction. | ||
|
|
||
| * [Network Suite Workload Details](./network-suite.md) | ||
| * [Client/Server Workloads](../../guides/0020-client-server.md) | ||
|
|
||
| ## How Full-Duplex Differs from Half-Duplex | ||
| In the standard (half-duplex) mode, one node sends while the other receives. In full-duplex mode, each node runs **two NTttcp processes | ||
| simultaneously**: one sender and one receiver. This results in 4 NTttcp processes total across the two systems. | ||
|
|
||
| | Direction | Port | Client | Server | | ||
| |-----------|------|--------|--------| | ||
| | Forward | base port (default 5500) | Sender (`-s`) | Receiver (`-r`) | | ||
| | Reverse | base port + 100 (default 5600) | Receiver (`-r`) | Sender (`-s`) | | ||
|
|
||
| ## Usage | ||
|
|
||
| ``` bash | ||
| # Half-duplex (default, unchanged behavior) | ||
| VirtualClient.exe --profile=PERF-NETWORK-NTTTCP.json --clientId=Client01 --layout-path=/path/to/layout.json | ||
|
|
||
| # Full-duplex (override DuplexMode parameter) | ||
| VirtualClient.exe --profile=PERF-NETWORK-NTTTCP.json --clientId=Client01 --layout-path=/path/to/layout.json --parameters=DuplexMode=Full | ||
| ``` | ||
|
|
||
| ## PERF-NETWORK-NTTTCP.json | ||
| The standard NTttcp profile now includes the `DuplexMode` parameter (default: `Half`). All existing scenarios work unchanged. | ||
| Override with `--parameters=DuplexMode=Full` to enable full-duplex. | ||
|
|
||
| * [Workload Profile](https://github.com/microsoft/VirtualClient/blob/main/src/VirtualClient/VirtualClient.Main/profiles/PERF-NETWORK-NTTTCP.json) | ||
|
|
||
| * **Supported Platform/Architectures** | ||
| * linux-x64 | ||
| * linux-arm64 | ||
| * win-x64 | ||
| * win-arm64 | ||
|
|
||
| * **Supports Disconnected Scenarios** | ||
| * No. Internet connection required. | ||
|
|
||
| * **Dependencies** | ||
| Same as the standard PERF-NETWORK-NTTTCP.json profile: | ||
| * Internet connection. | ||
| * The IP addresses defined in the environment layout for the Client and Server systems must be correct. | ||
| * The name of the Client and Server instances defined in the environment layout must match the agent/client IDs supplied on the command line. | ||
| * Ports 5500 (forward direction) and 5600 (reverse direction) must be available on both systems when using full-duplex mode. | ||
|
|
||
| * **Profile Parameters** | ||
| The following parameter is added for full-duplex support. All other parameters remain unchanged. | ||
|
|
||
| | Parameter | Purpose | Default | | ||
| |-----------|---------|---------| | ||
| | DuplexMode | Set to "Full" for bidirectional testing. Any other value (or unset) uses standard unidirectional testing. | Half | | ||
|
|
||
| * **Scenarios** | ||
| All existing NTTTCP scenarios support full-duplex mode. When `DuplexMode=Full`, each scenario runs both send and receive | ||
| processes on each node. The existing scenario names are unchanged — the `direction` and `duplexMode` metadata in telemetry | ||
| distinguish full-duplex results from half-duplex. | ||
|
|
||
| ## Workload Metrics | ||
| Each scenario produces **four sets of metrics** — sender and receiver metrics on both client and server. The scenario name includes the direction: | ||
|
|
||
| | Metric Name | Unit | Relativity | | ||
| |-------------|------|------------| | ||
| | ThroughputMbps | mbps | Higher is better | | ||
| | TotalBytesMB | MB | Higher is better | | ||
| | AvgBytesPerCompl | B | - | | ||
| | AvgFrameSize | B | - | | ||
| | AvgPacketsPerInterrupt | packets/interrupt | - | | ||
| | InterruptsPerSec | count/sec | - | | ||
| | PacketsRetransmitted | count | Lower is better | | ||
| | Errors | count | Lower is better | | ||
| | CyclesPerByte | cycles/byte | Lower is better | | ||
| | AvgCpuPercentage | % | - | | ||
| | TcpAverageRtt | ms | Lower is better | | ||
|
|
||
| **Telemetry scenario names** follow the pattern: | ||
| * `{Scenario} Client Send` — Client's sender metrics (forward direction) | ||
| * `{Scenario} Client Receive` — Client's receiver metrics (reverse direction) | ||
| * `{Scenario} Server Send` — Server's sender metrics (reverse direction) | ||
| * `{Scenario} Server Receive` — Server's receiver metrics (forward direction) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed. There is a generic "catch" block. This catches ALL exceptions including TimeoutException.