mbox series

[0/2] btrfs: zoned: fix bandwidth degradaton

Message ID cover.1702913643.git.naohiro.aota@wdc.com (mailing list archive)
Headers show
Series btrfs: zoned: fix bandwidth degradaton | expand

Message

Naohiro Aota Dec. 18, 2023, 4:01 p.m. UTC
Writing sequentially to a huge file on btrfs on a SMR HDD revealed a
decline of the performance (220 MiB/s to 30 MiB/s after 500 minutes). As
shown in the attached plot, current btrfs exponentially drops its
performance.

The drop is because find_free_extent() need to traverse a lot of full block
groups, trying to find a space.

This series fixes the performance drop by choosing a proper block group
from the zone_active_bgs. Since the list does not contain full block
groups, there is no need of traversing the full BGs. 

Naohiro Aota (2):
  btrfs: zoned: split out prepare_allocation_zoned()
  btrfs: zoned: optimize hint byte for zoned allocator

 fs/btrfs/extent-tree.c | 50 +++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 13 deletions(-)

Comments

Johannes Thumshirn Dec. 18, 2023, 4:21 p.m. UTC | #1
For the series,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
David Sterba Jan. 4, 2024, 3:45 p.m. UTC | #2
On Mon, Dec 18, 2023 at 04:01:55PM +0000, Naohiro Aota wrote:
> Writing sequentially to a huge file on btrfs on a SMR HDD revealed a
> decline of the performance (220 MiB/s to 30 MiB/s after 500 minutes). As
> shown in the attached plot, current btrfs exponentially drops its
> performance.
> 
> The drop is because find_free_extent() need to traverse a lot of full block
> groups, trying to find a space.
> 
> This series fixes the performance drop by choosing a proper block group
> from the zone_active_bgs. Since the list does not contain full block
> groups, there is no need of traversing the full BGs. 
> 
> Naohiro Aota (2):
>   btrfs: zoned: split out prepare_allocation_zoned()
>   btrfs: zoned: optimize hint byte for zoned allocator

Added to misc-next, thanks.