Skip to content

how can I reduce file fragmentation? #2217

Answered by ckerr
rezad1393 asked this question in Q&A
Discussion options

You must be logged in to vote

Using full preallocation should use fallocate64() on POSIX systems, so this should do the trick on ext4. This is the best approach that I'm aware of on modern systems. If you're still getting fragmentation, and you know of a better way to preallocate files, patches are welcomed, or if you don't want to write the patch, at least file an issue that documents a better approach than fallocate() / fallocate64() 😄

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ckerr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2127 on November 24, 2021 20:46.