суббота, 17 декабря 2016 г.

Пример настройки параметров ядра Linux для работы DB2

Использован образ 2016-12-16-17-img

http://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm.db2.luw.qb.server.doc/doc/t0008238.html
На компьютере с 24Gb RAM
# ipcs -l
 
------ Пределы совм. исп. памяти --------
максимальное количество сегментов = 4096      // SHMMNI
максимальный размер сегмента (кбайт) = 32768  // SHMMAX
max total shared memory (kbytes) = 8388608    // SHMALL
минимальный размер сегмента (байт) = 1

------ Пределы семафоров --------
максимальное количество массивов = 128        // SEMMNI
максимум семафоров на массив = 250            // SEMMSL
максимум семафоров на всю систему = 32000     // SEMMNS
максимум операций на вызов семафора = 32      // SEMOPM
максимальное значение семафора = 32767

------ Лимиты сообщений --------
максимум очередей для всей системы = 32768    // MSGMNI
максимальный размер сообщения (байт) = 8192   // MSGMAX
максимальный по умолчанию размер
сообщения (байт) = 16384                      // MSGMNB 
 
http://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm.db2.luw.qb.server.doc/doc/c0057140.html 
 
 
IPC kernel parameter

Enforced minimum setting for Version 9.7 Fix Pack 1 or earlier Enforced minimum setting for Version 9.7 Fix Pack 2 or later fix packs
kernel.shmmni (SHMMNI) no value is enforced 256 * <size of RAM in GB>
kernel.shmmax (SHMMAX)
268 435 456 (32-bit kernel)
1 073 741 824 (64-bit kernel)
<size of RAM in bytes>1
kernel.shmall (SHMALL) no value is enforced 2 * <size of RAM in the default system page size>2
kernel.sem (SEMMNI) 1 024 256 * <size of RAM in GB>
kernel.sem (SEMMSL) no value is enforced 250
kernel.sem (SEMMNS) no value is enforced 256 000
kernel.sem (SEMOPM) no value is enforced 32
kernel.msgmni (MSGMNI) 1 024 1 024 * <size of RAM in GB>
kernel.msgmax (MSGMAX) 65 536 65 536
kernel.msgmnb (MSGMNB) 65 536 65 536 3
  1. On 32-bit Linux operating systems, the enforced minimum setting for SHMMAX is limited to 4 294 967 295 bytes.
  2. SHMALL limits the total amount of virtual shared memory that can be allocated on a system. Each DB2 data server efficiently manages the amount of system memory it consumes, also know as committed memory. The DB2 data server allocates more virtual memory than it commits to support memory preallocation and dynamic memory management. Memory preallocation benefits performance. Dynamic memory management is the process of growing and shrinking real memory usage within separate virtual shared memory areas. To support memory preallocation and dynamic memory management, effectively, it is frequently necessary for data servers to allocate more virtual shared memory on a system than the amount of physical RAM. The kernel requires this value as a number of pages.
  3. Load performance might benefit from a larger message queue size limit, specified in bytes by MSGMNB. You can view message queue usage can by running the ipcs -q command. If the message queues are at capacity, or reaching capacity, during load operations, consider increasing the number of bytes the message queue size limit. Before DB2 Version 9.7 Fix Pack 3, if a message queue became full, the DB2 Version 9.7 load utility failed with SQL2044N. For more information about MSGMNB settings, see APAR IC65152.
 
Если RAM 8Gb 
kernel.shmmax=8589934592kernel.shmall=8589934592/4096*2=4194304
kernel.shmmni=256*8=2048 
 
Если RAM 16Gb
kernel.shmmax=17179869184 
kernel.shmall=17179869184/4096*2=8388608
kernel.shmmni=256*16=4096
  
Если RAM 24Gb 
kernel.shmmax=25769803776
kernel.shmall=25769803776/4096*2=12582912
kernel.shmmni=256*24=6144
 
---------------------------------------------------- 
# nano /etc/sysctl.conf
 
#Example for a computer with 24GB of RAM:
kernel.shmmni=6144
kernel.shmmax=25769803776
kernel.shmall=12582912
#kernel.sem=<SEMMSL> <SEMMNS> <SEMOPM> <SEMMNI>
kernel.sem=250 256000 32 6144
kernel.msgmni=24576
kernel.msgmax=65536
kernel.msgmnb=65536
 
Run sysctl with -p parameter
to load in sysctl settings from the default file /etc/sysctl.conf: 
 
# sysctl -p
kernel.shmmni = 6144
kernel.shmmax = 25769803776
kernel.shmall = 12582912
kernel.sem = 250 256000 32 6144
kernel.msgmni = 24576
kernel.msgmax = 65536
kernel.msgmnb = 65536
 
---------------------------------------------------- 
Подготовим систему для установки db2 ./setup
 
# apt-get install libaio1 ksh libstdc++6-4.4-dev libstdc++6-4.4-pic
# apt-get install libpam0g:i386
# ln -s /lib/i386-linux-gnu/libpam.so.0 /lib/libpam.so
as root 
# echo 0 > /proc/sys/kernel/randomize_va_space
 
as sudo user  $ sudo sh -c "echo 0 > /proc/sys/kernel/randomize_va_space"  
 
Подготовленный для установки образ сохраним.
 
Сохранение SSD
2016-12-17-15-img  
 
 
 
 
 

Комментариев нет:

Отправить комментарий