Skip to content

Conversation

@maxux
Copy link
Collaborator

@maxux maxux commented Dec 22, 2023

Main idea of zdb was initially to be efficient on HDD, current implementation was doing always-append but per namespace, which means random write to different namespace at the same time would eventually produce fragmentation.

New implementation ensure data are (lazily) pre-allocated using fallocate by reserving blocks when creating data file.

Data files are intended to be used on HDD when used on storage purpose,
pre-allocating data space (without really write actual data) ensure
that enough space is available and reduce fragmentation.

If this call fails, allocation is just ignored and old behavior is used.
@maxux maxux merged commit 40d92b5 into development-v2 Dec 22, 2023
@maxux maxux deleted the development-v2-fragmentation branch December 22, 2023 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants