-
Notifications
You must be signed in to change notification settings - Fork 244
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 option to enable multuple H/3 connections #1998
Conversation
@@ -15,6 +15,7 @@ public class ClientOptionsBinder : BinderBase<ClientOptions> | |||
public static Option<int> ConcurrencyPerHttpClientOption { get; } = new Option<int>("--concurrencyPerHttpClient", () => 1, "Number of concurrect requests per one HttpClient"); | |||
public static Option<int> Http11MaxConnectionsPerServerOption { get; } = new Option<int>("--http11MaxConnectionsPerServer", () => 0, "Max number of HTTP/1.1 connections per server, 0 for unlimited"); | |||
public static Option<bool> Http20EnableMultipleConnectionsOption { get; } = new Option<bool>("--http20EnableMultipleConnections", () => true, "Enable multiple HTTP/2.0 connections"); | |||
public static Option<bool> Http30EnableMultipleConnectionsOption { get; } = new Option<bool>("--http30EnableMultipleConnections", () => true, "Enable multiple HTTP/3.0 connections"); |
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.
I wonder if we maybe should keep the default as false for the time being.
Otherwise if we merge it like that, all the CI tests will start using that by default, but I think it should be a clear parameter as with H/2 (h2 vs h2multiconn)
It's not a blocker, just a way not to mix up measurements.
Or we can change both crank config yml and ci test config yml right away to include the parameter
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.
???
Do you want me to change something here or not?
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.
(1)
"Keep the default as false" -- Minimal change
- ... new Option<bool>(..., () => true, ...);
+ ... new Option<bool>(..., () => false, ...);
-OR-
(2)
"Change crank config yml" -- Modify scenarios/httpclient.benchmarks.yml to include new parameter as a variable (with default value = false), e.g.:
http20EnableMultipleConnections: true |
and pass it to client, e.g.:
--http20EnableMultipleConnections {{http20EnableMultipleConnections}}
arguments: '--address {{host}} --port {{serverPort}} --useHttps {{useHttps}} --path /{{scenario}} --scenario {{scenario}} --httpVersion {{httpVersion}} --numberOfHttpClients {{numberOfHttpClients}} --concurrencyPerHttpClient {{concurrencyPerHttpClient}} --http11MaxConnectionsPerServer {{http11MaxConnectionsPerServer}} --http20EnableMultipleConnections {{http20EnableMultipleConnections}} --useWinHttpHandler {{useWinHttpHandler}} --useHttpMessageInvoker {{useHttpMessageInvoker}} --collectRequestTimings {{collectRequestTimings}} --contentSize {{requestContentSize}} --contentWriteSize {{requestContentWriteSize}} --contentFlushAfterWrite {{requestContentFlushAfterWrite}} --contentUnknownLength {{requestContentUnknownLength}} {{headersDictionary[requestHeaders]}} --generatedStaticHeadersCount {{generatedStaticRequestHeadersCount}} --generatedDynamicHeadersCount {{generatedDynamicRequestHeadersCount}} --useDefaultRequestHeaders {{useDefaultRequestHeaders}} --warmup {{warmup}} --duration {{duration}}' |
-OR-
(3)
"Change both crank config yml and ci test config yml" -- (2) AND modify build/httpclient-scenarios.yml to include new parameter with both true and false to test matrix, e.g.:
Benchmarks/build/httpclient-scenarios.yml
Lines 31 to 34 in 9c454b7
- displayName: "HTTP/2.0" | |
arguments: --variable httpVersion=2.0 --variable useHttps=true --variable http20EnableMultipleConnections=false --property httpversion=h2 | |
- displayName: "HTTP/2.0 (mult conn)" | |
arguments: --variable httpVersion=2.0 --variable useHttps=true --variable http20EnableMultipleConnections=true --property httpversion=h2multconn |
and as
httpVersion
is already passed to the scenario (we're not adding a new dimension), it should then appear automatically in "pretty graphs" as soon as the new value will appear in the result table.
Do you want me to change something here or not?
It is hard for me to understand how urgently you'd like to merge the changes (I guess not really, given the PR's in draft), and how much effort are you willing to put into it.
My preferred option is (3) but it can be done as a follow-up, as long as the default is false.
But I am open to the discussion about the default as well.
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.
It is hard for me to understand how urgently you'd like to merge the changes
Not urgent at all, it just wasn't obvious to me from the original comment whether you expect any changes to this PR or not.
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.
I attempted to do (3). I searched for all http20EnableMultipleConnections
occurrences and added h3 equivalents.
But I am open to the discussion about the default as well.
I copy pasted H/2 settings everywhere. If that's not what you wanted, we can chat, but I think it should follow the same approach as H/2.
build/httpclient-scenarios.yml
Outdated
arguments: --variable httpVersion=3.0 --variable useHttps=true --property httpversion=h3 | ||
arguments: --variable httpVersion=3.0 --variable useHttps=true --variable http30EnableMultipleConnections=false --property httpversion=h3 | ||
- displayName: "HTTP/3.0 (mult conn)" | ||
arguments: --variable httpVersion=3.0 --variable useHttps=true --variable http30EnableMultipleConnections=true --property httpversion=h3mulconn |
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.
arguments: --variable httpVersion=3.0 --variable useHttps=true --variable http30EnableMultipleConnections=true --property httpversion=h3mulconn | |
arguments: --variable httpVersion=3.0 --variable useHttps=true --variable http30EnableMultipleConnections=true --property httpversion=h3multconn |
Changes LGTM -- have you tried to use the updated config YML to verify it works? You can do it this way:
repository: https://github.com/ManickaP/aspnet-benchmarks.git
branchOrCommit: h3-mul-conns
-crank --config https://raw.githubusercontent.com/..../httpclient.benchmarks.yml --scenario ....
+crank --config <local-path-to-repo>/scenarios/httpclient.benchmarks.yml --scenario .... --variable http30EnableMultipleConnections=false HOW-TO: verify parameter is passed correctly
{
"driverVersion": ....,
....
"arguments": "--address .... --http30EnableMultipleConnections false ....",
....
} -AND/OR-
|
51566b6
to
6c116a1
Compare
6c116a1
to
9ebd645
Compare
4fe3ee9
to
326231d
Compare
Resurrecting this PR, I rebased this on main and tested it: So unless you have any more comments, can we get this in @CarnaViire ? |
This reverts commit 326231d.
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.
LGTM, thanks!
dotnet/runtime#101531 follow up
cc @CarnaViire