.
contact contact

B.08.40 / Release Notes / Installation

Linux Kernel Parameters

 
.
  Eloquence B.08.40 may require the configuration of additional Linux kernel parameters or adjustment of previously configured kernel parameters. Default settings on contemporary Linux versions should typically be sufficent for small to medium size installations.

The Eloquence eloqdb database server is a multi-threaded process that opens a set of files (volume files, log files, etc), allocates its internal database BufferCache, and waits for incoming client connections via TCP sockets. For each client it creates an OS level thread and by default it uses Sys V IPC semaphores and shared memory to communicate with the clients, if they are on the same host.

The following sections discuss Linux kernel parameters involved.

You may have to increase some of the Linux kernel parameters beyond the default values, depending on your number of eloqdb servers and their eloqdb.cfg settings like Threads or BufferCache, for example.

Note that the discussion below only explains the requirements for the eloqdb database server(s). When adjusting kernel parameters, you need to also take into account any requirements by other applications as well as the operating system itself. So you will typically add to existing settings, to be on the safe side.


Processes / Threads

  • kernel.threads-max (also see /proc/sys/kernel/threads-max and sysctl.conf)
  • RLIMIT_NPROC / ulimit -u (also see setrlimit, pam_limits, and limits.conf)
The default settings for kernel.threads-max and RLIMIT_NPROC should typically be sufficient, even with large [config] Threads values in eloqdb.cfg and/or multiple eloqdb server instances per system.

Each eloqdb server process creates a small number of internal OS threads, typically below 10, and one additional OS thread for every concurrent DB client connection (regardless of the number of DBOPENs by each client).

Use

threads-max     >= SUM of "10 + max number of clients (Threads)" per eloqdb
RLIMIT_NPROC    >= MAX of "10 + max number of clients (Threads)" per eloqdb
In other words: threads-max depends on the total number of client threads across your eloqdb servers, whereas RLIMIT_NPROC depends on the eloqdb server with the largest number of client threads.

For example:

eloqdb server A: Threads = 1000
eloqdb server B: Threads =  300
eloqdb server C: Threads =  200

threads-max     >= 1530  ( 3*10+1000+300+200 )
RLIMIT_NPROC    >= 1010  ( 10+1000 )


$ sysctl -n kernel.threads-max  # default sufficient
126227

$ ulimit -u  # max user processes, default sufficient
63113

Sys V IPC semaphores

  • semmni and semmns in kernel.sem (also see /proc/sys/kernel/sem and sysctl.conf)
Each eloqdb server process uses Sys V IPC semaphores and shared memory for communicating with the database clients running on the local system, unless eloqdb.cfg is configured for [Server] EnableIPC = 0. For remote database clients, only the TCP socket connection is used.

When using Sys V IPC semaphores, the eloqdb server allocates a semaphore identifier with 2 semaphores for each concurrent client connection and also makes use of SEM_UNDO operations for each of these client sessions.

Unless you have a large number of eloqdb servers, the Linux default for semmns will typically be sufficient. However, you may need to increase semmni in some cases, for example with large [config] Threads values in eloqdb.cfg.

Use

semmni >= SUM of "max number of clients (Threads)" per eloqdb
semmns >= SUM of 2 * "max number of clients (Threads)" per eloqdb
In other words: semmni and semmns depend on the total number of client threads across your eloqdb servers .

For example:

eloqdb server A: Threads = 1000
eloqdb server B: Threads =  300
eloqdb server C: Threads =  200

semmni >= 1500  ( 1000+300+200 )
semmns >= 3000  ( 2*1000+2*300+2*200 )


$ sysctl -n kernel.sem       # SEMMSL, SEMMNS, SEMOPM, SEMMNI
250     32000   32      128

# sysctl -w kernel.sem="250 32000 32 1628"  # increase SEMMNI
kernel.sem = 250 32000 32 1628
Note that sysctl -w only changes the running system, not the sysctl.conf file.


Sys V IPC shared memory

  • kernel.shmmni (also see /proc/sys/kernel/shmmni and sysctl.conf)
  • kernel.shmmax (also see /proc/sys/kernel/shmmax and sysctl.conf)
  • kernel.shmall (also see /proc/sys/kernel/shmall and sysctl.conf)
Each eloqdb server process uses Sys V IPC semaphores and shared memory for communicating with the database clients running on the local system, unless eloqdb.cfg is configured for [Server] EnableIPC = 0. For remote database clients, only the TCP socket connection is used.

For EnableIPC=2 (the default) the eloqdb server allocates a single shared memory segment for communicating with local database clients. The segment size depends on the configured max number of clients, ie [config] Threads. For EnableIPC=1 the eloqdb server allocates a separate 32 KB segment for each database client.

Unless you have a large number of eloqdb servers or use EnableIPC=1, the Linux defaults for shmmni will typically be sufficient. The setting for shmmax may need to be increased if you have a large [config] Threads value in eloqdb.cfg and use (the default) EnableIPC=2.

With EnableIPC=2 use

shmmni >= number of eloqdb servers

shmmax >= MAX of 32 KB * "max number of clients (Threads)" per eloqdb
With EnableIPC=1 use
shmmni >= SUM of "max number of clients (Threads)" per eloqdb
          plus number of eloqdb servers
Using EnableIPC=2 is recommended for efficiency reasons.


 
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision: 2023-12-04  
  Copyright © 1995-2024 Marxmeier Software AG