How do I adjust interprocess communications (IPC) variables?
Processes can communicate with each other by using one of several types of interprocess communication (IPC). IPC allows information transfer or synchronization to occur between processes.
Prior to the Solaris 10 release, IPC tunable parameters were set by adding an entry to the /etc/system
file. The resource controls facility now provides resource controls that define the behavior of the kernel's IPC facilities. These resource controls replace the /etc/system
tunables.
Solaris 2.6 / 7 / 8 / 9
All changes are made in /etc/system
Message Queue
Option | Description | Defaults |
---|---|---|
msgsys:msginfo_msgmap | Number of entries in the message map | 100 |
msgsys:msginfo_msgmax | Maximum message size | 2048 |
msgsys:msginfo_msgmnb | Maximum bytes in queue | 4096 |
msgsys:msginfo_msgmni | Number of message queue identifiers | 50 |
msgsys:msginfo_msgssz | Message segment size | 8 |
msgsys:msginfo_msgtql | Number of system message headers | 40 |
msgsys:msginfo_msgseg | Number of message segments | 1024 Must be less than 32768 |
Semaphores
Option | Description | Defaults |
---|---|---|
semsys:seminfo_semmap | Number of entries in the semaphore map | 10 |
semsys:seminfo_semmni | Number of identifiers | 10 |
semsys:seminfo_semmns | Number of semaphores in the system | 60 |
semsys:seminfo_semmnu | Number of processes in the undo facility | 30 |
semsys:seminfo_semmsl | Maximum semaphores per id | 25 |
semsys:seminfo_semopm | Maximum operations per call | 10 |
semsys:seminfo_semume | Number of undo structures per process | 10 |
Shared Memory
Option | Description | Defaults |
---|---|---|
shmsys:shminfo_shmmax | Maximum size of a shared memory segment. | Solaris 2.6 / 7 / 8 1,048,576 Solaris 9 8,388,608 |
shmsys:shminfo_shmmin | Minimum size of a shared memory segment. Changing this value is not recommended as high values can cause application failure | 1 |
shmsys:shminfo_shmmni | Maximum number of total shared memory segments that can be created | 100 |
shmsys:shminfo_shmseg | Maximum number of shared memory segments per process | 6 |
Solaris 10
New project facility. In addition to global settings, as in prior Solaris releases, it can also handle configuration per project, and per process. Controls are also now available while system is running.
The examples that follow make the necessary changes dymanically.
Message Queue
Option | Description | Defaults | Maximums |
---|---|---|---|
project.max-msg-ids Replaces msgsys:msginfo_msgmni | Maximum number of message queue ids | 128 | 16777216 (2^24) |
Example: prctl -n project.max-msg-ids -r -v 1024 -i project 3 | |||
project.max-msg-qbytes | Replaces msgsys:msginfo_msgmnb Maximum number of bytes of messages on a queue | 65536 | 32-bit 4294967295(ULONG_MAX, 32-bit) 64-bit 18446744073709551615 (ULONG_MAX, 64-bit) |
Example: prctl -n project.max-msg-qbytes -r -v 1024 -i project 3 | |||
project.max-msg-messages Replaces msgsys:msginfo_msgtql | Maximum number of messages in queue | 8192 | 4294967295 (UINT_MAX) |
Example: prctl -n project.max-msg-messages -r -v 16384 -i project 3 |
Semaphore
Option | Description | Defaults | Maximums |
---|---|---|---|
project.max-sem-ids Replaces semsys:seminfo_semmni | Maximum number of semaphore ids allowed | 128 | 16777216 (2^24) |
Example: prctl -n project.max-sem-ids -r -v 256 -i project 3 | |||
project.max-sem-nsems Replaces semsys:seminfo_semmsi | Maximum number of semaphores per set | 512 | 32767 (SHRT_MAX) |
Example: prctl -n project.max-sem-nsems -r -v 1024 -i project 3 | |||
project.max-sem-ops Replaces semsys:seminfo_semopm | Maximum number of semaphore operations allowed | 512 | 2147483647 (INT_MAX) |
Example: prctl -n project.max-sem-ops -r -v 1024 -i project 3 |
Shared Memory
Option | Description | Defaults | Maximums |
---|---|---|---|
project.max-shm-ids Replaces shmsys:shminfo_shmmni | Maximum number of shared memory ids allowed a project. | 128 | 16777216 (2^24) |
Example: prctl -n project.max-shm-ids -r -v 256 -i project 3 | |||
project.max-shm-memory Replaces shmsys:shminfo_shmmax | Total amount of shared memory allowed a project (not merely per segment, as in previous versions) | 1/4 Memory | 18446744073709551616 (UINT64_MAX) |
Example: prctl -n project.max-shm-memory -r -v 4G -i project 3 |
To make the changes persistent under Solaris 10 either modify the /etc/project
manually, or use the projmod
command, for exmple if we want to set max-shm-memory to 4G we would run:
projmod -sK "project.max-shm-memory=(priv,4G,deny)" default