The Operating System
This page details important operating system and kernel settings that should be considered when optimising the server. The focus of this page is geared towards Red Hat 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
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
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