[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

General Programming Concepts: Writing and Debugging Programs


IPC (Inter-Process Communication) Limits

This document describes how to set limits for IPC mechanisms and applies to AIX 3.2.5, AIX 4.1, AIX 4.2, and AIX 4.3.


Shared Memory Segments

On some UNIX systems, users edit /etc/master and set their own limits for IPC mechanisms (semaphore, shared memory segments, and message queues). The problem with this method is that the higher the limits are set, the bigger the kernel gets, and performance can be adversely affected. AIX uses a different method.

In AIX, upper limits are set for IPC mechanisms, and the individual IPC types are dynamically allocated/deallocated up to these upper limits. These are not configurable in AIX.

Therefore, the kernel grows and shrinks in size as IPC types are allocated, so any performance hit is only for the life of the IPC type.

This difference in methods sometimes confuses users who are installing or using databases. In AIX, IPC limits are handled for users. The limit that may cause a problem is the maximum number of shared memory segments per process. This number can be 10, 11 or more if EXTSHM is used. In other words the limit that may cause a problem is the maximum number of shared memory regions that can be attached simultaneously per process.

The structures containing IPC limits are defined in three files in /usr/include/sys/: sem.h, msg.h, and shm.h. The structures themselves are called seminfo, msginfo, and shminfo, respectively. Only the structures are defined--not the contents.

The following is a list of values for AIX 3.2.5, 4.1, 4.2, 4.3.0 4.3.1, 4.3.2 and later. None of these values can be modified.

Before AIX 4.2.1

AIX 4.2.1

AIX 4.3

AIX 4.3.1

AIX 4.3.2


AIX VERSIONS                      3.2.5 - 4.2.0  4.2.1   4.3.0   4.3.1   4.3.2
                                  -------------  ------- ------  ------  ------
Semaphores:
 
Maximum number of semaphore IDs          4096     4096     4096   4096  131072
Maximum semaphores per semaphore ID     65535    65535    65535  65535   65535
Maximum operations per semop call        1024     1024     1024   1024    1024
Maximum undo entries per process         1024     1024     1024   1024    1024
Size in bytes of undo structure          8208     8208     8208   8208    8208
Semaphore maximum value                 32767    32767    32767  32767   32767
Adjust on exit maximum value            16384    16384    16384  16384   16384
 
Message Queues:
 
Maximum message size                    65535      4MB      4MB    4MB      4MB
Maximum bytes on queue                  65535      4MB      4MB    4MB      4MB
Maximum number of message queue IDs      4096     4096     4096   4096   131072
Maximum messages per queue ID            8192   524288   524288 524288   524288
 
Shared Memory:
 
Maximum segment size                    256MB    256MB    256MB    2GB      2GB
Minimum segment size                        1        1        1      1        1
Maximum number of shared memory IDs.     4096     4096     4096   4096   131072
Maximum number of segments per process     10      11*      11*    11*      11*

* See the information in preceding sections of this document about the differences between the various versions.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]