Linux Kernel tunables - I/O scheduler
For our DB2 system we configured several of the Linux kernel parameters. Changes we made are detailed below.
The following Linux® kernel parameters were configured on the data
server. We selected the deadline I/O scheduler1 and used the following parameters:
- front_merge 0 (default 1) - avoids scanning of the scheduler queue for front mergers, which rarely occur. This was expected to save CPU time.
- write_expire 500 (default 5000) - force the same timeout for write requests as for read requests.
- writes_starved 1, (default 2) - process the next write request after each read request (per the default, two read requests are done before the next write request).
For the shared memory parameters, we set:
- kernel.shmmax = 63350767616 (maximum size of a shared memory segment in bytes)
- kernel.shmmni = 4096 (maximum number of shared memory segments)
- kernel.shmall = 15466496 (available memory for shared memory in 4 K pages)
The above values enabled the entire 59 GB memory size for one shared memory segment (shmmax, in bytes) to have a maximum of 4096 segments and 59 GB total shared memory (shmall, in pages). This enabled large segments to be created and avoided the need for thousands of small shared memory segments with their accompanying overhead.
1 The default I/O scheduler is
the Completely Fair Queuing (CFQ) scheduler.