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

tfs: inflate existing file extent when appending, merge adjacent extents where possible, eliminate extent size maximum #1165

Open
wjhun opened this issue May 5, 2020 · 2 comments

Comments

@wjhun
Copy link
Contributor

wjhun commented May 5, 2020

Right now we're allocating tfs extents more often than we need to. Explore the possibility of extending an existing file extent on append rather than allocating a new one. To accommodate the extension, a larger default storage allocation size could be used for each new extent, or id_heap_set_area could be used to try and extend an existing allocation (failure would just mean creating a new extent).

We could also look at merging extents that are contiguous on disk, but such conditions should become much less frequent if the above is implemented, so it's not clear how valuable such a function would be.

Once we complete the removal of all temporary buffers for retaining extent data, we can also remove the 1MB maximum extent size.

@wjhun
Copy link
Contributor Author

wjhun commented Jul 2, 2020

Extension of extents to fill allocated space was merged with #1207. We can still choose to:

  • attempt to tack on to an existing extent allocation (double?) by using id_heap_set_area to try and reserve the space
    If this fails, revert to creating a new extent.

  • join extents that are adjacent on storage (keeps the amount of file metadata down)

  • remove (or raise) the extent size maximum

    This was required a long time ago when we needed to allocate contiguous memory to hold an entire extent, which is no longer the case. (Note: Given that id heap allocations are aligned (but not padded) to size, this may result in greater use of storage space, which in cases like the boot partition would just be wasted space. There are some applications within the kernel that currently rely on this property of the id heap, and it does allow for a faster bitmap search, but we could explore a revisitation or parameterizing behavior on heap creation.)

@francescolavra
Copy link
Member

#1765 implements extension of the allocated space of a given extent and removes the 1-MB upper limit on extent size.

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

No branches or pull requests

2 participants