Additional settings for installing on Solaris

Configure Solaris systems with the resource limits required by IBM® WebSphere® MQ.

IBM WebSphere MQ uses semaphores, shared memory, and file descriptors, and it is probable that the default resource limits are not adequate.

For further information on maxusers, and other process-sizing parameters, on Solaris 10, see Process sizing parameters.

If you are using Solaris 10, or later versions, you must change the default resource limits for each zone IBM WebSphere MQ will be installed in. To set new default limits for all users in the mqm group, set up a project for the mqm group in each zone.

To find out if you already have a project for the mqm group, log in as root and enter the following command:
projects -l
If you do not already have a group.mqm project defined, enter the following command:
projadd -c "WebSphere MQ default settings" 
        -K "process.max-file-descriptor=(basic,10000,deny)" 
        -K "project.max-shm-memory=(priv,4GB,deny)"
        -K "project.max-shm-ids=(priv,1024,deny)" 
        -K "project.max-sem-ids=(priv,1024,deny)" group.mqm
If a project called group.mqm is listed, review the attributes for that project. The attributes must include the following minimum values:
process.max-file-descriptor=(basic,10000,deny)
project.max-sem-ids=(priv,1024,deny)
project.max-shm-ids=(priv,1024,deny)
project.max-shm-memory=(priv,4294967296,deny)
If you need to change any of these values, enter the following command:

projmod -s -K "process.max-file-descriptor=(basic,10000,deny)" 
           -K "project.max-shm-memory=(priv,4GB,deny)" 
           -K "project.max-shm-ids=(priv,1024,deny)"
           -K "project.max-sem-ids=(priv,1024,deny)" group.mqm
Note that you can omit any attributes from this command that are already correct.
For example, to change only the number of file descriptors, enter the following command:
projmod -s -K "process.max-file-descriptor=(basic,10000,deny)" group.mqm

(To set only the limits for starting the queue manager under the mqm user, login as mqm and enter the command projects . The first listed project is likely to be default , and so you can use default instead of group.mqm, with the projmod command.)

You can find out what the file descriptor limits for the current project are, by compiling and running the following program.

Before running the program you must create the tryfd file in the current directory:
/*********************************************************
You must make the tryfd file in the current directory first
before running this program..
**********************************************************/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

main() {
int b=0;
int fd;
  for (;;) {
    fd = open ("./tryfd", O_RDONLY);
    if (fd == -1) {
        printf ("fd is %d\n", b);
        perror("fd");
          break;
        }
        b++;
  }
}

To ensure that the attributes for the project group.mqm are used by a user session when running Websphere MQ, make sure that the primary group of that user ID is mqm. In the examples in this topic, the group.mqm project ID will be used. For further information on how projects are associated with user sessions, see Sun's System Administration Guide: Solaris Containers-Resource Management and Solaris Zones for your release of Solaris.

For more information on configuring your system, see How to configure UNIX and Linux® systems for WebSphere MQ.