6.2 Estimating the kernel parameters
This section explains how to estimate the values for kernel parameters (Linux operating system parameters).
Before you activate an HADB server, you must set the kernel parameters appropriately. If the kernel parameter values are too small, HADB might not operate correctly. The following table provides guidelines for specifying the kernel parameter values, the files in which to set the kernel parameters, and the applicable parameter names.
No. |
Kernel parameter |
Specification guidelines |
Settings file and parameter name |
---|---|---|---|
1 |
shmmax |
Specifies, in bytes, the maximum size of a shared memory segment. Specify a value that is equal to or greater than the maximum value determined in 6.3.1 Determining the shared memory requirement. |
|
2 |
shmmni |
Specifies the maximum number of shared memory segments for the entire system. Specify 2,000 or a larger value. |
|
3 |
shmall |
Specifies the maximum number of shared memory pages for the entire system. Specify a value for SHMALL so that the value determined from the following formula is equal to or greater than the value specified for SHMMAX.
|
|
4 |
threads-max |
Specifies the maximum number of real threads that HADB can use. Specify a value that is equal to or greater than the value determined from the following formula: |
|
5 |
aio-max-nr |
Specify a value that is equal to or greater than the value determined from the formula in Figure 6‒3: Determining the value of the aio-max-nr kernel parameter. Figure 6‒3: Determining the value of the aio-max-nr kernel parameter appears after this table. |
|
6 |
rmem_default |
Specifies the default value for the size of the receive buffer. Specify 33,554,432 or a larger value. |
|
7 |
rmem_max |
Specifies the maximum size of the receive buffer. Specify 33,554,432 or a larger value. |
|
8 |
wmem_default |
Specifies the default value for the size of the send buffer. Specify 33,554,432 or a larger value. |
|
9 |
wmem_max |
Specifies the maximum size of the send buffer. Specify 33,554,432 or a larger value. |
|
10 |
nr_hugepages |
When you are applying HugePages to the shared memory, specify the number of pages to be allocated as HugePages. Specify a value that is equal to or greater than the value determined from the following formula: For details about the amount of shared memory required by the HADB server, see 6.3.1 Determining the shared memory requirement. You can use the following command to determine the page size per page in HugePages. Pay attention to the unit for the numeric value.
When the server machine's OS is started, HugePages reserves the number of pages of memory specified in this kernel parameter. If you specify for this kernel parameter a number of pages that exceeds the size of memory installed in the server machine on which the HADB server is installed, the OS cannot be started. Therefore, for this kernel parameter, you must specify a page number that does not exceed the size of memory installed in the server machine on which the HADB server is installed. |
|
11 |
hugetlb_shm_group |
When you are starting the HADB server by applying HugePages to the shared memory as a non-superuser, you must add the user's group ID to hugetlb_shm_group of the Linux kernel capability. You use the OS's id command to acquire the user's group ID. |
|
12 |
nofile |
Specify a value that is equal to or greater than the value determined from the formula in Figure 6‒4: Determining the value of the nofile kernel parameter. Figure 6‒4: Determining the value of the nofile kernel parameter appears after this table. |
|
13 |
file-max |
Specify a value that is at least the value specified for nofile. |
|
14 |
memlock |
Specify the upper limit of the memory lock for the shared memory. Specify the memory size provided in the server machine on which the HADB server is installed. |
|
15 |
nproc |
Specify the upper limit of the number of real threads to be used by HADB. Specify a value that is equal to or greater than the value determined from the following formula: |
|
16 |
/sys/block/device-name/queue/nr_requests |
Sets up the depth of the kernel's I/O queue. Specify 8192. Change the command-side queue depth queue_depth also. For details about how to set up the queue_depth parameter, see OS- and HBA-related documentation. |
|
17 |
/sys/block/device-name/queue/scheduler |
Sets up the I/O scheduler for each device. Specify deadline. |
|
18 |
/sys/block/device-name/queue/rq_affinity |
If the device is a flash drive, specify 2. |
|
19 |
/sys/block/device-name/queue/add_random |
If the device is a flash drive, specify 0. |
|
20 |
/sys/block/device-name/queue/rotational |
If the device is a flash drive, specify 0. |
|
- #
-
If the HADB server is set to be started automatically from Job Management Partner 1/Automatic Job Management System 3, the kernel parameter does not take effect even if it is set to /etc/security/limits.conf. You must use one of the following methods to specify the kernel parameter:
-
Specify the kernel parameter in the environment setting parameters in the job execution environment.
-
Specify the kernel parameter in the automated startup script of Job Management Partner 1/Automatic Job Management System 3.
For details, see Precautions applying when the JP1/AJS3 service starts automatically in Notes on using Unix jobs in the Job Management Partner 1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
-
Use the following formula to determine the value of the aio-max-nr kernel parameter in Table 6‒2: Guidelines and locations for specifying kernel parameter values.
Use the following formula to determine the value of the nofile kernel parameter in Table 6‒2: Guidelines and locations for specifying kernel parameter values.