facebookincubator / velox

A composable and fully extensible C++ execution engine library for data management systems.
https://velox-lib.io/
Apache License 2.0
3.54k stars 1.17k forks source link

feat: Use fallocate for file size extension when supported #11541

Closed zacw7 closed 1 week ago

zacw7 commented 1 week ago

When Copy-on-Write (COW) is disabled on Btrfs, automatic relocation creates snapshots of files, ignoring the noCOW setting. This results in increased disk usage and can lead to "no space left" errors in production.

One possible enhancement we can make is to use fallocate to reserve space immediately after file creation. This helps ensure the allocated space is as continuous as possible.

For environments where "no space left" errors are already happening, attempting to reserve space can result in failures. In that case, fallback to truncate and record it in runtime metrics.

netlify[bot] commented 1 week ago

Deploy Preview for meta-velox canceled.

Name Link
Latest commit 3d0b8bda1dc1ffee5a7de1df00dae2f6e73317e4
Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/673e4c1b7e78e50008f016e9
facebook-github-bot commented 1 week ago

@zacw7 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 week ago

@zacw7 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 week ago

This pull request was exported from Phabricator. Differential Revision: D65977522

facebook-github-bot commented 1 week ago

This pull request was exported from Phabricator. Differential Revision: D65977522

facebook-github-bot commented 1 week ago

This pull request was exported from Phabricator. Differential Revision: D65977522

facebook-github-bot commented 1 week ago

This pull request was exported from Phabricator. Differential Revision: D65977522

facebook-github-bot commented 1 week ago

@zacw7 merged this pull request in facebookincubator/velox@0f6ba73b8188f541a45c42bd7ea88ba39fc1bb62.