![]() PROISAM Settings |
![]() Virtual Machine |
![]() |
The standard file system used by PROIV on Unix-based systems is PROISAM. It allows PROIV to access indexed sequential files by key. PROISAM maintains a record lock table in shared memory. PROISAM's use of shared memory can be tuned by changing the parameter file /etc/isamdef. This file contains entries for tuning a number of variables, as follows:
Setting |
Description |
MAXFILES |
Maximum number of unique open PROIV files on the system. |
MAXUSERS |
Maximum number of PROIV users. |
USRFILES |
Maximum number of unique open files per user. |
MAXLOCKS |
Maximum number of PROIV record locks on the system. |
AVGLOCK |
Average size (in bytes) of a record lock, (i.e. the average key size of locked records). |
SHMSIZE |
Pre-defined shared memory size. |
SHMDELAY |
Time to wait (seconds) for a resource (lock) to become available. |
SHMRETRY |
Maximum number of attempts to obtain a resource (lock). |
Table 21. PROISAM Settings for Unix
The default, minimum, and absolute maximum values for each of these variables are:
Variable |
Default |
Minimum |
Maximum |
MAXFILES |
200 |
20 |
32760 |
MAXUSERS |
64 |
1 |
32760 |
USRFILES |
10 |
10 |
32760 |
MAXLOCKS |
100 |
20 |
32760 |
AVGLOCK |
64 |
1 |
32760 |
SHMSIZE |
25496 |
- |
size of (int) |
SHMDELAY |
2 |
0 * |
255 |
SHMRETRY |
30 |
0 # |
255 |
Table 22. PROISAM Maxima
* Zero seconds will cause an immediate retry (subject to the OS scheduling algorithm)
which may not be sufficient for another user to have freed the resource. The recommended
minimum is 1.
# Zero will force an immediate failure on a Shared Memory Full condition.
Only MAXFILES is an absolute maximum. Some of the other parameters specified are simply used to calculate the size of memory to reserve, and do not set any limits on system usage. This size is calculated using the formula described in Shared Memory Segment Algorithm, page 134.
SHMSIZE provides an alternative method of specifying the size of the shared memory segment directly. If SHMSIZE is specified, then MAXUSERS, USRFILES, MAXLOCKS, and AVGLOCK need not be specified.
If PROISAM detects a shared memory full condition when trying to allocate a resource (lock), it will sleep for a period set by SHMDELAY and then reattempt the request. This is in the hope that normal system activity will have freed the necessary storage to satisfy the request.
The delay/retry sequence is repeated as necessary up to SHMRETRY times. If the retry count is exceeded, PROISAM reports failure of the attempted operation (file open, record lock ...) to the caller.
Upon resolution of the memory full condition (either success or failure) the occurrence will be logged in the file /etc/isamlog. For example:
Tue Jun 15 1:50:29 PDT 1993: Shared Memory Full: PID 12345 tried 4 times
Frequent occurrences of this condition indicate the need for a larger shared memory segment.
The maximum number of PROISAM files open per process on a Unix-based system is 50.
Topic ID: 720161