Example of calculating the metadata area for a new chunk

This topic contains an example showing how to estimate the metadata size required for two sbspaces chunks.

Suppose the Metadata size field in the onstat -d option shows that the current metadata area is 1000 pages. If the system page size is 2048 bytes, the size of this metadata area is 2000 kilobytes, as the following calculation shows:

current metadata = (metadata_size * pagesize) / 1024
                 = (1000 * 2048) / 1024 
               = 2000 kilobytes

Suppose you expect 31,000 smart large objects in the two sbspace chunks. The following formula calculates the total size of metadata area required for both chunks, rounding up fractions:

Total metadata = (LOcount*570)/1024 + (numchunks*800) + 100 
               = (31,000 * 570)/1024 + (2*800) + 100 
               = 17256 + 1600 + 100
             = 18956 kilobytes 
To obtain the additional area that is required for metadata:
  1. Subtract the current metadata size from the total metadata value.
    Additional metadata = Total metadata - current metadata 
                         = 18956 - 2000 
                       = 16956 kilobytes
  2. When you add the chunk to the sbspace, use the -Ms option of the onspaces -a command to specify a metadata area of 16,956 kilobytes.
    % onspaces -a sbchk2 -p /dev/raw_dev1 -o 200 -Ms 16956

Copyright© 2019 HCL Technologies Limited