21.4 Estimating Linux kernel parameter values

This section describes the procedures for estimating the Linux kernel parameter values (or kernel parameter values). If kernel parameter values are too small, HiRDB may not function correctly. Table 21-4 shows the guidelines for the Linux kernel parameter values.

Table 21-4 Guidelines for the Linux kernel parameter values

Kernel parameterGuideline for valueExample of option settings file*
NR_OPENSpecify at least MAX(1344,value of pd_max_open_fds, n)./etc/security/limits.confnofile
NR_FILESpecify at least MAX{1600, 320[Figure](h - g) + [a + (b[Figure]c) + 320] [Figure]g + 848 [Figure]i + h[Figure] 2 + 227 + k[Figure]m}.
If the value determined from this formula exceeds the system maximum, use the system maximum value.
/proc/sys/fs/file-max
nprocSpecify at least (value of pd_max_server_process + e, 512).
If the value required by another program running on the server machine is greater than this value, use that value.
/etc/security/limits.confnproc
threads-maxSpecify at least MAX((value of pd_max_server_process + 20) [Figure] number of units that operate on the server machine, 576)./proc/sys/kernel/threads-max
MSGMNISpecify the number of message queue identifiers required by all programs that are run on the server machine. For details about the number of message queue identifiers required by HiRDB, see 21.5 Estimating the sizes of message queues and semaphores. Add the values obtained./proc/sys/kernel/msgmni
SEMMNISpecify the number of semaphore identifiers required by all programs that are run on the server machine. For details about the number of semaphore identifiers required by HiRDB, see 21.5 Estimating the sizes of message queues and semaphores. Add the values obtained. The recommended value is 1024 or greater.Parameter 4 in /proc/sys/kernel/sem
SEMMNSSpecify the number of semaphores required by all programs that are run on the server machine. For details about the number of semaphores required by HiRDB, see 21.5 Estimating the sizes of message queues and semaphores. Add the values obtained. The recommended value is 7200 or greater.Parameter 2 in /proc/sys/kernel/sem
SHMMAXSpecify at least MAX(p + q, r, s, t), and at least 200000000​.
If the global buffer dynamic update facility is used, consider the size of the global buffers to be added; if there is a possibility that the size of the added part will become greater than the specified value, specify the anticipated size of the added part.
Specify in the HiRDB system definition's SHMMAX operand a value no greater than the value for shmmax determined here.
/proc/sys/kernel/shmmax
SHMMNISpecify a value of 2000 or greater.
If the global buffer dynamic update facility is used, add the following value. Add 1 when the security audit facility is used.
  • HiRDB/Single Server
    Value of pd_max_add_dbbuff_shm_no
  • HiRDB/Parallel Server
    n
    [Figure] Value of the pd_max_add_dbbuff_shm_no operand specified in each server definition
    i=1
    n: Number of back-end servers in the server machine + number of dictionary servers
/proc/sys/kernel/shmmni
SHMSEGSpecify a value of 240 or greater.
If the global buffer dynamic update facility is used, add the maximum value of the pd_max_add_dbbuff_shm_no operand specified in each server definition.
Also, add 1 when the security audit facility is used.
/proc/sys/kernel/shmseg
SHMALLSpecify the value obtained by adding the size of shared memory required for other programs running on the same server machine to si, which is the size of shared memory allocated by HiRDB on the server./proc/sys/kernel/shmall
* The file depends on the OS and kernel versions being used. See the applicable OS documentation and set appropriate values, using the values provided in the table as guidelines. With some OS versions, parameter settings may not be necessary. If a kernel parameter is not supported by the OS being used, its setting is not needed.
a: Number of input data files used by the load creation utility or the number of unload data files used by the database reorganization utility
b: Maximum number of index row partitions (subject to processing by the database load utility or database reorganization utility)
c: Number of indexes (subject to processing by the database load utility or database reorganization utility)
e: Maximum number of concurrently executable commands (including utilities)
g: One of the following values:
  • HiRDB/Single Server: Value of pd_max_users operand + value of pd_max_reflect_process_count operand
  • HiRDB/Parallel Server: Total of the following values for all back-end and dictionary servers in the unit:
    Value of pd_max_bes_process operand + value of pd_max_reflect_process_count operand
    Value of pd_max_dic_process operand + value of pd_max_reflect_process_count operand
h: Value of pd_max_server_process operand
i: Number of servers in the unit
k: Value of pd_max_users operand + value of pd_max_reflect_process_count operand
m: One of the following values:
  • HiRDB/Parallel Server, with front-end servers in the unit, and pd_lck_release_detect=pipe: 2
  • Other than the above: 0
n: If you specify the batch index creation mode or index information output mode as the index creation mode with the database load utility, database reorganization utility, or rebalancing utility, use the value obtained from the following formula:
MIN (576 + b[Figure] c, maximum value of the pd_max_open_fds operand)
For details about the maximum value of the pd_max_open_fds operand, see the manual HiRDB Version 8 System Definition.
p: Size of the shared memory used by the unit controller
q: Size of the shared memory used by the Single Server or each server
r: Value specified in the HiRDB system definition's SHMMAX operand
s: Estimated value for shared memory used by global buffers
For details about estimating the shared memory used by global buffers, see 16.1.5 Formula for size of shared memory used by global buffers for a HiRDB/Single Server, and see 16.2.5 Formula for size of shared memory used by global buffers for a HiRDB/Parallel Server.
si: Shared memory allocated by HiRDB at the corresponding server machine
t: Estimated value for shared memory used by the security audit information buffer
For details about estimating the size of shared memory used by the security audit information buffer, see 16.1.2 Calculation of required memory for a HiRDB/Single Server, and see 16.2.2 Calculation of required memory for a HiRDB/Parallel Server.
Organization of this section
(1) Linux-specific specifications

(1) Linux-specific specifications

With the Linux version, if the extended internet service daemon (referred to hereafter as xinetd) is active, the values set in its settings file xinetd.conf may require adjustment. Therefore, we recommend that you adjust parameters in the settings file.

  1. For the settings for the shell service, set the first argument of the cps attribute (number of connections that can be processed per second) to at least number of BESs to be started at the machine times 10.
  2. For the settings for the shell service, set the instances attribute (maximum number of services that can be executed concurrently) to at least value set in 1 above times 2.

For details about xinetd and xinetd.conf, see the OS documentation.