-
Notifications
You must be signed in to change notification settings - Fork 549
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
Add Documentation for secnetperf #3249
Merged
+153
−1
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
This file contains 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 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,152 @@ | ||
# Secured Network Performance Testing | ||
|
||
SecNetPerf is the standard (cross-platform) tool used for performance testing of MsQuic. It implements the protocol defined [here](https://tools.ietf.org/html/draft-banks-quic-performance). This protocol defines a generic interface that allows for client-driven performance testing. | ||
|
||
# Server | ||
|
||
The server generally is meant to be run zero or minimal additional arguments. | ||
|
||
``` | ||
> secnetperf | ||
``` | ||
|
||
There are a few arguments that can be passed to the server: | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
bind | `-bind:<address>` | Binds to the specified local address. | ||
cc | `-cc:<cubic,bbr>` | Congestion control algorithm used. | ||
cibir | `-cibir:<hex_bytes>` | The well-known CIBIR identifier. | ||
cipher | `-cipher:<value>` | Decimal value of 1 or more `QUIC_ALLOWED_CIPHER_SUITE_FLAGS`. | ||
cpu | `-cpu:<cpu_indexes>` | Comma-separated list of CPUs to run on. | ||
ecn | `-ecn:<0,1>` | Enables sender-side ECN support. | ||
exec | `-exec:<lowlat,maxtput,scavenger,realtime>` | The execution profile used for the application. | ||
pollidle | `-pollidle:<time_us>` | The time, in microseconds, to poll while idle before sleeping (falling back to interrupt-driven IO). | ||
stats | `-stats:<0,1>` | Prints out statistics at the end of each connection. | ||
|
||
# Client | ||
|
||
Since tests are client-driven, the client side of secnetperf generally has several arguments passed in to specify which test to run. Many of the arguments are also test specific, but the following (overlap with server) do apply to all: | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
cc | `-cc:<cubic,bbr>` | Congestion control algorithm used. | ||
cipher | `-cipher:<value>` | Decimal value of 1 or more `QUIC_ALLOWED_CIPHER_SUITE_FLAGS`. | ||
cpu | `-cpu:<cpu_indexes>` | Comma-separated list of CPUs to run on. | ||
ecn | `-ecn:<0,1>` | Enables sender-side ECN support. | ||
exec | `-exec:<lowlat,maxtput,scavenger,realtime>` | The execution profile used for the application. | ||
pollidle | `-pollidle:<time_us>` | The time, in microseconds, to poll while idle before sleeping (falling back to interrupt-driven IO). | ||
|
||
## Throughput Test | ||
|
||
To run the throughput test, you must specify the `-test:tput` option, followed by a number of other arguments (most of which are optional). | ||
|
||
### Examples | ||
|
||
``` | ||
> secnetperf.exe -exec:maxtput -test:tput -target:127.0.0.1 -download:10000000 | ||
``` | ||
|
||
``` | ||
> secnetperf.exe -test:tput -target:127.0.0.1 -upload:10000 -timed:1 -stats:1 | ||
``` | ||
|
||
### Required | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
target,server | `-target:<hostname_or_IP>` | The target server to connect to. May be a hostname or an IP address. | ||
download | `-download:<####>` | The length of data in bytes (or time with `-timed:1` arg) to receive. Mutually exclusive with `-upload` arg. | ||
upload | `-upload:<####>` | The length of data in bytes (or time with `-timed:1` arg) to send. Mutually exclusive with `-download` arg. | ||
|
||
### Optional | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
bind | `-bind:<address>` | Binds to the specified local address. | ||
cc | `-cc:<cubic,bbr>` | Congestion control algorithm used. | ||
cibir | `-cibir:<hex_bytes>` | The well-known CIBIR identifier. | ||
comp | `-comp:<####>` | The compartment ID to run in. **Windows Only** | ||
core | `-core:<####>` | The CPU to use for the main thread. | ||
encrypt | `-encrypt:<0,1>` | Enables/disables encryption. | ||
iosize | `-iosize:<####>` | The size of each send request queued. | ||
ip | `-ip:<0,4,6> ` | A hint for the resolving the hostname to an IP address. | ||
pacing | `-pacing:<0,1>` | Whether to use pacing. | ||
port | `-port:<####>` | The UDP port of the server. | ||
sendbuf | `-sendbuf:<0,1>` | Whether to use send buffering. | ||
sstats | `-sstats:<0,1>` | Prints out stream-level statistics at the end of each stream. | ||
stats | `-stats:<0,1>` | Prints out statistics at the end of each connection. | ||
tcp | `-tcp:<0,1>` | Indicates TCP/TLS should be used instead of QUIC. **Windows Only** | ||
timed | `-timed:<0,1>` | Indicates the `upload` & `download` arg represent time (ms). | ||
|
||
## RPS Test | ||
|
||
To run the "request per second" test, you must specify the `-test:rps` option, followed by a number of other arguments (most of which are optional). | ||
|
||
### Examples | ||
|
||
``` | ||
> secnetperf.exe -test:rps -target:127.0.0.1 | ||
``` | ||
|
||
``` | ||
> secnetperf.exe -test:rps -target:127.0.0.1 -runtime:1000 -response:8096 -stats:1 | ||
``` | ||
|
||
### Required | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
target,server | `-target:<hostname_or_IP>` | The target server to connect to. May be a hostname or an IP address. | ||
|
||
### Optional | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
addrs | `-addrs:<####>` | The number of local addresses to use. | ||
affinitize | `-affinitize:<0,1>` | Affinitizes threads to a core. | ||
bind | `-bind:<address>` | Binds to the specified local address. | ||
cibir | `-cibir:<hex_bytes>` | The well-known CIBIR identifier. | ||
conns | `-conns:<####>` | The number of connections to use. | ||
encrypt | `-encrypt:<0,1>` | Enables/disables encryption. | ||
inline | `-inline:<0,1>` | Configured sending requests inline. | ||
ip | `-ip:<0,4,6> ` | A hint for the resolving the hostname to an IP address. | ||
port | `-port:<####>` | The UDP port of the server. | ||
requests | `-requests:<####>` | The number of requests to send at a time. | ||
request | `-request:<####>` | The length of request payloads. | ||
response | `-response:<####>` | The length of request payloads. | ||
runtime | `-runtime:<####>` | The total runtime (in ms). | ||
sendbuf | `-sendbuf:<0,1>` | Whether to use send buffering. | ||
stats | `-stats:<0,1>` | Prints out statistics at the end of each connection. | ||
threads | `-threads:<####>` | The number of threads to use (capped to number of cores). | ||
|
||
## HPS Test | ||
|
||
To run the "handshakes per second" test, you must specify the `-test:hps` option, followed by a number of other arguments (most of which are optional). | ||
|
||
### Examples | ||
|
||
``` | ||
> secnetperf.exe -test:hps -target:127.0.0.1 | ||
``` | ||
|
||
``` | ||
> secnetperf.exe -test:hps -target:127.0.0.1 -runtime:1000 -response:8096 -stats:1 | ||
``` | ||
|
||
### Required | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
target,server | `-target:<hostname_or_IP>` | The target server to connect to. May be a hostname or an IP address. | ||
|
||
### Optional | ||
|
||
Argument | Usage | Meaning | ||
--- | --- | --- | ||
bind | `-bind:<address>` | Binds to the specified local address. | ||
incrementtarget | `-incrementtarget<0,1>` | Set to 1 to append core index to target. | ||
parallel | `-parallel:<####>` | The number of parallel connections per core. | ||
port | `-port:<####>` | The UDP port of the server. | ||
runtime | `-runtime:<####>` | The total runtime (in ms). | ||
threads | `-threads:<####>` | The number of threads to use (capped to number of cores). |
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.
Hi, I saw the - qtip:<0/1>parameter in SecNetPerfMain. Setting this parameter will result in a 100% CPU utilization rate. I would like to give you feedback, and there is also no introduction to this parameter in the readme document.
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.
Hi! Thanks for the feedback. This feature is experimental right now, and isn't documented on purposed. I don't recommend you use it right now.