Skip to main content

Problem:

Are there any general tips on how to inprove file access performance?  Often we are asked about buffers, and if there is a way to make read only data read faster?

Resolution:

Things to consider are:

Exclusive access (OPENINPUTSHARED/READSEMA).

For a file that is accessed many times, have a consider using the LOADONTOHEAP EXTFH (external file handler) configuration option and/or SEQDATABUG EXTFH configuration option.

Each of these is documented in the Net Express help.

Also from the Net Express help, under the File Handler help>performance:

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 opperation 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.

You should also check the server settings and make sure opportunistic locks are enabled:-http://support.microsoft.com/kb/296264

Poor performance on a windows server has also been the result of Active Directory being installed on the server.

Old KB# 1374

#RMCOBOL
#ServerExpress
#COBOL
#netexpress
#AcuCobol