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
Refactor h2load rate mode options #382
Comments
Perhaps, instead of adding -x, we use -n as it is now and divide by -C, which is now required option for rate mode, and calculation is trivial. |
More simplification can be made to remove -C option, and use -c option instead. |
So if we call the first plan A, then plan B is: With rate mode, we only use the following options to determine the number of requests, clients, rate etc:
Here -c has a bit of different meaning without rate mode, but in both mode, it specifies maximum number of clients, so very similar. If we specify -r option, h2load enters rate mode. |
This change implements plan B described in GH-382 to simplify rate mode, but retain its functionality as much as possible. In this change, we removed -C option. Instead, -c option is used to specify the number of connections to be made, and it is now required argument if more than 1 clients are required (this is usually the case). The number of requests made per connection is calculated simply by -n / -c.
#383 implements plan B. |
PR looks good. I don't think this affects how I would use h2load (other than tweaking the commands). However, I'd like to check my understanding with this change by looking at an example. Consider a script file containing 7 URI lines; a) |
Yes
Yes.
Yes
Yes
Yes
Yes.
yes
yes
yes. 7 requests were split up into 6 clients as: 1, 2, 1, 1, 1, 1.
yes. |
Then it meets all my expectations 👍 |
Thank you! I have another idea about timing script and -n option handling. So if we do this:
will send a total of 14 requests, since -n7 applies to each client. |
This sounds good, it is more fair to always have the clients issue the same number of URIs. The hand calculations can be tricky and easy to get wrong, especially when iterating on test configurations (I know because my old implementation of script required me to do this).
|
OK, let's do this. |
As discussed above, a5070ba implements special handling of -n option if it is used with --timing-script-file option |
If everything is ok, I will squash into one commit and merge PR into master. |
I pulled down your branch to do some local testing. It looks like
This example looks weird?
|
Thanks! Looks good! |
This change simplifies rate mode as proposed idea as plan B in GH-382. In this change, we removed -C option. Instead, -c option is used to specify the number of connections to be made, and it is now required argument if more than 1 clients are required (this is usually the case). The number of requests made per connection is calculated simply by -n / -c. -n option is handled specially when --timing-script-file is used. If -n is used with --timing-script, it specifies the number of requests -each client will make rather than the total number of requests h2load -will perform across clients. This handling applies to rate mode too. We also clarified the sematics about distribution of rate among the threads.
Merged as 0d27a89 |
This looks great! |
h2load rate mode works great.
The only downside is it require some thinking about how to specify the combination of -n, -C, -r, -m.
Also -m is originally the number of concurrent streams per HTTP/2 or SPDY session, that is the protocol detail configuration. So we'd better not to use it in the way we now use it in rate mode.
I'm thinking a bit simpler configuration options, which can be used very straight forward.
But be aware that this is not backward compatible to the current rate mode.
Here is my current plan.
Without rate mode, we have no changes.
With rate mode, we only use the following options to determine the number of requests, clients, rate etc:
We already have -r and -C. -x is new addition. In rate mode, -n and -c options are ignored.
To remove the test time conflicts, -C option is now mandatory if -r is used. -x defaults to "auto", which has the same meaning of the default value of -m option.
Instead of adding -x, we can say that -n option means the number of requests made per connection in rate mode.
What do you think about this?
The text was updated successfully, but these errors were encountered: