-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Doc: provide more clarify to the usage of check perf command #14111
Conversation
26011ae
to
7526b9b
Compare
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.
@@ -126,7 +126,7 @@ func NewCheckPerfCommand() *cobra.Command { | |||
} | |||
|
|||
// TODO: support customized configuration | |||
cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge)") | |||
cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge). Different workload models use different configurations in terms of number of clients and expected throughtput.") |
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.
The load flag controls:
- number of concurrent clients (50-1000)
- maximal rate of issued put requests (across all clients) (150-15000)
The check to succeed expects server's avg. effective throughput to be >90% of the issued requests and latency of all the requests <0.5s.
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 indeed means "expected throughput" to me. We set an expected throughput, then measure the real throughput.
For example, if the actual throughput is less than 90% of the expected throughput, then the test fails.
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.
Probably it makes more sense to clearly document the standard on the pass of test.
- throughput > 90%
- s.Slowest <= 0.5
- s.Stddev <= 0.1
Please update the doc etcdctl/README.md to get this documented.
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 like the document as such as a concise doc. Adding more details in the README is also a good idea. Also, another thought is to add more doc in the command function to clarify how it works - and then just point to that in the readme. In case, in future, we add new threshold or change in the existing values then we don't have to update doc. Thanks @patrocinio
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.
Thanks @spzala for the feedback.
add more doc in the command function to clarify how it works - and then just point to that in the readme
This might not work. When we update the source code, the link might be out of date. So the best approach would be to get all detailed included in the README directly instead of just adding a link.
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.
@ahrtr thanks and yes I agree with you! It's more about pointing to the function, not a particular LOC. ReadMe sounds good to me.
etcdctl/README.md
Outdated
@@ -1505,6 +1505,10 @@ CHECK provides commands for checking properties of the etcd cluster. | |||
|
|||
CHECK PERF checks the performance of the etcd cluster for 60 seconds. Running the `check perf` often can create a large keyspace history which can be auto compacted and defragmented using the `--auto-compact` and `--auto-defrag` options as described below. | |||
|
|||
Notice that different workload models use different configurations in terms of number of clients and expected throughtput. |
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.
Please reference:
etcd/etcdctl/ctlv3/command/check.go
Lines 53 to 60 in fc69053
var checkPerfCfgMap = map[string]checkPerfCfg{ | |
// TODO: support read limit | |
"s": { | |
limit: 150, | |
clients: 50, | |
duration: 60, | |
}, | |
"m": { |
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
But I'd leave @ptabor to merge this PR, in case he has any different opinion.
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.
Please see files#r896538376
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.
Thanks @patrocinio lgtm with one inline comment.
@@ -126,7 +126,7 @@ func NewCheckPerfCommand() *cobra.Command { | |||
} | |||
|
|||
// TODO: support customized configuration | |||
cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge)") | |||
cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge). Different workload models use different configurations in terms of number of clients and expected throughtput.") |
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 like the document as such as a concise doc. Adding more details in the README is also a good idea. Also, another thought is to add more doc in the command function to clarify how it works - and then just point to that in the readme. In case, in future, we add new threshold or change in the existing values then we don't have to update doc. Thanks @patrocinio
Codecov Report
@@ Coverage Diff @@
## main #14111 +/- ##
==========================================
- Coverage 75.23% 75.00% -0.24%
==========================================
Files 452 452
Lines 36781 36775 -6
==========================================
- Hits 27674 27583 -91
- Misses 7373 7448 +75
- Partials 1734 1744 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
2e6495f
to
5cc91ef
Compare
Looks good to me. Please squash the commits, thx. |
This PR describes the fact that different workloads in the `check perf` command are different, and the results might vary. Signed-off-by: Eduardo Patrocinio <epatro@gmail.com>
5cc91ef
to
e1e3ed1
Compare
Hey @ahrtr I squashed the commits. Thanks! |
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
Thank you! @patrocinio
@patrocinio Can you please backport this PR to 3.5? |
Hello @ahrtr Do you mean release v3.5.0 (https://github.com/etcd-io/etcd/releases/tag/v3.5.0) or v3.5.3 (https://github.com/etcd-io/etcd/releases/tag/v3.5.3) ? Thanks |
@patrocinio Please cherry pick this PR to release-3.5. |
I'm not sure if we should do a backport as we usually backport only fixes. Is there any benefit from backporting documentation update? |
Yes, it isn't a big deal. But I'd prefer to backport it, because it's useful when users run etcdctl 3.5 and read the 3.5 doc. |
I mean we have a official backport policy that lists I would prefer to avoid breaking our own policies without having a strong incentive. |
Removing backport label for now. Feel free to re-add it when you get support from other maintainers. |
This PR describes the fact that different workloads in the
check perf
commandare different, and the results might vary.
Related #13455