Project

General

Profile

Bug #9426

metaslab size can exceed offset addressable by spacemap

Added by Brad Lewis over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-03-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

metaslab size can exceed offset addressable by spacemap. The vdev can address up to 2^63 * SPA_MAXBLOCKSIZE (512). A metaslab can address up to 2^47 * 2^vdev_ashift. Therefore we may need to increase the number of metaslabs so that the maximum metaslab size is capped at the amount that can be addressed by the spacemap. This should happen in vdev_metaslab_set_size().

History

#1

Updated by Prakash Surya over 1 year ago

Below is the block comment from the proposed change; copying it into the bug for posterity:

        /*                                                                      
         * There are two dimensions to the metaslab sizing calculation:         
         * the size of the metaslab and the count of metaslabs per vdev.        
         * In general, we aim for vdev_max_ms_count (200) metaslabs. The        
         * range of the dimensions are as follows:                              
         *                                                                      
         *      2^29 <= ms_size  <= 2^38                                        
         *        16 <= ms_count <= 131,072                                     
         *                                                                      
         * On the lower end of vdev sizes, we aim for metaslabs sizes of        
         * at least 512MB (2^29) to minimize fragmentation effects when         
         * testing with smaller devices.  However, the count constraint         
         * of at least 16 metaslabs will override this minimum size goal.           
         *                                                                      
         * On the upper end of vdev sizes, we aim for a maximum metaslab        
         * size of 256GB.  However, we will cap the total count to 2^17         
         * metaslabs to keep our memory footprint in check.                     
         *                                                                      
         * The net effect of applying above constrains is summarized below.         
         *                                                                      
         *      vdev size       metaslab count                                  
         *      -------------|-----------------                                 
         *      < 8GB           ~16                                             
         *      8GB - 100GB     one per 512MB                                   
         *      100GB - 50TB    ~200                                            
         *      50TB - 32PB     one per 256GB                                   
         *      > 32PB          ~131,072                                        
         *      -------------------------------                                 
         */

#2

Updated by Electric Monk over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit b4bf0cf0458759c67920a031021a9d96cd683cfe

commit  b4bf0cf0458759c67920a031021a9d96cd683cfe
Author: Don Brady <don.brady@delphix.com>
Date:   2018-05-15T20:02:24.000Z

    9426 metaslab size can exceed offset addressable by spacemap
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Matt Ahrens <matt@delphix.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF