Re: What is the current status of defragmentation?

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

 



Shridhar Daithankar posted on Thu, 18 Jul 2013 08:29:22 +0530 as
excerpted:

> [A]fter you fully defrag the system(every btrfs
> mount/partition/filesystem), rebooting immediately with
> compress/autodefrag should do it automatically, since then.

Indeed.

It's worth noting that the automated install system used by many distros 
leaves system files (obviously, no user files at that point) rather 
fragmented.  Since the install process may leave no opportunity to mount 
with autodefrag during the install, it's worth either pre-creating/pre-
mounting the system partitions and skipping the part of the install 
process that would create and mount them, or installing to a temporary 
location and copying the whole install to a final location once you have 
the final destinations created/mounted with autodefrag and optionally 
compress, etc.  That'll save quite some time of the initial defrag 
slowing down the system, as well as allow you to defrag otherwise in-use 
files that aren't "online defragged" otherwise.

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

The kernel's relatime default helps, but unless you're running something 
like mutt that really depends on atime, it's worth using noatime as a 
rule.  (The only volumes I don't use noatime on are virtual filesystems 
such as tmpfs and sysfs, where it's simply a memory access in any case 
and I've seen no qualified opinion or benchmarks arguing either way.)

> filefrag can help you but its per file and does not exactly give the
> level of fragmentation.

Someone did mention that btrfs compressed files larger than some size 
(the btrfs leaf size?) will always look fragmented to filefrag.  I do not 
personally understand enough about it to verify, however.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
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