spa_sync() spends 5-10% of its time in metaslab_sync() (when not condensing)
zfs - Zettabyte File System
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.
Updated by Christopher Siden over 8 years ago
- Status changed from In Progress to Closed
commit 16a4a80 Author: George Wilson <firstname.lastname@example.org> 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 <email@example.com> Reviewed by: Dan Kimmel <firstname.lastname@example.org> Reviewed by: Matthew Ahrens <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>