[ 
https://issues.apache.org/jira/browse/LUCENE-8884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16909302#comment-16909302
 ] 

Michael McCandless commented on LUCENE-8884:
--------------------------------------------

Thanks for the review [~rcmuir].

We need the thread locals because we pass {{ExecutorService}} to 
{{IndexSearcher}} to keep our long-pole query latencies down.  So we need some 
way to associate searcher thread with the query it's handling, but maybe we can 
make that less invasive, e.g. default better for the more common 
single-threaded query case?
{quote}must you call get on every op vs once in the ctor? after all thats why 
we have clone? ( should not have thread issues )
{quote}
Ahh that's a good point – once the {{IndexInput}} is created, only one thread 
will use it – I'll fix that!  This should reduce overhead substantially, maybe 
enough to run in production by default.
{quote}readint has a second spurious call.
{quote}
Woops, I'll fix that too.

> Add Directory wrapper to track per-query IO counters
> ----------------------------------------------------
>
>                 Key: LUCENE-8884
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8884
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/store
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>         Attachments: LUCENE-8884.patch
>
>
> Lucene's IO abstractions ({{Directory, IndexInput/Output}}) make it really 
> easy to track counters of how many IOPs and net bytes are read for each 
> query, which is a useful metric to track/aggregate/alarm on in production or 
> dev benchmarks.
> At my day job we use these wrappers in our nightly benchmarks to catch any 
> accidental performance regressions.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to