sigram commented on PR #3739:
URL: https://github.com/apache/solr/pull/3739#issuecomment-3377411254
And here are results from the repeated `ExitableDirectoryReaderSearch`
benchmark:
```
Benchmark (useEDR) (verifyEDRInUse)
Mode Cnt Score Error Units
ExitableDirectoryReaderSearch.testLongQuery false false
avgt 4 5.668 ± 1.762 ms/op
ExitableDirectoryReaderSearch.testLongQuery false true
avgt 4 6.027 ± 0.646 ms/op
ExitableDirectoryReaderSearch.testLongQuery true false
avgt 4 6.090 ± 0.628 ms/op
ExitableDirectoryReaderSearch.testLongQuery true true
avgt 4 87.200 ± 0.727 ms/op
ExitableDirectoryReaderSearch.testShortQuery false false
avgt 4 0.607 ± 0.088 ms/op
ExitableDirectoryReaderSearch.testShortQuery false true
avgt 4 1.074 ± 0.070 ms/op
ExitableDirectoryReaderSearch.testShortQuery true false
avgt 4 0.669 ± 0.206 ms/op
ExitableDirectoryReaderSearch.testShortQuery true true
avgt 4 6.838 ± 0.823 ms/op
Benchmark (useEDR) (verifyEDRInUse)
Mode Cnt Score Error Units
ExitableDirectoryReaderSearch.testLongQuery false false
avgt 4 5.154 ± 0.525 ms/op
ExitableDirectoryReaderSearch.testLongQuery false true
avgt 4 5.607 ± 0.339 ms/op
ExitableDirectoryReaderSearch.testLongQuery true false
avgt 4 5.470 ± 0.408 ms/op
ExitableDirectoryReaderSearch.testLongQuery true true
avgt 4 85.519 ± 1.192 ms/op
ExitableDirectoryReaderSearch.testShortQuery false false
avgt 4 0.634 ± 0.239 ms/op
ExitableDirectoryReaderSearch.testShortQuery false true
avgt 4 1.112 ± 0.101 ms/op
ExitableDirectoryReaderSearch.testShortQuery true false
avgt 4 0.660 ± 0.080 ms/op
ExitableDirectoryReaderSearch.testShortQuery true true
avgt 4 6.977 ± 0.378 ms/op
```
Explanation of the flags used:
* this benchmark is set up to use indexes with ~200 medium-sized segments,
and runs two types of queries:
* short query is a single term query
* long query is a sloppy 5-term phrase query
* in all cases the `QueryLimits` checking is used because of the
`timeAllowed` parameter.
* when `useEDR=true` the `ExitableDirectoryReader` is always used as the
outermost wrapper in `SolrIndexSearcher.reader`.
* when `verifyEDRInUse=true` an instance of `CallerSpecificQueryLimit` is
added to the `QueryLimits`, not to actually abort the search but to introduce a
significant cost to the limit checking (the collected call counts are a nice
side-effect). It's clear that this heavily impacts the overall performance,
especially for long queries - but in practice this impl. would never be used
for normal searching, and all other built-in `QueryLimit` implementations are
extremely efficient compared to it.
Unless there's some serious error in these benchmarks it looks to me like
using EDR has very little practical impact on the search performance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]