Nonstop Database, HiRDB Version 9 Installation and Design Guide

[Contents][Index][Back][Next]

20.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. The following table provides guidelines for Linux kernel parameter values.

Table 20-4 Guidelines for the Linux kernel parameter values

Kernel parameter Guideline for value Example of option settings file#
hard nofile Specify 8,192. /etc/security/limits.conf
soft nofile There is no need to specify this value because it will be set by HiRDB. --
fs.file-max MAX{1,600, 320 [Figure] (h - g - i) + [a + (b [Figure] c) + 320] [Figure] g + 848 [Figure] i + h [Figure] 2 + 227 + k [Figure] m + C}
Specify at least the value obtained in the above formula by adding one of the following:
[Figure] HiRDB single server configuration
value of pd_max_users + value of pd_max_reflect_process_count
[Figure] HiRDB parallel server configuration
(D + 3 [Figure] number of servers in the unit) [Figure] E
D: Total the values found by executing the following formulas for each server in the unit.
Back-end server
value of pd_max_bes_process + value of pd_max_reflect_process_count
Dictionary server
value of pd_max_dic_process + value of pd_max_reflect_process_count
If the pd_max_bes_process or pd_max_dic_process operand is omitted, perform this calculation using the pd_max_users value.
If the unit has multiple back-end servers, perform this calculation for each back-end server.
E: 16 (number of lock-release wait threads)
If the value determined from this formula exceeds the system maximum, use the system maximum value.
/proc/sys/fs/file-max
nproc Specify 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.conf
threads-max Specify at least MAX((value of pd_max_server_process + 20), 576). /proc/sys/kernel/threads-max
msgmnb See 20.1 Estimating HP-UX OS parameter values, under msgmnb formula. Specify at least the value obtained. However, for a multi-HiRDB configuration, specify the largest of the values obtained for the HiRDB systems. /proc/sys/kernel/msgmnb
msgmni Specify 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 20.5 Estimating the sizes of message queues and semaphores. Add the values obtained. /proc/sys/kernel/msgmni
SEMMNI Specify 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 20.5 Estimating the sizes of message queues and semaphores. Add the values obtained. The recommended value is 1,024 or greater. Parameter 4 in /proc/sys/kernel/sem
SEMMNS Specify 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 20.5 Estimating the sizes of message queues and semaphores. Add the values obtained. The recommended value is 7,200 or greater. Parameter 2 in /proc/sys/kernel/sem
shmmax Specify at least MAX(p + q, r, s, t), and at least 200,000,000.
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 the value of shmmax obtained here or less in the SHMMAX operand of the HiRDB system definition.
/proc/sys/kernel/shmmax
shmmni Specify a value of 2,000 or greater.
  • If you are using the security audit facility, add 1.
  • If you are using the facility for dynamically changing global buffers, add the following values. If you are using the security audit facility, add 1.
    HiRDB single server configuration
    value of the pd_max_add_dbbuff_shm_no operand
    HiRDB parallel server configuration
    n
    [Figure]values of the pd_max_add_dbbuff_shm_no operands set in each server definition
    i=1
    n: number of back-end servers + dictionary servers on the server machine
  • If you are using in-memory data processing, add:
    HiRDB single server configuration
    value of the pd_max_resident_rdarea_shm_no operand
    HiRDB parallel server configuration
    value of the pd_max_resident_rdarea_shm_no operand [Figure] number of back-end servers
/proc/sys/kernel/shmmni
SHMALL Specify 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

Legend:
--: Not applicable

#: 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 and divided-input data files used by the database load utility, or the number of unload data files used by the database reorganization utility

b: Maximum number of index row partitions (indexes subject to processing by the database load utility, database reorganization utility, or rebalancing utility)

c: Number of indexes (indexes subject to processing by the database load utility, database reorganization utility, or rebalancing utility)

e: Maximum number of concurrently executable commands (including utilities)

g: One of the following values:
  • HiRDB single server configuration: Value of pd_max_users operand + value of pd_max_reflect_process_count operand
  • HiRDB parallel server configuration: 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:
  • If a front-end server exists in the unit in a HiRDB parallel server configuration: 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(MAX(576, number of HiRDB servers in the system + 448) + 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 9 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 15.1.5 Formula for size of shared memory used by global buffers for a HiRDB single server configuration, and see 15.2.5 Formula for size of shared memory used by global buffers for a HiRDB parallel server configuration.

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 15.1.2 Calculation of required memory for a HiRDB single server configuration, and see 15.2.2 Calculation of required memory for a HiRDB parallel server configuration.

C:
For a HiRDB single server configuration: MAX(256, (number of HiRDB servers in the system + 32)) [Figure] (g + k) + (h - k) [Figure] MAX(number of HiRDB servers in the system, number of units)
For a HiRDB parallel server configuration: MAX(256, (number of HiRDB servers in the system + 32)) [Figure] (g + k) + (h - g - k) [Figure] MAX(number of HiRDB servers in the system, number of units)
 
Note
TCP ports might go into TIME_WAIT status, TCP ports in the system as a whole might run short and cause transactions to generate errors, or HiRDB might terminate abnormally. Should any such problems occur, set the operating system parameters to avoid port shortages. For details, see 22.4.4 Ways to avoid a shortage of ports.
Organization of this section
(1) Linux-specific specifications

(1) Linux-specific specifications

For the Linux version, values specified in settings files such as xinetd.conf for the extended Internet service daemon (hereafter, xinetd) must be adjusted when the daemon is started. For that reason, specify the following values in the settings file parameters. When a calculated value is smaller than the default for that parameter, you do not need to change the parameter.

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

(a) The cps attribute

To set for shell service, specify the following values for the first argument (connections processed per second) of the cps attribute.

For a HiRDB single server configuration:
If there is no utility special unit: A
If there is a utility special unit: MAX(A, B)
A: number of single servers activated by the machine [Figure] 4
B: maximum concurrent executions of pdcopy and pdrstr [Figure] 2

For a HiRDB parallel server configuration: MAX(C, (D + E1 + E2))
C: number of dictionary servers started by the machine
[Figure] total number of back-end servers defined in the HiRDB system [Figure] 6
+ number of dictionary servers started by the machine
[Figure] total number of back-end servers defined in the HiRDB system [Figure] 2
+ number of back-end servers started by the machine [Figure] 7
+ number of dictionary server s started by the machine [Figure] 4
D: maximum number of concurrent executions of pdcopy and pdrstr
[Figure] (number of back-end servers defined in the HiRDB system + 4)
E1: number of concurrently executable operation commands and utilities [Figure] 3
E2: When operation involves executing the pdtrndec command, the following totals; when it does not, 0
When there is a FES on the machine, the value of pd_max_users
When there is a BES on the machine, the value of pd_max_bes_process
When there is a DS on the machine, the value of pd_max_dic_process
(b) The instances attribute

With the settings for shell service, specify value set in (a) [Figure] 2 in the instances attribute (the maximum value that the service can concurrently execute).