Project

General

Profile

Actions

Bug #3564

closed

spa_sync() spends 5-10% of its time in metaslab_sync() (when not condensing)

Added by Christopher Siden almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2013-02-15
Due date:
% Done:

100%

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

Description

From Matt Ahrens's original bug report at Delphix:

Typically, metaslab_sync() accounts for about 5-10% of the total spa_sync(). 
This is when we are not condensing a metaslab (when that happens,
metaslab_sync() is >50% of spa_sync()).  Most of this time is due to the first
call to space_map_walk(), where we move the freemap to the freed_map.  When
this happens, the freed_map is initially empty, and after doing this we will
remove all entries from the freemap.  

So rather than transferring each entry, we can simply change the pointer to the
avl trees so that the freed_map points to what was the freemap.  This will
require some changes to space_map_sync(), to make it not remove the entires
from the provided spacemap.
Actions

Also available in: Atom PDF