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

General Programming Concepts:
Writing and Debugging Programs

Inter-Process Communication (IPC) Limits

This document describes system limits for IPC mechanisms.

On some UNIX systems, the system administrator can edit the /etc/master file and define limits for IPC mechanisms (semaphores, shared memory segments, and message queues). The problem with this method is that the higher the limits, the more memory the operating system uses, and performance can be adversely affected.

AIX uses a different method. In AIX, upper limits are defined for the IPC mechanisms, which are not configurable. The individual IPC data structures are allocated and deallocated as needed, so memory requirements depend on the current system usage of IPC mechanisms.

This difference in methods sometimes confuses users who are installing or using databases. The limit that is the most confusing is the maximum number of shared memory segments that can be attached simultaneously per process. For 64-bit processes, the maximum number of shared memory segments is 268435456. For 32-bit processes, the maximum number of shared memory segments is 11, unless the extended shmat capability is used. For more information on extending shmat, see Understanding Memory Mapping.

The following tables summarize the semaphore limits on IPC mechanisms.

Semaphores 4.3.0 4.3.1 4.3.2 5.1 5.2
Maximum number of semaphore IDs: 4096 4096 131072 131072 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

The following tables summarize the message queue limits on IPC mechanisms.

Message Queue 4.3.0 4.3.1 4.3.2 5.1 5.2
Maximum message size 4 MB 4 MB 4 MB 4 MB 4 MB
Maximum bytes on queue 4 MB 4 MB 4 MB 4 MB 4 MB
Maximum number of message queue IDs 4096 4096 131072 131072 131072
Maximum messages per queue ID 524288 524288 524288 524288 524288

The following tables summarize the shared memory limits on IPC mechanisms.

Shared Memory 4.3.0 4.3.1 4.3.2 5.1 5.2
Maximum segment size (32-bit) 256 MB 2 GB 2 GB 2 GB 2 GB
Maximum segment size (64-bit) 256 MB 2 GB 2 GB 64 GB 1 TB
Minimum segment size 1 1 1 1 1
Maximum number of shared memory IDs 4096 4096 131072 131072 131072
Maximum number of segments per process (32-bit) 11 11 11 11 11
Maximum number of segments per process (64-bit) 268435456 268435456 268435456 268435456 268435456
Note
For 32-bit processes, the maximum number of segments per process is limited only by the size of the address space when the extended shmat capability is used.

IPC Limits on AIX 4.3

IPC Limits on AIX 4.3.1

IPC Limits on AIX 4.3.2

IPC Limits on AIX 5.1

IPC Limits on AIX 5.2

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