Definition
The
SHMVIRTSIZE parameter in the Informix ONCONFIG file specifies how much shared memory in KB to use for the "virtual portion" at system start. Informix stores various objects here, including the dictionary cache.The most important factor affecting the size of virtual portion is the session pools. If a large number of users are very active, Informix adds memory to this area. This dynamic allocation of shared memory can affect performance considerably, so you should allocate a large initial segment to avoid dynamic increases.
Use
For up-to-date recommendations, see SAP Note 38307.
Adjust the parameters
SHMVIRTSIZE and SHMADD to the actual storage requirements of the system for the following reasons:You can use the
main screen of the database monitor to check for Virtual Portion in the Shared Memory display, which shows the value of SHMVIRTSIZE . Or you can execute the command onstat -g seg (as the user <sid>adm/informix or with transaction ST04), as in the following example:
Segment Summary: | |||||||
(resident segments are not locked) | |||||||
id |
key |
addr |
size |
ovhd |
class |
blkused |
blkfree |
778 |
1381386243 |
c0651000 |
679936 |
616 |
M |
80 |
3 |
776 |
1381386241 |
c072d000 |
46792704 |
1584 |
R |
5708 |
4 |
777 |
1381386242 |
c33cd000 |
8192000 |
732 |
V |
1000 |
0 |
2331 |
1381386244 |
d5fea000 |
8388608 |
732 |
V |
1020 |
4 |
2844 |
1381386245 |
d67ea000 |
8388608 |
732 |
V |
536 |
488 |
Total |
- |
- |
72441856 |
- |
- |
8344 |
499 |
Set the parameter
SHMVIRTSIZE to a value which can be determined as follows in a production system:Take the sum of the size of the individual virtual shared memory segments (that is, the rows with the value

This example of how to set
SHMVIRTSIZE
= ((8192000 + 8388608 + 8388608) / 1024) x 1.1= 27,000 KB
See also:
Shared Memory (Informix) SHMADD (Informix) SHMTOTAL (Informix)