You can take various steps to improve the performance of the File Handler. These all involve the use of various configuration
options. Details are as follows:
- You can increase the number of indexed file nodes that are cached, as opposed to being held on disk. You specify the number
of nodes with the INDEXCOUNT configuration option. We recommend a setting of 32, but you can choose a larger number up to
64, for further improvement at the expense of memory usage
- You can stop the File Handler from obtaining a semaphore when it executes an I/O operation that does not modify the file and
the file is shared. In this context a semaphore is a lock applied to a reserved location in the file, which inhibits access
to the file by more than one user. This extra call impairs performance. To stop the File Handler from obtaining a semaphore,
set the READSEMA configuration option to OFF.
- You can adjust the use of record locks. By default the File Handler:
- Returns a locked-record file status when it finds a locked record, but also returns the data in the record area
- Tests for the presence of a file lock when it executes a read operation that does not request a lock.
Testing for the presence of a lock is expensive in terms of performance. You can eliminate this step by the use of either
of the following configuration options:
- LOCKTYPE. Set this to 1 to prevent access to locked records.
- IGNORELOCK. Set this to ON to stop the File Handler testing for locks when it performs a READ operation that is not itself
trying to obtain a lock.
If you set LOCKTYPE to 1, the setting of IGNORELOCK is irrelevant
- You can force the File Handler to load an entire file into memory when it opens the file, and to execute all file operations
in memory, only writing it back to disk when it is closed. You force this behavior by setting LOADONTOHEAP to ON. This setting
is available only for non-shared files. You should use this setting with care and only on small files.