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

4k align values when stored on disk #108

Open
qpfiffer opened this issue Jul 2, 2014 · 3 comments
Open

4k align values when stored on disk #108

qpfiffer opened this issue Jul 2, 2014 · 3 comments
Assignees
Milestone

Comments

@qpfiffer
Copy link
Member

qpfiffer commented Jul 2, 2014

Values stored in the values file should be padded with extra space (at least 4k) to reduce page faults. This will also allow some headroom on updates.

@qpfiffer qpfiffer added this to the 0.1.3 milestone Jul 2, 2014
@qpfiffer qpfiffer self-assigned this Jul 2, 2014
@qpfiffer
Copy link
Member Author

qpfiffer commented Jul 2, 2014

Probably something like this:

int padded_size(const int size) {
    return (size + 4095) & ~4095;
}

@qpfiffer
Copy link
Member Author

qpfiffer commented Sep 9, 2014

5c4a5e8 adds the helper method to compute the padded value but it isn't used anywhere.

@qpfiffer
Copy link
Member Author

And because keep forgetting why I created this ticket, it has at least two merits:

  1. Adding extra padding reduces the need to append new values to the end of the values file because we have some leeway to work with. This also reduces empty pockets in the values file. I can explain more about this if anyone cares.
  2. This will probably reduce the number of page faults we get when trying to access values.

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

No branches or pull requests

1 participant