All of lore.kernel.org
 help / color / mirror / Atom feed
* directory defrag
@ 2015-04-14  7:37 Russell Coker
  2015-04-14  8:03 ` Sander
  2015-04-14 12:53 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Russell Coker @ 2015-04-14  7:37 UTC (permalink / raw)
  To: linux-btrfs

The current defragmentation options seem to only support defragmenting named 
files/directories or a recursive defragmentation of files and directories.

I'd like to recursively defragment directories.  One of my systems has a large 
number of large files, the files are write-once and read performance is good 
enough.  However performance of "ls -al" is often very poor, presumably due to 
metadata fragmentation.

The other thing I'd still like is the ability to force all metadata allocation 
to be from specified disks.  I'd like to have a pair of SSDs for RAID-1 storage 
of metadata and a set of hard drives for RAID-1 storage of data.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: directory defrag
  2015-04-14  7:37 directory defrag Russell Coker
@ 2015-04-14  8:03 ` Sander
  2015-04-14 12:53 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Sander @ 2015-04-14  8:03 UTC (permalink / raw)
  To: Russell Coker; +Cc: linux-btrfs

Russell Coker wrote (ao):
> The current defragmentation options seem to only support defragmenting
> named files/directories or a recursive defragmentation of files and
> directories.
> 
> I'd like to recursively defragment directories.

find / -xdev -type d -execdir btrfs filesystem defrag -c {} +

Would that work for you?

	Sander

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: directory defrag
  2015-04-14  7:37 directory defrag Russell Coker
  2015-04-14  8:03 ` Sander
@ 2015-04-14 12:53 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2015-04-14 12:53 UTC (permalink / raw)
  To: Russell Coker; +Cc: linux-btrfs

On Tue, Apr 14, 2015 at 07:37:17AM +0000, Russell Coker wrote:
> The current defragmentation options seem to only support defragmenting named 
> files/directories or a recursive defragmentation of files and directories.
> 
> I'd like to recursively defragment directories.  One of my systems has a large 
> number of large files, the files are write-once and read performance is good 
> enough.  However performance of "ls -al" is often very poor, presumably due to 
> metadata fragmentation.

Ie. the directory metadata in the b-tree. That's possible, but not all
of the code is there. So fare only whole-tree defragmentation is
implemented, ie. the extent tree or any subvolume tree. We'd have to
extend the defrag api to take a key range and then use it to span the
directory key range.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-14 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-14  7:37 directory defrag Russell Coker
2015-04-14  8:03 ` Sander
2015-04-14 12:53 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.