Re: What is the current status of defragmentation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, July 18, 2013 12:18:23 AM you wrote:
> * Is the defragmentation of the whole filesystem supported at all? I
> can't find a single reference that it is, and a syntax of btrfs-progs
> suggest that it isn't. If supported, under what conditions? Like what %
> of free space should be available?

It works for me, I have done it few times on 3.9.9/arch. But I have kept 
plenty of free space handy to avoid any corner cases.

> * How to check the level of defragmentation, and what are the reasonable
> threshold values, that should indicate the desktop filesystem needs
> defragmenting? I know, that everyone's millage my vary; I just want to
> know some values as a point-of-reference.

Thats a hard question to answer but after you fully defrag the system(every 
btrfs mount/partition/filesystem), rebooting immediately with 
compress/autodefrag should do it automatically, since then.

Are you mounting with noatime? storing access time could lead to massive 
direcory level fragmentation which is hard to measure.

filefrag can help you but its per file and does not exactly give the level of 
fragmentation.
> 
> * What is the recommended command, that would efficiently defragment the
> whole file system, preferably with some sort of progress indication?
> Does this command
> 
> find / -type f -o -type d -print0 | xargs --null --no-run-if-empty btrfs
> filesystem defragment -cv
> 
> look like a reasonable idiom for defragmenting the whole filesystem?

again, I use this. no progress indicator but it works

----------
for dir in / /home ;
do

find $dir -mount -type d -exec btrfs fi defrag '{}' \; ;
find $dir -mount -type f -exec btrfs fi defrag '{}' \; ;

done
----------

HTH


-- 
Regards
 Shridhar
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux