Skip to content
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

Query latency impact from linux disk read ahead option #12166

Closed
jasperjiaguo opened this issue Dec 16, 2023 · 0 comments · Fixed by #13721
Closed

Query latency impact from linux disk read ahead option #12166

jasperjiaguo opened this issue Dec 16, 2023 · 0 comments · Fixed by #13721
Assignees

Comments

@jasperjiaguo
Copy link
Contributor

jasperjiaguo commented Dec 16, 2023

Recently we have discovered that Pinot query latency can be impact by the value of Linux's read_ahead_kb. Specifically we saw a very high page fault count and severe tail latency shootup when the read_ahead_kb was set to a larger value in certain Linux distributions. As read_ahead_kb controls the read ahead during the access of mmap files, we think larger read ahead value harms the queries having more random data access patterns. Theoretically it might benefit the opposite pattern but we have yet to see such a case. I think there are a few things that might worth doing:

  • In the short term we add this as a tip for Pinot admin in the OSS doc, so that it becomes a public knowledge
  • In the long term we may explore controlling this programmatically (like madvise in c), but it might be harder to do in Java
  • Revisit the mmap based segment cache

Similar issues/analysis:
https://smalldatum.blogspot.com/2014/05/the-impact-of-read-ahead-and-read-size.html
elastic/elasticsearch#27748

@jasperjiaguo jasperjiaguo changed the title Locality impact from linux disk read ahead option Query latency impact from linux disk read ahead option Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants