Additional settings for IBM WebSphere MQ on Linux

Use this topic to when configuring IBM® WebSphere® MQ on Linux® systems.

Installation DVD

Ensure that you have the correct 32-bit or 64-bit server DVD. If you want to install the 64-bit Server, you must mount the 64-bit Server DVD.

Shell interpreter

Ensure that /bin/sh shell is a valid shell interpreter compatible with the Bourne shell, otherwise the post-installation configuration of IBM WebSphere MQ does not complete successfully. If the shell was not installed by using RPM, you might see a prerequisites failure of /bin/sh shell when you try to install IBM WebSphere MQ. The failure is because the RPM tables do not recognize that a valid shell interpreter is installed. If the failure occurs, you can reinstall the /bin/sh shell by using RPM, or specify the RPM option --nodeps to disable dependency checking during installation of IBM WebSphere MQ.
Note: The --dbpath option is not supported when installing IBM WebSphere MQ on Linux.

Kernel configuration

IBM WebSphere MQ uses System V IPC resources, in particular shared memory and semaphores.

The minimum configuration for IBM WebSphere MQ for these resources is as follows:
  • kernel.shmmni = 4096
  • kernel.shmall = 2097152
  • kernel.shmmax = 268435456
  • kernel.sem = 500 256000 250 1024
  • fs.file-max = 524288
  • kernel.pid_max = 12000
  • kernel.threads-max = 48000
If you plan to run more than one queue manager of moderate size on the server, increase the file-max parameter, fs.file-max.
To view the kernel parameters for your system, enter the following commands:
  • cat /proc/sys/kernel/shmmni
  • cat /proc/sys/kernel/shmall
  • cat /proc/sys/kernel/shmmax
  • cat /proc/sys/kernel/sem
  • cat /proc/sys/fs/file-max

Each of these commands returns the value of the corresponding kernel parameter. For example, cat /proc/sys/kernel/shmmni returns the value for kernel.shmmni. If any of the values is less than the minimum value, you need to increase it to at least the minimum value.

To add or alter these values, log on as a user with root authority. Open the file /etc/sysctl.conf with a text editor, then add or change the following entries to the values shown:
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 268435456
kernel.sem = 500 256000 250 1024
fs.file-max = 524288
Then save and close the file.
To load these sysctl values immediately, enter the following command:
sysctl -p

If you do not issue the sysctl -p command, the new values are loaded when the system is rebooted.

By default the Linux kernel has a maximum process identifier, that can also be used with threads, and might limit the allowed number of threads.

The operating system reports when the system lacks the necessary resources to create another thread, or the system-imposed limit on the total number of threads in a process {PTHREAD_THREADS_MAX} would be exceeded.

For more information on kernel.threads-max and kernel.pid-max, see Resource shortage in WebSphere MQ queue manager when running a large number of clients

Maximum open files

If the system is heavily loaded, you might need to increase the maximum possible number of open files. If your distribution supports the proc file system you can query the current limit by issuing the following command:
cat /proc/sys/fs/file-max
.
To report on the current maximum, and in-use, number of file descriptors for your system, enter the following commands:
  • /sbin/sysctl fs.file-max
  • /sbin/sysctl fs.file-nr
If you are using a pluggable security module such as PAM (Pluggable Authentication Module), ensure that this module does not unduly restrict the number of open files for the mqm user. To report the maximum number of open file descriptors per process for the mqm user, login as the mqm user and enter the following values:
ulimit -n
For a standard IBM WebSphere MQ queue manager, set the nofile value for the mqm user to 10240 or more. To set the maximum number of open file descriptors for processes running under the mqm user, add the following information to the /etc/security/limits.conf file:
mqm              hard    nofile          10240
mqm              soft    nofile          10240

Maximum processes

A running IBM WebSphere MQ queue manager consists of a number of thread programs. Each connected application increases the number of threads running in the queue manager processes. It is normal for an operating system to limit the maximum number of processes that a user runs. The limit prevents operating system failures due to an individual user or subsystem creating too many processes. You must ensure that the maximum number of processes that the mqm user is allowed to run is sufficient. The number of processes must include the number of channels and applications that connect to the queue manager.

The following calculation is useful when determining the number of processes for the mqm user:
nproc = 2048 + clientConnections * 4 + qmgrChannels * 4 +
    localBindingConnections
where:
  • clientConnections is the maximum number of connections from clients on other machines connecting to queue managers on this machine.
  • qmgrChannels is the maximum number of running channels (as opposed to channel definitions) to other queue managers. This includes cluster channels, sender/receiver channels, and so on.
  • localBindingConnections does not include application threads.
The following assumptions are made in this algorithm:
  • 2048 is a large enough contingency to cover the queue manager threads. This might need to be increased if a lot of other applications are running.
  • When settting nproc, take into account the maximum number of applications, connections, channels and queue managers that might be run on the machine in the future.
  • This algorithm takes a pessimistic view and the actual nproc needed might be slightly lower for later versions of IBM WebSphere MQ and fastpath channels.
  • [V7.5.0.8 Jun 2017]In Linux, each thread is implemented as a light-weight process (LWP) and each LWP is counted as one process against nproc.
You can use the PAM_limits security module to control the number of processes that users run. You can configure the maximum number of processes for the mqm user as follows:
mqm             hard    nproc           4096
mqm             soft    nproc           4096
For more details on how to configure the PAM_limits security module type, enter the following command:
man limits.conf

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