Repository navigation
Replies: 1 comment
|
Something like this. The fallocate needs a little more discussion as it can positively influence fragmentation on xfs, but prevents compression on btrfs. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am observing that package builds for ARM64 that target compatibility with 64K PT kernels do lead to binaries and libraries with long zero runs as elf-files store all segments page aligned. In practice RPM does not have any sparse-file handling as of now. A quick test with
sudo fallocate --dig-holes /bin/lndoes reclaim space on such ARM distributions.A typical distribution with many small binaries can easily waste 100+MB of disk storage when not using sparse files. (Using an advanced filesystem with compression would be another solution.)
I was thinking of adding sparseness detection in lib/rpmfi.c:rpmfiArchiveReadToFilePsm(). rpmlib would directly and transparently create sparse files on filesystems that support it for input files with non-trivial zero runs. Such a feature could be gated behind a
%__sparse_install 0macro so that it can be introduced gently.I know that there were older attempts in a similar direction, but I am not seeing anything in the current code, issues or discussions. Current ARM64 trends might create new interest for this topic.
I have experimental patches, if there is interest.
All reactions