You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "original-brownbear (via GitHub)" <gi...@apache.org> on 2024/10/11 17:12:31 UTC

[PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

original-brownbear opened a new pull request, #13894:
URL: https://github.com/apache/lucene/pull/13894

   We use manual seeking and reading instead of random access in this class. That seems just unnecessarily complicated and potentially slower due to the need for updating pointer field in the index input.
   


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear commented on PR #13894:
URL: https://github.com/apache/lucene/pull/13894#issuecomment-2426662403

   I think we simply underestimate the variance luceneutil which results in p-values that are too low. See https://github.com/mikemccand/luceneutil/pull/308 for a suggested fix. The QPS have since recovered from the tiny dip seen here .


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear commented on PR #13894:
URL: https://github.com/apache/lucene/pull/13894#issuecomment-2410525472

   Looks to me like a few inlining decisions changed (judging by the profiling and the relative weight of inlined versions vs non-inlined versions of some method). I'm not even entirely sure it's because of this change and not one of the other changes. The std-deviation for `BrowseMonthTaxoFacets` also dropped from 20%+ to 0.1%+, which has me wondering if maybe we have too little warmup time here before measuring?


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear merged PR #13894:
URL: https://github.com/apache/lucene/pull/13894


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #13894:
URL: https://github.com/apache/lucene/pull/13894#issuecomment-2410803086

   I was a bit afraid that this might have been caused by missing "prefetch()" implementation, but for MemorySegmentIndexInput also the random access slice uses the correct implementation.
   
   My only idea could be that there's a difference between the inlining decisions for *interface* `RandomAccessInput` and the class `IndexInput` (both implemented by MemorySegmentIndexInput, but the first is using `invokeinterface` which the latter is using `invokevirtual` bytecode). This could make a difference here, so we need a dump of which methods were inlined before/after.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #13894:
URL: https://github.com/apache/lucene/pull/13894#issuecomment-2410749511

   I dont think this is a real slowdown caused by the commit here. It is more caused by the Hotspot optimizer misinterpreting something. We should get the assembly code from the benchmark and compare them to figure out why it gets worse.
   Actually the non-random access modifies global state (moves position), so actually optimizer does a harder job, so the slowdown is very strange.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear commented on PR #13894:
URL: https://github.com/apache/lucene/pull/13894#issuecomment-2408457832

   Thanks Adrien!


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer [lucene]

Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #13894:
URL: https://github.com/apache/lucene/pull/13894#issuecomment-2410306410

   Looks like there was a slowdown on some taxo facets tasks (which use binary doc values to store the taxonomy). `OrHighMedDayTaxoFacets`, `AndHighHighDayTaxoFacets` and `MedTermDayTaxoFacets` had a slowdown with a low p-value. On the other hand, `BrowseMonthTaxoFacets` went a bit faster (p-value is not so low, but this is the best data point in a long time, which suggests it's not noise). https://benchmarks.mikemccandless.com/2024.10.12.18.20.19.html
   
   We should not revert, but I'll annotate. I'm curious if someone has ideas on the cause. Also cc @stefanvodita @gsmiller since you have interest in facets.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org