Configuring memory for Informix Warehouse Accelerator
To process queries efficiently, verify that you have the optimal configuration for the operating-system kernel parameters, shared memory, and swap space on the computer where Informix® Warehouse Accelerator is installed. You can also monitor the virtual memory usage to see if you need to reduce the total size of the loaded data marts or add physical memory.
- vm.overcommit_memory and the vm.overcommit_ratio kernel parameters
- SHMMAX kernel parameter
- Shared memory for the worker nodes and the coordinator node (/dev/shm)
- Swap space configuration
- Virtual memory usage
vm.overcommit_memory and the vm.overcommit_ratio kernel parameters
To avoid issues that might arise if the Linux kernel runs out of memory, set the vm.overcommit_memory parameter and the vm.overcommit_ratio parameter to values that are optimal for Informix Warehouse Accelerator.
- Add the following lines to the /etc/sysctl.conf file:
vm.overcommit_memory = 2 vm.overcommit_ratio = 99
- Run the sysctl -p command for the settings to take effect.
For more information, see your operating-system documentation.
SHMMAX kernel parameter
The SHMMAX kernel parameter defines the maximum size in bytes of a single shared memory segment. For Informix Warehouse Accelerator, the optimal value of the SHMMAX kernel parameter is the size of physical memory. The minimum value is the WORKER_SHM parameter * 1048576 .
Use this command to check the value of the SHMMAX kernel parameter. The output value is printed in bytes.
sysctl kernel.shmmaxTo change the value of the SHMMAX kernel parameter:
- Add the following line to /etc/sysctl.conf file
where bytes is the number of bytes:
kernel.shmmax = bytes
- Run the sysctl -p command for the setting to take effect.
For more information, see your operating-system documentation.
Swap space configuration
Even on systems that have a large amount of total memory, configuring the swap space can be an advantage. Swap space can prevent unexpected situations where the system might need more memory than is available.
Check the total and the used swap space with this command:
free -mExample output (in megabytes):
total used free shared buffers cached
Mem: 2010 664 1345 0 124 357
-/+ buffers/cache: 182 1827
Swap: 3138 0 3138
Configure the swap space as recommended by your Linux vendor. For example, for Red Hat Enterprise Linux (RHEL) 5:
Total memory Total swap space
4GB or less min 2GB
4GB to 16GB min 4GB
16GB to 64GB min 8GB
64GB to 256GB min 16GB
256GB to 512GB min 32GB
For more information, see your operating-system documentation.
Virtual memory usage
Some types of SQL queries might need a lot of memory, which is allocated on an as-needed basis. This additional memory is different from the shared memory that is used for the data mart data. For optimal performance, avoid swapping out memory pages to disk. First check if memory pages are currently swapped out to disk. If memory pages are swapped out to disk, reduce the total size of the loaded data marts or add physical memory.
Check if the memory pages are swapped out to disk with this command:
vmstat -S m 3Example output in megabytes, and 3-seconds intervals:
procs -----------memory-------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 54 1843 3 200 0 0 17 20 14 9 2 0 97 0 0
1 0 54 1673 3 201 0 0 263 0 1028 193 11 3 85 2 0
0 0 54 1803 3 201 0 0 0 36 1019 222 35 9 56 0 0
If values in so column are greater than zero, then pages are swapped out in the interval.
An alternative method for automated monitoring is this command:
vmstat -s -S mExample output (in megabytes, swap-related lines only):
201 m swap cache
3291 m total swap
54 m used swap
3237 m free swap
6761440 pages swapped in
7111235 pages swapped out
If value of pages swapped out has incremented since the last time that you ran the command, then the pages have been swapped out.
For more information, see your operating-system documentation.