|Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 1 (10.1)
Part Number B10119-01
A number of working parameters of Oracle Objects for OLE can be customized. Access to these parameters is provided through the Windows Registry.
Tuning and Customization using Windows Registry
The Registry key is
HKEY_LOCAL_MACHINE and the subkey is
software\oracle\HOMEID\OO4O. OO4O installation will create the following section in the registry:
"Helpfile" = "oracleo.hlp"
"FetchLimit" = 20
"FetchSize" = 4096
"PerBlock" = 16
"CacheBlocks" = 20
"SliceSize" = 256
TempFileDirectory = [Path]
This entry provides one method for specifying disk drive and directory location for the temporary cache files. The files are created in the first legal directory path given by:
This entry specifies the full path (drive/path/filename) of the Oracle Objects for OLE help file as needed by the Oracle Data Control. If this entry cannot be located, the file
oracleo.hlp is assumed to be in the directory where ORADC is located (normally
A cache consisting of temporary data files is created to manage amounts of data too large to be maintained exclusively in memory. This cache is needed primarily for dynaset objects, where, for example, a single LONG RAW column can contain more data than exists in physical (and virtual) memory.
The default values have been chosen for simple test cases, running on a computer with limited Windows resources. Tuning with respect to your computer and applications is recommended.
Note that the values specified in the following sections are for a single cache, and that a separate cache is allocated for each object that requires one. For example, if your application contains three dynaset objects, three independent data caches are constructed, each using resources as described.
SliceSize = 256 (default)
This entry specifies the minimum number of bytes used to store a piece of data in the cache. Items smaller than this value are allocated the full SliceSize bytes for storage; items larger than this value are allocated an integral multiple of this space value. An example of an item to be stored is a field value of a dynaset.
PerBlock = 16 (default)
This entry specifies the number of Slices (described in the preceding entry) that are stored in a single block. A block is the minimum unit of memory or disk allocation used within the cache. Blocks are read from and written to the disk cache temporary file in their entirety. Assuming a SliceSize of 256 and a PerBlock value of 16, then the block size is 256 * 16 = 4096 bytes.
CacheBlocks = 20 (default)
This entry specifies the maximum number of blocks held in memory at any one time. As data is added to the cache, the number of used blocks grows until the value of CacheBlocks is reached. Previous blocks are swapped from memory to the cache temporary disk file to make room for more blocks. The blocks are swapped based upon recent usage. The total amount of memory used by the cache is calculated as the product of (SliceSize * PerBlock * CacheBlocks). Note that the maximum CacheBlocks setting is 127
Recommended Values: You may need to experiment to find optimal cache parameter values for your applications and computer environment. Here are some guidelines to keep in mind when selecting different values:
· The larger the (SliceSize * PerBlock) value, the more disk I/O is required for swapping individual blocks.
· The smaller the (SliceSize * PerBlock) value, the more likely it is that blocks will need to be swapped to or from disk.
· The larger the CacheBlocks value, the more memory is required, but the less likely it is that swapping will be required.
A reasonable experiment for determining optimal performance might proceed as follows:
· Keep the SliceSize >= 128 and vary PerBlock to give a range of block sizes from 1K through 8K.
· Vary the CacheBlocks value based upon available memory. Set it high enough to avoid disk I/O, but not so high that Windows begins swapping memory to disk.
· Gradually decrease the CacheBlocks value until performance degrades or you are satisfied with the memory usage. If performance drops off, increase the CacheBlocks value once again as needed to restore performance.
FetchLimit = 20 (default)
This entry specifies the number of elements of the array into which data is fetched from Oracle. If you change this value, all fetched values are immediately placed into the cache, and all data is retrieved from the cache. Therefore, you should create cache parameters such that all of the data in the fetch arrays can fit into cache memory. Otherwise, inefficiencies may result.
Increasing the FetchLimit value reduces the number of fetches (calls to the database) calls and possibly the amount of network traffic. However, with each fetch, more rows must be processed before user operations can be performed. Increasing the FetchLimit increases memory requirements as well.
FetchSize = 4096 (default)
This entry specifies the size, in bytes, of the buffer (string) used for retrieved data. This buffer is used whenever a long or long raw column is initially retrieved.