-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Searchable snapshot read FST performance issue. #88366
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
Thanks @howardhuanghua for reporting. I agree that A possible solution could be to detect successive backward (or forward) reads and make a bet that the next read will also be backward (or forward) and refill the internal buffer accordingly. I can give this a try but I'd like to wait for an on-going effort we have that should add frozen tier to our nightly benchmarks. Once this is done we should hopefully better see the benefits of implementing this change. |
Thanks @tlrx , I mean we could still read forward, but just reverse fill 1k buffer.
|
This should be fixed by apache/lucene#12357 |
That Lucene change should go live in Elasticsearch 8.9.0. |
Elasticsearch Version
8.0
Installed Plugins
No response
Java Version
bundled
OS Version
CentOS
Problem Description
Searchable snapshot read
tip
file has performance issue, currentlyBaseSearchableSnapshotIndexInput
extends fromBufferedIndexInput
.When we trigger the follow terms query,
FST read tip file would use
ReverseRandomAccessReader
which read from the tail.I have printed the
doReadInternal
details:We could see that, each time read 1024 bytes, and only single byte is useful, and 1023 are duplicated reading,
4134192-4135216
,4134191-4135215
..., that's because we useReverseRandomAccessReader
read from the tail.Could we use
ByteBufferIndexInput
instead ofBufferedIndexInput
forBaseSearchableSnapshotIndexInput
?Steps to Reproduce
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: