Hitachi

Hitachi Advanced Database Setup and Operation Guide


3.3.1 Setting and checking the kernel parameters

Kernel parameters are set in the following files:

Kernel parameters are set by a superuser. If you are logged on as the HADB administrator (adbmanager), log off and then log on again as a superuser.

Note

This section explains how to use the vi command to set the kernel parameters in each file. You can also use a text editor to open and edit the individual files.

Organization of this subsection

(1) Setting the kernel parameters in the sysctl.conf file

First, set the kernel parameters in the sysctl.conf file. The sysctl.conf file is stored at the following location:

  1. Open the sysctl.conf file.

    As a superuser, enter the operating system command below and press Enter. Executing the vi command opens the sysctl.conf file in the edit mode:

    vi /etc/sysctl.conf
  2. Specify the kernel parameters.

    Press the I key to go into the insert mode. Once you are in the insert mode, use the cursor movement keys to move the cursor to the location where the kernel parameters are to be inserted and enter the following kernel parameters:

    net.core.rmem_default = 33554432
    net.core.rmem_max = 33554432
    net.core.wmem_default = 33554432
    net.core.wmem_max = 33554432
    fs.aio-max-nr = 65536
    Note

    If these kernel parameters are already specified in the sysctl.conf file, make their existing lines into comments so that their settings can be restored. To make a line into a comment, enter a hash mark (#) at the beginning of the line.

    Example

    Regard #net.core.rmem_default = 10000 as a comment and ignore its value:

    #net.core.rmem_default = 10000

    net.core.rmem_default = 33554432

    The following table provides the details of the kernel parameters that are to be specified.

    Table 3‒3: List of kernel parameters to be specified in the sysctl.conf file

    No.

    Kernel parameter

    Description

    1

    net.core.rmem_default

    Specifies the default window size for receive operations. Specify 33554432.

    2

    net.core.rmem_max

    Specifies the maximum window size for receive operations. Specify 33554432.

    3

    net.core.wmem_default

    Specifies the default window size for send operations. Specify 33554432.

    4

    net.core.wmem_max

    Specifies the maximum window size for send operations. Specify 33554432.

    5

    fs.aio-max-nr

    Specify 65536.

  3. End setup of the kernel parameters.

    When you have completed entering the required kernel parameters in the insert mode, press Esc to go into the command mode. When you are in the command mode, enter the following command and press Enter:

    :wq

    The entries you made in the insert mode are saved. Kernel parameters have now been set in the sysctl.conf file.

(2) Verifying the kernel parameters that were set in the sysctl.conf file

To verify that the kernel parameters have been set correctly in the sysctl.conf file, enter the command shown below and press Enter. You can check the kernel parameters that have been set in the sysctl.conf file.

sysctl -p

Executing the sysctl -p command displays a list of the kernel parameters that are set in the sysctl.conf file. Because the list of kernel parameters that are displayed is extremely long, the following shows only an excerpt as an example of the execution results.

■ Execution result example
          :
net.core.rmem_default = 33554432
net.core.rmem_max = 33554432
net.core.wmem_default = 33554432
net.core.wmem_max = 33554432
fs.aio-max-nr = 65536
          :

(3) Setting the kernel parameters in the limits.conf file

Set the kernel parameters in the limits.conf file. The limits.conf file is stored at the following location:

  1. Open the limits.conf file.

    Enter the following OS command and press Enter: By executing the vi command, you can edit the limits.conf file.

    vi /etc/security/limits.conf
  2. Specify the kernel parameters.

    Press the I key to go into the insert mode. Once you are in the insert mode, use the cursor movement keys to move the cursor to the location where kernel parameters are to be inserted and enter the following kernel parameters:

    adbmanager   soft   nofile    6400
    adbmanager   hard   nofile    6400
    adbmanager   soft   memlock   unlimited
    adbmanager   hard   memlock   unlimited
    Note

    If these kernel parameters are already specified in the limits.conf file, make their existing lines into comments so that their settings can be restored. To change a line to a comment, enter a hash mark (#) at the beginning of the line.

    Example

    #adbmanager soft nofile 1000

    adbmanager soft nofile 6400

    The following table provides the details of the kernel parameters that are to be specified.

    Table 3‒4: List of kernel parameters to be specified in the limits.conf file

    No.

    Kernel parameter

    Description

    1

    soft nofile

    Specifies the number of file descriptors that can be opened. Specify soft nofile for the HADB administrator (adbmanager). Specify 6400 for soft nofile.

    2

    hard nofile

    Specifies the number of file descriptors that can be opened. Specify hard nofile for the HADB administrator (adbmanager). Specify 6400 for hard nofile.

    3

    soft memlock

    Specifies the upper limit of the memory lock for the shared memory. Specify soft memlock for the HADB administrator (adbmanager). Specify unlimited for soft memlock.

    4

    hard memlock

    Specifies the upper limit of the memory lock for the shared memory. Specify hard memlock for the HADB administrator (adbmanager). Specify unlimited for hard memlock.

    Important

    The value 6400 specified in soft nofile and hard nofile is for building the hands-on environment. When configuring an environment that will be used for actual operations and not a hands-on environment, first estimate the required values according to 6.2 Estimating the kernel parameters, and then specify those values.

    When you configure an environment that will be used for actual operations, there are other kernel parameters that will need to be specified in addition to those specified in the sysctl.conf and limits.conf files in this chapter.

  3. End setup of the kernel parameters.

    When you have completed entering the required kernel parameters in the insert mode, press Esc to go into the command mode. When you are in the command mode, enter the following command and press Enter:

    :wq

    The entries you made in the insert mode are saved. Kernel parameters have now been set in the limits.conf file.

(4) Verifying the kernel parameters that were set in the limits.conf file

To verify that the kernel parameters have been set correctly in the limits.conf file, enter the OS command shown below and press Enter. By changing from the superuser to the HADB administrator (adbmanager), you can check the kernel parameters that have been set in the limits.conf file.

su adbmanager

The user is temporarily changed to the HADB administrator (adbmanager). As the HADB administrator, enter the following OS command and press Enter:

ulimit -a

Executing the ulimit -a command displays a list of the kernel parameters that are set for the HADB administrator (adbmanager). Because the list of kernel parameters that are displayed is extremely long, the following shows only an excerpt as an example of the execution results.

■ Execution result example
            :
max locked memory      (kbytes, -l) unlimited
open files                     (-n) 6400
            :

After checking the execution result example, change the user back from the HADB administrator (adbmanager) to the superuser by entering the following OS command and pressing Enter:

exit

(5) Enabling the kernel parameters

You must restart the operating system to apply the kernel parameters that you have set in the sysctl.conf and limits.conf files. Enter the following OS command and press Enter:

reboot

(6) Related items

6.2 Estimating the kernel parameters