e2freefrag is a simple tool to report free space fragmentation on
ext2/3/4 filesystems. It a simple tool which goes through the block
bitmap reporting sizes of free chunks. By default chunksize of 1MB is
used, but a different chunksize can be given using a -c option.
It also reports the min/max/avg size of free chunks and a histogram of
all free chunks.
Here is the output of e2freefrag:
[kalpak@garfield e2fsprogs-1.41.2]# e2freefrag -c 1024 /dev/sda3
Device: /dev/sda3
Blocksize: 4096 bytes
Total blocks: 2560359
Free blocks: 603234 (23.6%)
Total chunks: 10002
Free chunks: 2074 (20.7%)
Min free chunk: 4 KB
Max free chunk: 98276 KB
Avg. free chunk: 1952 KB
HISTOGRAM OF FREE CHUNK SIZES:
Range Free chunks
4K... 8K- : 326
8K... 16K- : 186
16K... 32K- : 124
32K... 64K- : 88
64K... 128K- : 83
128K... 256K- : 74
256K... 512K- : 58
512K... 1024K- : 44
1M... 2M- : 38
2M... 4M- : 36
4M... 8M- : 115
8M... 16M- : 38
16M... 32M- : 16
32M... 64M- : 3
64M... 128M- : 2
Signed-off-by: Kalpak Shah <[email protected]>
Signed-off-by: Andreas Dilger <[email protected]>