24.1.11

SAP Note 18993 - Influence of LOCK Parameter on Shared Memory Size

Symptom:

Raising the number of available database locks (parameter LOCKS) requires memory in the shared memory.

Are there any guide values for this?

Other terms

LOCKS, ONCONFIG, Informix, main memory, memory consumption

Reason and Prerequisites

The number of available locks (parameter LOCKS in the file $INFORMIXDIR/etc/$ONCONFIG) can be set to a maximum of 8,000,000 (eight million).
This has a decisive influence on the total shared memory size and should therefore be considered carefully.
In Informix versions <=7.3x, the number of database locks are defined using the ONCONFIG parameter LOCKS when the database server is started. As of Version 9.3x, database locks can be created by the database server at runtime, but the maximum number is still 8,000,000 locks. As of Version 9.40, a maximum of 100,000 extra locks can also be allocated dynamically up to 15 times, in addition to the maximum value that can be configured (8,000,000). However, dynamic allocation can only be done by the IDS server itself, and cannot be configured.

Solution

One lock needs 44 bytes of memory in the resident portion of the Informix shared memory (72 bytes for 64-bit servers).

Caution:
These values are only guide values and can change in newer Informix Dynamic server versions.


The following can be used as approximate guide values for the influence of the database locks on the shared memory size:
Shared Memory Usage
Number of LOCKS 32-Bit Server 64-Bit Server
---------------------------------------------------------
400,000 20 MB 30 MB
1,000,000 50 MB 75 MB
1,600,000 80 MB 120 MB
2,000,000 100 MB 150 MB
3,000,000 150 MB 225 MB
4,000,000 200 MB 300 MB
5,000,000 250 MB 375 MB
6,000,000 300 MB 450 MB
7,000,000 350 MB 525 MB
8,000,000 400 MB 600 MB
( 9,500,000 475 MB )*

In general, the portion of shared memory used for the locks should not be more than 1/3 (one third) of the total shared memory size. An insufficient number of LOCKS may cause a transaction to terminate due to missing locks. This may lead to considerable performance problems and should therefore be avoided.
Since the database locks are dynamically expanded if required in IDS versions >=9.3x, an insufficient value for LOCKS is not critical in these versions.
Restriction: Due to the documented IBM Informix PTS 170449, a maximum of 100,000 locks can only be allocated 14 times in IDS Version 9.40.FC5 and lower. This product defect has been corrected as of IDS Version 9.40.FC6 or 10.00.FC4.

No comments:

Post a Comment