All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about ext4 conversion and leaf size
@ 2014-01-03  0:29 Holger Hoffstätte
  2014-01-03 18:13 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Hoffstätte @ 2014-01-03  0:29 UTC (permalink / raw)
  To: linux-btrfs


Conversion from ext4 works really well and is an important step for
adoption. After recently converting a large-ish device I noticed
dodgy performance, even after defragment & rebalance; noticeably
different from the quite good performance of a newly-created btrfs
with 16k leaf size, as is the default since recently.

So I went spelunking and found that the btrfs-convert logic indeed
uses the ext4 block size as leaf size (from #2220):
https://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/tree/btrfs-convert.c#n2245

This is typically 4096 bytes and explains the observed performance.

So while I'm basically familiar with btrfs's design, I know nothing
about the details of the conversion (I'm amazed that it works so well,
including rollback!) but can/should this not be updated to the new default
of 16k, or is there a strong necessary correlation between the ext4 block
size and the newly created btrfs?

thanks!
Holger


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

* Re: Question about ext4 conversion and leaf size
  2014-01-03  0:29 Question about ext4 conversion and leaf size Holger Hoffstätte
@ 2014-01-03 18:13 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2014-01-03 18:13 UTC (permalink / raw)
  To: Holger Hoffstätte; +Cc: linux-btrfs

On Fri, Jan 03, 2014 at 12:29:51AM +0000, Holger Hoffstätte wrote:
> Conversion from ext4 works really well and is an important step for
> adoption. After recently converting a large-ish device I noticed
> dodgy performance, even after defragment & rebalance; noticeably
> different from the quite good performance of a newly-created btrfs
> with 16k leaf size, as is the default since recently.
> 
> So I went spelunking and found that the btrfs-convert logic indeed
> uses the ext4 block size as leaf size (from #2220):
> https://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/tree/btrfs-convert.c#n2245
> 
> This is typically 4096 bytes and explains the observed performance.
> 
> So while I'm basically familiar with btrfs's design, I know nothing
> about the details of the conversion (I'm amazed that it works so well,
> including rollback!) but can/should this not be updated to the new default
> of 16k, or is there a strong necessary correlation between the ext4 block
> size and the newly created btrfs?

The sectorsize has to be same for ext4 and btrfs, which is 4k
(PAGE_SIZE) nowadays. The btrfs metadata block is not limited by that.

I've tried to implement the dumb & simple support for larger metadata
block some time ago

http://repo.or.cz/w/btrfs-progs-unstable/devel.git/commitdiff/337ac35f5a6ebeaee375329084b89ea4a868b4be?hp=704a08cb8ae8735f8538e637a1be822e76e69d3c

but the conversion did not work properly, and I haven't debugged that
further.


david

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

end of thread, other threads:[~2014-01-03 18:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-03  0:29 Question about ext4 conversion and leaf size Holger Hoffstätte
2014-01-03 18:13 ` 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.