Questions tagged [defragmentation]
The process of arranging blocks on the filesystem to optimize disk read access.
31 questions
0
votes
2
answers
191
views
How to defragment compressed btrfs files?
If I defragment files on btrfs with the command
btrfs filesystem defrag --step 1G file
Everything is fine. A filefrag -v file clearly show, the extent count significantly decreased.
Things are very ...
0
votes
0
answers
82
views
ZFS send much slower than before
With the exact same devices (computer, external hard drive…), my ZFS backup (via zfs send | zfs recv) takes much longer than before. Now, it takes around 1.5 to 2.2mn to copy 1Go, but before I think ...
0
votes
1
answer
297
views
Encrypted LUKS fs inside a file: sparse or not?
I have a LUKS encrypted file filled with around 160 GB of data
that I use a lot. For safety, I created the file with 400 GB.
That is, of course, a lot of wasted space.
So I switched to a sparse file,...
3
votes
0
answers
228
views
What is "external fragmentation" in a file system?
I'm using EXT4, but I think my question concerns all Unix/Linux file systems.
This 2022 answer to "Difference between fragment and extent in ext4" states that:
External fragmentation occurs ...
0
votes
0
answers
59
views
Is theire any specific caution to take before resize btrfs
Current situation
I have an almost full /home partition, with just 4.4Go remaining space, when my / is more than half empty.
Both of the two partitions are in Btrfs, as you can see:
% lsblk -o NAME,...
1
vote
1
answer
3k
views
BTRFS - How to reclaim unused space in each chunk used and compact the filesystem, basically defrag free space?
How to reclaim unused space from each chunk used by BTRFS filesystem?
Let's say there are lots of chunks partially used from 10% to 50% utilised per chunk, how do I defragment those so that the 90% to ...
6
votes
1
answer
453
views
I observe using `dd if=filein of=fileout` lead to filesystem fragmentation, what do I have to change?
There was a nice question that sadly got deleted while I was writing a rather extensive answer :(
Not wanting to let that effort go to waste, let me paraphrase that question from the question text and ...
3
votes
0
answers
1k
views
How to get a Btrfs filesystem fragmentation count?
The btrfs check command output doesn't mention how many files are fragmented like e4defrag -c or e2fsck with ext4 filesystems.
What command can give the number of fragmented files on a whole Btrfs ...
0
votes
2
answers
1k
views
Effects of copy (cp) vs cut (mv) on file systems
When you have to move a file to a different location in the same file system, you have two options: just cut-paste (or mv), or copy-paste (cp) and then delete the old copy.
I'm wondering what are the ...
1
vote
1
answer
581
views
Identify if IO bottleneck is read or write
I use ddrescue to image failing disk to sparse files - often the files become highly fragmented (>50k fragments).
I suspect that sometimes the imaging speed degrades because of the fragmentation. Is ...
2
votes
0
answers
513
views
Simultaneous copy from multiple sources without fragmenting destination
I regularly need to copy large datasets from multiple smaller drives to a larger one. Lately I've been using a WD Easystore 12TB External USB 3.0 Hard Drive as my destination. Copying all the files ...
0
votes
1
answer
789
views
How can I disable ext4's automatic defragmentation?
I'm running tests that require some files to be heavily fragmented. I came up with a method to generate fragmented files, but something is working in the background to defragment them. I'm using ...
2
votes
1
answer
590
views
Does BTRFS's compress logic apply when defragmenting?
When mounting a BTRFS filesystem with the compression option, BTRFS will selectively compress files depending on whether they are deemed compressible or not.
Does this same logic apply when ...
1
vote
0
answers
88
views
Completely defragmenting a FAT32 filesystem [duplicate]
Is there any Linux tool that allows defragmenting a FAT32 filesystem not on a best effort basis, but so that all files are guaranteed to be stored contiguously with no exceptions? Possibly writing the ...
5
votes
1
answer
4k
views
Understanding main memory fragmentation and hugepages
I have a machine that is intended for general use and which I also used to run a QEMU virtual machine. Because the virtual machine should be as performant as possible, I want to back the VM memory ...