modifying Linux Kernel Parameters__linux

Source: Internet
Author: User
Tags db2 semaphore

This article is reproduced from: http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm.

In addition, http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.server.doc/doc/ T0008238.html also explains how to modify the kernel parameters.

To update kernel parameters:red Hat and SUSE Linux The following information can is used to determine if there are any NE Cessary changes required for your system.

The following is the output from the ipcs-l command. Comments have been added following the the//to show what the parameter names.

 # ipcs-l------Shared Memory Limits--------max number of segments = 4096/S
   Hmmni Max seg Size (Kbytes) = 32768//SHMMAX Max Total shared memory (Kbytes) = 8388608//Shmall
   Min seg Size (bytes) = 1------semaphore Limits--------max number of arrays = 1024//Semmni Max semaphores per array = SEMMSL Max semaphores system wide = 256000//semmns max op  S/semop call =//SEMOPM semaphore max value = 32767------messages:limits--------Max  Queues System wide = 1024//Msgmni max size of message (bytes) = 65536//msgmax default Max Size of queue (bytes) = 65536//MSGMNB 

Beginning with the Memory Limits, SHMMAX and Shmall are the parameters of that need to is looked at. SHMMAX is the maximum size of a shared memory segment on a Linux system whereas Shmall are the maximum allocation of shared Memory pages on a system.

For SHMMAX, the minimum required on x86 systems would is 268435456 (256 MB) and for 64-bit systems, it would is 1073741824 (1 GB).

Shmall is set to 8 GB by default (8388608 KB = 8 GB). If you are have more physical memory than this, and it are to being used for DB2, then this parameter should to increased Ximately 90% of the physical memory as specified for your computer. For instance, if your have a computer system with GB of memory to AM used primarily for DB2, then 90% the GB is 14.4 G B divided by 4 KB (the base page size) is 3774873. The IPCS output has converted Shmall into kilobytes. The kernel requires this value as a number of pages.

The next section covers the amount of semaphores available to the operating system. The kernel parameter SEM consists of 4 tokens, SEMMSL, Semmns, SEMOPM and Semmni. Semmns is the "result of" SEMMSL multiplied by Semmni. The database Manager requires that the number of arrays (Semmni) is increased as necessary. Typically, Semmni should to twice the maximum number of connections allowed (maxagents) multiplied by the number of Logica L Partitions on the "Database server computer Plus" number of local application connections on the database server Compu ter.

The third section covers messages on the system.

Msgmni affects the number of agents that can is started, Msgmax affects the size of the message this can be sent in a Queu E, and MSGMNB affects the size of the queue.

Msgmax should be change to $ KB (which is, 65535 bytes), and MSGMNB should to increased on Server 65535.

To modify this kernel parameters, we need to edit the/etc/sysctl.conf file. If This file does is not exist, it should is created. The following lines are examples of what should is placed into the file:

kernel.sem=250 256000 1024
#Example Shmmax for a 64-bit system
kernel.shmmax=1073741824	
#Example shmall For percent of GB memory
kernel.shmall=3774873		
kernel.msgmax=65535
kernel.msgmnb=65535

Run sysctl with-p parameter to load in sysctl settings from the default file/etc/sysctl.conf.

   Sysctl-p

To make the changes effective after every reboot, Boot.sysctl needs to is active on SUSE Linux. On Red Hat, the rc.sysinitinitialization script would read the/etc/sysctl.conf file automatically.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.