In your estimate of the space required for a table, you should also consider the amount of sbspace storage for any smart large objects (such as CLOB, BLOB, or multirepresentative data types) that are part of the table. An sbspace contains user-data areas and metadata areas. CLOB and BLOB data is stored in sbpages that reside in the user-data area. The metadata area contains the smart-large-object attributes, such as average size and whether or not the smart large object is logged. For more information about sbspaces, see your IBM Informix: Dynamic Server Administrator's Guide.
The first chunk of an sbspace must have a metadata area. When you add smart large objects, the database server adds more control information to this metadata area.
If you add a chunk to the sbspace after the initial allocation, you can take one of the following actions for metadata space:
This action provides the following advantages:
If you specify the onspaces -U option, the database server does not allocate metadata space in the new chunk. Instead it must use a metadata area in one of the other chunks.
In addition, the database server reserves 40 percent of the user area to be used in case the metadata area runs out of space. Therefore, if the allocated metadata becomes full, the database server starts using this reserved space in the user area for additional control information.
You can let the database server calculate the size of the metadata area for you on the initial chunk and on each added chunks. However, you might want to specify the size of the metadata area explicitly, to ensure that the sbspace does not run out of metadata space and the 40 percent reserve area. You can use one of the following methods to explicitly specify the amount of metadata space to allocate:
The database server uses this value to calculate the size of the metadata area to allocate when the -Ms option is not specified. If you do not specify AVG_LO_SIZE, the database server uses the default value of 8 kilobytes to calculate the size of the metadata area.
Use the procedure that Sizing the Metadata Area Manually for a New Chunk describes to estimate a value to specify in the onspaces -Ms option.
For information on monitoring the space usage in an sbspace and allocating more space, see the IBM Informix: Dynamic Server Administrator's Guide.
This procedure assumes that you know the sbspace size and need to allocate more metadata space. Each chunk can contain metadata but the sum total must accommodate enough room for all LO headers (average length 570 bytes each) and the chunk free list (which lists all the free extents in the chunk), as the following procedure shows.
Total metadata kilobytes = (LOcount*570)/1024 + (numchunks*800) + 100
This example estimates the metadata size required for two sbspace chunks, using the preceding procedure:
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
Total metadata = (LOcount*570)/1024 + (numchunks*800) + 100 = (31,000 * 570)/1024 + (2*800) + 100 = 17256 + 1600 + 100 = 18956 kilobytes
Additional metatdata = Total metatdata - current metadata = 18956 - 2000 = 16956 kilobytes
% onspaces -a sbchk2 -p /dev/raw_dev1 -o 200 -Ms 16956
For more information about onspaces and onstat -d, see the IBM Informix: Dynamic Server Administrator's Reference.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]