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

Add option to hint MADV_WILLNEED to kernel #10152

Merged
merged 2 commits into from
Aug 3, 2018
Merged

Add option to hint MADV_WILLNEED to kernel #10152

merged 2 commits into from
Aug 3, 2018

Conversation

e-dard
Copy link
Contributor

@e-dard e-dard commented Aug 3, 2018

Fixes #10117.

This PR adds a new configuration option - tsm-use-madv-willneed / INFLUXDB_DATA_TSM_USE_MADV_WILLNEED, which, when true, will hint to the kernel that we plan on sequentially reading TSM files.

This option defaults to false because we have had some issues in the past with certain kernels/operating systems. However, it may be useful to some users with slow disks.

This PR adds a configuration option that can be used to inform the
kernel that we intent to page in much of the TSM files.

This madvise value has been problematic in the past when its been set,
so this option defaults to off. It may be useful to some users with slow
disks.
@e-dard e-dard added this to the 1.6.1 milestone Aug 3, 2018
@e-dard e-dard requested a review from zeebo August 3, 2018 15:34
@ghost ghost assigned e-dard Aug 3, 2018
@ghost ghost added the review label Aug 3, 2018
// that we will be reading the index section, but that's not been
// implemented as yet.
if m.mmapWillNeed {
if err := madviseWillNeed(m.b); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

munmap here? i guess this comment applies to a bunch of spots in this function lol. in addition to file handle resources. rename has the same problem. seems big enough for another ticket/bug maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants