michaeljmarshall commented on PR #16145: URL: https://github.com/apache/lucene/pull/16145#issuecomment-6053616327
Caveat: I have not had a chance to benchmark this code yet. This latest commit simplifies the logic quite a bit by implementing a few of @goankur's suggestions. * After reaching the backoff, we now probe 1 in 64 calls, and the source of randomness is `ThreadLocalRandom.current().nextInt()`. * When a file is eagerly preloaded, we skip the initial 1024 `isLoaded` ramp and assume that the file is warm However, I do not think we can safely assume that the file is warm in any other cases because the cost asymmetry is too high. The current implementation essentially does this already by assuming that 3 consecutive hits is enough to start skipping the `madvise` calls. Note also that one of the key details we don't have in this implementation is a notion of time decay of the page cache's warmth for a given file. I think this is the right choice for now, but it's worth noting that both implementations have this gap. -- 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]
