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
/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.Kernel configuration
IBM WebSphere MQ uses System V IPC resources, in particular shared memory and semaphores.
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
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.
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.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
cat /proc/sys/fs/file-max
./sbin/sysctl fs.file-max
/sbin/sysctl fs.file-nr
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
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.
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.
- 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.
- In Linux, each thread is implemented as a light-weight process (LWP) and each LWP is counted as one process against nproc.
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
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.