For better I/O performance, the entire smart large objects should be allocated in one extent to be contiguous. For more information about sizing extents, see Sbspace Extent Sizes.
Contiguity provides the following I/O performance benefits:
You can use the following command-line utilities to monitor the effectiveness of I/O operations on smart large objects:
The following sections describe how to use these utility options to monitor sbspaces. For more information about oncheck and onstat, see the utilities chapter in the IBM Informix: Dynamic Server Administrator's Reference.
The oncheck -cS option checks smart-large-object extents and the sbspace partitions in the user-data area. Figure 24 shows an example of the output from the -cS option for s9_sbspc.
The values in the Sbs#, Chk#, and Seq# columns correspond to the Space Chunk Page value in the -pS output. The Bytes and Pages columns display the size of each smart large object in bytes and pages.
To calculate the average size of smart large objects, you can total the numbers in the Size (Bytes) column and then divide by the number of smart large objects. In Figure 24, the average number of bytes allocated is 2690, as the following calculation shows:
Average size in bytes = (15736 + 98 + 97 + 62 + 87 + 56) / 6 = 16136 / 6 = 2689.3
For information on how to specify smart large object sizes to influence extent sizes, see Sbspace Extent Sizes.
Validating space 's9_sbspc' ... Large Objects ID Ref Size Allocced Creat Last Sbs# Chk# Seq# Cnt (Bytes) Pages Extns Flags Modified ---- ---- ----- ---- ---------- -------- ----- ----- ------------------------ 2 2 1 1 15736 8 1 N-N-H Thu Jun 25 16:59:12 1998 2 2 2 1 98 1 1 N-K-H Thu Jun 25 16:59:12 1998 2 2 3 1 97 1 1 N-K-H Thu Jun 25 16:59:12 1998 2 2 4 1 62 1 1 N-K-H Thu Jun 25 16:59:12 1998 2 2 5 1 87 1 1 N-K-H Thu Jun 25 16:59:12 1998 2 2 6 1 56 1 1 N-K-H Thu Jun 25 16:59:12 1998
The Extns field shows the minimum extent size, in number of pages, allocated to each smart large object.
Execute oncheck -pe to display the following information to determine if the smart large objects occupy contiguous space within an sbspace:
The three values in brackets following SBLOBSpace LO correspond to the Sbs#, Chk#, and Seq# columns in the -cS output.
Figure 25 shows sample output. In this example, the size field shows that the first smart large object occupies eight pages. Because the offset field shows that the first smart large object starts at page 53 and the second smart large object starts at page 61, the first smart large object occupies contiguous pages.
Chunk Pathname Size Used Free 1000 940 60 Description Offset Size -------------------------------------------------- -------- -------- RESERVED PAGES 0 2 CHUNK FREELIST PAGE 2 1 s9_sbspc:'informix'.TBLSpace 3 50 SBLOBSpace LO [2,2,1] 53 8 SBLOBSpace LO [2,2,2] 61 1 SBLOBSpace LO [2,2,3] 62 1 SBLOBSpace LO [2,2,4] 63 1 SBLOBSpace LO [2,2,5] 64 1 SBLOBSpace LO [2,2,6] 65 1 ...
The oncheck -pS option displays information about smart-large-object extents and metadata areas in sbspace partitions. If you do not specify an sbspace name on the command line, oncheck checks and displays the metadata for all sbspaces. Figure 26 shows an example of the -pS output for s9_sbspc.
To display information about smart large objects, execute the following command:
oncheck -pS spacename
The oncheck -pS output displays the following information for each smart large object in the sbspace:
When you use onspaces -c -S to create an sbspace, you can use the -Df option to specify various storage characteristics for the smart large objects. You can use onspaces -ch to change attributes after the sbspace is created. The Create Flags field in the oncheck -pS output displays these storage characteristics and other attributes of each smart large object. In Figure 26, the Create Flags field shows LO_LOG because the LOGGING tag was set to ON in the -Df option.
Space Chunk Page = [2,2,2] Object ID = 987122917 LO SW Version 4 LO Object Version 1 Created by Txid 7 Flags 0x31 LO_LOG LO_NOKEEP_LASTACCESS_TIME LO_HIGH_INTEG Data Type 0 Extent Size -1 IO Size 0 Created Thu Apr 12 17:48:35 2001 Last Time Modified Thu Apr 12 17:48:43 2001 Last Time Accessed Thu Apr 12 17:48:43 2001 Last Time Attributes Modified Thu Apr 12 17:48:43 2001 Ref Count 1 Create Flags 0x31 LO_LOG LO_NOKEEP_LASTACCESS_TIME LO_HIGH_INTEG Status Flags 0x0 LO_FROM_SERVER Size (Bytes) 2048 Size Limit -1 Total Estimated Size -1 Deleting TxId -1 LO Map Size 200 LO Map Last Row -1 LO Map Extents 2 LO Map User Pages 2
Use the onstat -g smb s option to display the following characteristics that affect the I/O performance of each sbspace:
If applications are updating temporary smart large objects, logging is not required. You can turn off logging to reduce the amount of I/O activity to the logical log, CPU utilization, and memory resources.
Average size and extent size should be similar to reduce the number of I/O operations required to read in an entire smart large object. The avg s/kb output field shows the average smart-large-object size in kilobytes. In Figure 27, the avg s/kb output field shows the value 30 kilobytes.
Specify the final size of the smart large object in either of the following functions to allocate the object as a single extent:
For more information on the functions to open a smart large object and to set the estimated number of bytes, see the IBM Informix: ESQL/C Programmer's Manual and IBM Informix: DataBlade API Programmer's Guide.
The 1st sz/p, nxt sz/p, and min sz/p output fields show these extent sizes if you set the extent tags in the -Df option of onspaces. In Figure 27, these output fields show values of 0 and -1 because these tags are not set in onspaces.
sbnum 7 address 2afae48 Space : flags nchk owner sbname -------- 1 informix client Defaults : LO_LOG LO_KEEP_LASTACCESS_TIME LO : ud b/pg flags flags avg s/kb max lcks 2048 0 -------- 30 -1 Ext/IO : 1st sz/p nxt sz/p min sz/p mx io sz 4 0 0 -1 HdrCache : max free 512 0