-
Notifications
You must be signed in to change notification settings - Fork 314
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
Document an example how to extract HTTP responses during a Rally benchmark #791
Comments
By default Rally will just continue on errors and report an error rate at the end of the benchmark but I think you can already achieve what you're after by specifying
Rally already returns the number of hits in the metrics metadata but you need to configure a (dedicated) Elasticsearch metrics store for that. I think it would cover most of your needs. Here is an example from our nightly benchmarks: {
"environment": "nightly",
"race-id": "6cac8c34-93b4-416e-a1ea-6c4e1b87f9fd",
"race-timestamp": "20191005T200042Z",
"@timestamp": 1570306375355,
"relative-time": 41959,
"track": "geonames",
"challenge": "append-no-conflicts",
"car": "defaults",
"operation": "phrase",
"task": "phrase",
"name": "service_time",
"operation-type": "Search",
"sample-type": "warmup",
"value": 3.7241727113723755,
"unit": "ms",
"meta": {
"success": true,
"distribution_flavor": "oss",
"source_revision": "d598083051d46e7d44f577473dde52c4a32f6776",
"distribution_version": "8.0.0-SNAPSHOT",
"tag_license": "oss",
"timed_out": false,
"took": 1,
"hits": 58,
"hits_relation": "eq"
}
} In the |
In my use case (benchmarking different search strategies) this wouldn't help, since we usually don't error on unmapped fields. For example, if you perform a
Thanks, I wasn't aware we already tracked that information in the metadata. The next time I'm benchmarking, I will try out my workflow using a metrics store and loop back if I have further suggestions. |
I, too, would like to have addition information about the response. When benchmarking new aggregations, I've sometimes accidentally benchmarked buggy implementations that returned incorrect results, sometimes no results, and showed really fast performance. Since these runs are black-boxes, it is tough to know that I am benchmarking what I intended. Maybe due to bugs in the implementation, or bugs in the rally track. What if this search-response information came in the form of simply outputting a sample response from a single iteration. maybe with a flag like p.s. I had no idea about |
Thanks for the feedback both. You can log full requests and responses with Rally already today. Set the log level to
It can happen that we intentionally push Elasticsearch to provoke e.g. bulk index rejections and we just want to record that we went too far but not necessarily abort benchmarking. In any case I sense we should improve the docs to include examples for such scenarios? |
Knowledge of this via docs sounds like it would have solved my mistakes in usage. +1 to examples in the docs. thanks for the info! |
is this the norm rather than the exception? |
Honestly, I am hesitant to change the default behavior for this flag. It is common among load testing tools to continue on errors (e.g. JMeter does this as well by default) and in our experiments we usually want to continue a benchmark even when an error is indicated (by an error rate > 0 in the report), e.g. if one out many benchmarked queries fails e.g. due to changed syntax or tighter restrictions all of the other benchmark results are usually still fine and we would not want to lose them (btw, this is the reason we run Rally's integration tests in CI with the stricter |
"Implementation" notes: We should add a new page to our documentation that describes tips & tricks when benchmarking with specific examples (in a "recipe" style). The purpose of this example is to explain how to get request and response when running a benchmark with Rally (see my comment above how it's done). We should also mention the caveats (debug logging should not be enabled in a "real" benchmark). |
Propose adding the following to recipes:
|
As part of developing a new search feature or optimization, I often run benchmarks by adding a new search operation to an existing rally track. I've found that it can be easy to make mistakes in setting up the benchmark:
For this use case, I wonder if it'd be useful for rally to return the number of hits from a search operation, or even the whole search response. Seeing that the baseline and contender return the same number of results (and return more than 0 results) would give confidence that I've set up the benchmark correctly and help avoid some manual testing.
The text was updated successfully, but these errors were encountered: