Interprocess communication limits
This topic describes system limits for Interprocess communication (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.
Semaphores | 4.3.0 | 4.3.1 | 4.3.2 | 5.1 | 5.2 | 5.3 | 7.1 |
---|---|---|---|---|---|---|---|
Maximum number of semaphore IDs for 32-bit kernel | 4096 | 4096 | 131072 | 131072 | 131072 | 131072 | N/A |
Maximum number of semaphore IDs for 64-bit kernel | 4096 | 4096 | 131072 | 131072 | 131072 | 1048576 | 1048576 |
Maximum semaphores per semaphore ID | 65535 | 65535 | 65535 | 65535 | 65535 | 65535 | 65535 |
Maximum operations per semop call | 1024 | 1024 | 1024 | 1024 | 1024 | 1024 | 1024 |
Maximum undo entries per process | 1024 | 1024 | 1024 | 1024 | 1024 | 1024 | 1024 |
Size in bytes of undo structure | 8208 | 8208 | 8208 | 8208 | 8208 | 8208 | 8208 |
Semaphore maximum value | 32767 | 32767 | 32767 | 32767 | 32767 | 32767 | 32767 |
Adjust on exit maximum value | 16384 | 16384 | 16384 | 16384 | 16384 | 16384 | 16384 |
Message queue | 4.3.0 | 4.3.1 | 4.3.2 | 5.1 | 5.2 | 5.3 | 7.1 |
---|---|---|---|---|---|---|---|
Maximum message size | 4 MB | 4 MB | 4 MB | 4 MB | 4 MB | 4 MB | 4 MB |
Maximum bytes on queue | 4 MB | 4 MB | 4 MB | 4 MB | 4 MB | 4 MB | 4 MB |
Maximum number of message queue IDs for 32-bit kernel | 4096 | 4096 | 131072 | 131072 | 131072 | 131072 | 131072 |
Maximum number of message queue IDs for 64-bit kernel | 4096 | 4096 | 131072 | 131072 | 131072 | 1048576 | 1048576 |
Maximum messages per queue ID | 524288 | 524288 | 524288 | 524288 | 524288 | 524288 | 524288 |
Shared memory | 4.3.0 | 4.3.1 | 4.3.2 | 5.1 | 5.2 | 5.3 | 7.1 |
---|---|---|---|---|---|---|---|
Maximum segment size (32-bit process) | 256 MB | 2 GB | 2 GB | 2 GB | 2 GB | 2 GB | 2 GB |
Maximum segment size (64-bit process) for 32-bit kernel | 256 MB | 2 GB | 2 GB | 64 GB | 1 TB | 1 TB | N/A |
Maximum segment size (64-bit process) for 64-bit kernel | 256 MB | 2 GB | 2 GB | 64 GB | 1 TB | 32 TB | 32 TB |
Minimum segment size | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Maximum number of shared memory IDs (32-bit kernel) | 4096 | 4096 | 131072 | 131072 | 131072 | 131072 | 131072 |
Maximum number of shared memory IDs (64-bit kernel) | 4096 | 4096 | 131072 | 131072 | 131072 | 1048576 | 1048576 |
Maximum number of segments per process (32-bit process) | 11 | 11 | 11 | 11 | 11 | 11 | 11 |
Maximum number of segments per process (64-bit process) | 268435456 | 268435456 | 268435456 | 268435456 | 268435456 | 268435456 | 268435456 |
IPC limits on AIX4.3
- For semaphores and message queues, the table shows the system limits
- For shared memory, the maximum shared memory segment size is 256GB.
- For shared memory without the extended shmat capability:
- A process can attach a maximum of 11 shared memory segments.
- For shared memory with the extended shmat capability:
- When a shared memory segments is attached, its size is rounded to a multiple of 4096 bytes
- A process can attach as many shared memory segments as will fit in the available address space. The maximum available address space size is 11 segments, or 11 times 256 MB.
- The extended shmat capability is used if the environment variable EXTSHM has the value ON when the process starts executing.
- The available address space for attaching shared memory segments is reduced if the large or very large address-space model is used.
IPC limits on AIX 4.3.1
- The maximum size of a shared memory segment increases from 256 MB to 2 GB. When a shared memory segment larger than 256 MB is attached, its size is rounded to a multiple of 256 MB, even if the extended shmat capability is being used.
IPC limits on AIX 4.3.2
- The maximum number of message queues, semaphore IDs, and shared memory segments is 131072.
- The maximum number of messages per queue is 524288.
IPC limits on AIX 5.1
- The maximum size of a shared memory segment for 64-bit processes is 64 GB. A 32-bit process cannot attach a shared memory segment larger than 2 GB.
IPC limits on AIX 5.2
- The maximum size of a shared memory segment for 64-bit processes is 1 TB. A 32-bit process cannot attach a shared memory segment larger than 2 GB.
- 32-bit applications can use the shmat capability to obtain more than 11 segments when using the very large address space model without having to use extended shmat. For more information on the very large address space model.
- Applications can query the IPC limits on the system using the vmgetinfo system call.
IPC limits on AIX 5.3
- The maximum size of a shared memory segment for 64-bit processes is 32 TB. A 32-bit process cannot attach a shared memory segment larger than 2 GB.
- 32-bit applications can use the shmat capability to obtain more than 11 segments when using the very large address space model without having to use extended shmat. For more information on the very large address space model.
- Applications can query the IPC limits on the system using the vmgetinfo system call.
IPC limits on AIX 6.1
The 32-bit kernel is no longer supported on AIX 6.1. All other values are the same.