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 #1

Updated by Christopher Siden almost 9 years ago

  • Status changed from In Progress to Closed
commit 16a4a80
Author: George Wilson <george.wilson@delphix.com>
Date:   Tue Feb 19 14:15:41 2013

    3552 condensing one space map burns 3 seconds of CPU in spa_sync() thread
    3564 spa_sync() spends 5-10% of its time in metaslab_sync() (when not condensing)
    3566 recursive mutex panic in specfs
    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>
Actions

Also available in: Atom PDF