Universal Messaging 10.5 | Concepts | Performance, Scalability and Resilience | Performance Tuning | The Linux Operating System
 
The Linux Operating System
This page details important operating system and kernel settings that should be considered when optimizing the server. The focus of this page is geared towards Red Hat Enterprise Linux. Many of the suggestions here have synonymous commands under Solaris or Windows, which can be applied to have a similar effect.
Configuring User Limits
Unix has a configurable limit on the number of processes, file descriptors and threads available per user. This functionality is aimed to prevent a user from consuming all of the resources on a machine. These limits are often set to a reasonably low level, as a general purpose user will not consume many of these objects at any one time.
Application Servers like Universal Messaging may, if under considerable load, wish to consume a large number of these resources. Each open connection to a client for example consumes a file descriptor, and application servers which can support tens of thousands of concurrent connections will thus require as many file descriptors. It is therefore important to increase these limits for Universal Messaging.
Temporarily Increasing limits using the ulimit command
ulimit is a UNIX command which can be used to alter user limits. To increase the user limits which Universal Messaging consumes the following commands are recommended:
ulimit -n 250000
ulimit -u 10000
This will increase the number of file descriptors and the number of user processes allowed. Any processes spawned from the terminal this was entered on will inherit these limits.
Permanently Increasing User Limits
It is also possible to permanently increase the user limits by editing the relevant configuration file. This configuration file can usually be found in /etc/security/limits.conf.
user soft nofile 250000
user hard nofile 250000
user soft nproc 10000
user hard nproc 10000
Configuring Mapped Memory Regions
vm.max_map_count is a Linux kernel parameter that defines the maximum count of mapped memory regions allowed in the system.
When you use Universal Messaging multi-file disk stores, you might need to modify vm.max_map_count to prevent out-of-memory issues and increased resource consumption in your system.
With multi-file disk stores, Universal Messaging uses memory mapped files to read and write data with a focus on optimized performance. However, memory mapped files require mapped areas and file descriptors as system resources, which you control using the vm.max_map_count and ulimits parameters.
Therefore, you might need to calculate the minimum requirements for file descriptors and mapped memory regions per store and adjust vm.max_map_count accordingly. For more information about calculating these requirements, see How to Calculate File Descriptor and Mapped Memory Requirements per Store.
Disabling Processor Power Saving States
Many new processors have mechanisms which allow them to dynamically turn individual cores on and off to save power. These mechanisms may sometimes degrade processor and memory performance. In applications that require consistent low latency performance it is recommended to disable this feature.
Many processors manage this by using the cpuspeed service. This service can be disabled, which on many machines and architectures will turn this functionality off.
service cpuspeed stop
Some processors however will require further work to disable power saving states. Whether or not your processor will require extra configuration and what those configuration steps are vary from processor to processor. Many Intel processors for example may require the following command to be appended to the boot options of your operating system
intel_idle.max_cstate=0
As mentioned above however, this will not be necessary for all processors. Consult with your processor specific documentation for information on disabling power saving states.
Stop the Interrupt Request Balance Service
Interrupts are signals generated, generally by devices, to notify a CPU that there is processing which needs to be done. Interrupt Request (IRQ) Balancing is the act of dividing these processes up between cores on a CPU. In some situations this may harm performance of applications running on the CPU, as these interrupts consume processor cycles and loads information into memory.
Disabling IRQ balancing will assign all interrupts to a single core by default. It is possible to assign interrupts to certain cores, but that is beyond the scope of this section. To disable IRQ balance, use the following command.
service irqbalance stop