The configuration tips for a first-time setup apply to the Informix Server Version 11.70.xC2.
Memory-related Parameters of the Linux Kernel
For IWA to work properly it may be necessary to adjust some memory-related kernel parameters for the Linux operating system. Following is the short list of these parameters and a brief description for each.
If changing of a parameter is needed, this is best done in the file
/etc/sysctl.conf to ensure that the change is permanently in
effect, also after a reboot of the system. Directly after editing this
file the new change can be made effective by running the command
sysctl -p as user root. This will avoid having to
reboot the system for the changes to become effective.
Defines the maximum size in bytes of a single shared memory segment. This should be set at least to the size of WORKER_SHM. Setting it to a greater value normally does not any harm (e.g. in case WORKER_SHM should be increased at a later time). The maximum sensible value is not higher than the physically available memory of the machine.
To permanently change this parameter set the parameter kernel.shmmax in /etc/sysctl.conf.
kernel.shmmax = 274877906944
To check the current setting of the parameter look at the pseudo file /proc/sys/kernel/shmmax with a command like:
Defines the maximum size in pages of all shared memory on the system. Normally the default value for this parameter is 2097152 (pages). With the default page size of 4096 bytes this amounts to 8 GB. In case of doubt about the actual value of the page size on a specific system run the command
getconf PAGE_SIZE. If a machine has more physical memory than what is defined for SHMALL, then this parameter should be increased accordingly.
To permanently change this parameter set the parameter kernel.shmall in /etc/sysctl.conf.
kernel.shmall = 67108864
for shared memory allowance up to 256 GB (with a page size of 4 KB).
To check the current setting of the parameter look at the pseudo file /proc/sys/kernel/shmall with a command like:
Controls the memory overcommit behavior of the system. If enabled processes can allocate more memory than actually available. Three different values are possible:
- 0 : Heuristic memory overcommit. The system decides when and where to allow memory over-commitment. This is the default and used for typical systems.
- 1 : Memory over-commitment is always allowed. May be useful for some scientific applications.
- 2 : Do not allow memory over-commitment. The total allocated memory on the system cannot exceed the swap space plus a configurable percentage of physical RAM. With a sensible percentage of RAM configured this will avoid having processes killed because of an OOM (out-of-memory) situation.
For IWA the preferred setting of overcommit_memory is 2.
To permanently change this parameter set the parameter vm.overcommit_memory in /etc/sysctl.conf.
vm.overcommit_memory = 2
To check the current setting of the parameter look at the pseudo file /proc/sys/vm/overcommit_memory with a command like:
Defines the percentage of the physical memory size to include in the memory overcommit calculation done in the following way:
mem_alloc_limit = swap_space + phys_mem * (overcommit_ratio / 100)
Where swap_space is the total size of all swap areas and phys_mem is the size of physically existing memory in the system.
For IWA a proven setting of overcommit_ratio is 99.
To permanently change this parameter set the parameter vm.overcommit_ratio in /etc/sysctl.conf.
vm.overcommit_ratio = 99
To check the current setting of the parameter look at the pseudo file /proc/sys/vm/overcommit_ratio with a command like:
The Linux OOM behaviour will be a topic for my next blog entry as background information on some of kernel parameters described here.