Bug 1035641

Summary: btrfs option autodefrag should be default
Product: [Fedora] Fedora Reporter: Jonas Wielicki <j.wielicki>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: gansalmon, g.kaviyarasu, itamar, jonathan, kernel-maint, madhu.chinakonda, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-04 20:35:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jonas Wielicki 2013-11-28 09:00:56 UTC
Description of problem:
btrfs has a problem with fragmentation of files with lots of random writes (see [1]). An example of this are systemd-journal files, which show a horrible fragmentation after some weeks of usage:

./ec40ed0a6f8d45b087ff6413085f2237/system: 23127 extents found

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Install Fedora 19 on a btrfs
2. Watch how journalctl gets slower and slower with time of usage, with lots of IOWait and slow data transfer rate from HDD
3. run filefrag on the files

Actual results:
Very bad performance of btrfs due to fragmentation of journal files.

Expected results:
A usable, fast file system.

Additional info:
This might be the actual reason for bug #983688.

I’m not sure this is the correct component to report against. I was oscillating between anaconda, kernel and btrfs-progs. I report against anaconda now, because anaconda wrote my fstab.

   [1]: https://btrfs.wiki.kernel.org/index.php/Gotchas

Comment 1 David Lehman 2013-12-04 19:59:53 UTC
Anaconda is not in the business of enforcing filesystem defaults. If this should be default behavior of btrfs then it should not require an fstab option.

Comment 2 Josh Boyer 2013-12-04 20:35:32 UTC
Please take this request to the upstream btrfs developers.

Alternatively, reassign it to btrfs-progs or the 'distribution' component.