jpountz commented on PR #13586: URL: https://github.com/apache/lucene/pull/13586#issuecomment-2237667492
Thanks for looking into this! It's disappointing that this small change degrades performance so much indeed! I'm curious if you are able to run your benchmark under a profiler to confirm if the bottkeneck is the call to madvise or something silly. > I can restrict memory even more to try and force a significant difference, but if this code is so much worse even when everything already fits in memory, something is wrong. Right now prefetch() has logic to disable itself if data is consistently already in the page cache. Thinking out loud, if your benchmark shows that prefetch() hurts more than it helps when the data is often but not always in the page cache, we could look into disabling madvise in that case too and only enable it when data is rarely already in the page cache. -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org