Project

General

Profile

Bug #2543

bad duality in metaslab_df_alloc/metaslab_df_fragmented

Added by Emmanuel Hocdet almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2012-03-26
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

in metaslab_df_alloc the rule to switch to first-fit is:
if (max_size < metaslab_df_alloc_threshold ||
free_pct < metaslab_df_free_pct) {

in metaslab_df_fragmented the rule to tag a spacemap not fragmented is:
if (max_size >= metaslab_df_alloc_threshold &&
free_pct >= metaslab_df_free_pct)
return (B_FALSE);

the conditions are equivalent and it's a problem:
- the block allocator always use the same metaslab in a txg context.
- metaslab can be tagged fragmented after
So, metaslab_df_alloc switch to best-fit to first-fit algorithm before metaslab_df_fragmented tag metaslab fragmented (and zfs decide to switch to fresh metaslab) : IO dramatically drop for the interval (with first-fit).

Metaslab should tagged fragmented before.

Change metaslab_df_fragmented condition like :
if (max_size > metaslab_df_alloc_threshold &&
free_pct > metaslab_df_free_pct)
return (B_FALSE);
should resolve this issue.

No data to display

Also available in: Atom PDF