Configuring the MariaDB x64 server for working with Kaspersky Security Center Linux

Recommended settings for the my.cnf file

For more details about DBMS configuring, refer also to the account configuring procedure. For information about DBMS installation, refer to the DBMS installation procedure.

To configure the my.cnf file:

  1. Open the my.cnf file in a text editor.
  2. Enter the following lines into the [mysqld] section of the my.cnf file:

    sort_buffer_size=10M

    join_buffer_size=100M

    join_buffer_space_limit=300M

    join_cache_level=8

    tmp_table_size=512M

    max_heap_table_size=512M

    key_buffer_size=200M

    innodb_buffer_pool_size=<value>

    innodb_thread_concurrency=20

    innodb_flush_log_at_trx_commit=0

    innodb_lock_wait_timeout=300

    max_allowed_packet=32M

    max_connections=151

    max_prepared_stmt_count=12800

    table_open_cache=60000

    table_open_cache_instances=4

    table_definition_cache=60000

    The value of the innodb_buffer_pool_size must be no less than 80 percent of the expected KAV database size. Note that the specified memory is allocated at server startup. If the database size is smaller than the specified buffer size, only the required memory is allocated. If you use MariaDB 10.4.3 or older, the actual size of allocated memory is approximately 10 percent greater than the specified buffer size.

    It is recommended to use the parameter value innodb_flush_log_at_trx_commit=0, because the values "1" or "2" negatively affect the operating speed of MariaDB. Ensure that the innodb_file_per_table parameter is set to 1.

    For MariaDB 10.6, additionally enter the following lines into the [mysqld] section:

    optimizer_prune_level=0

    optimizer_search_depth=8

By default, the optimizer add-ons join_cache_incremental, join_cache_hashed, join_cache_bka are enabled. If these add-ons are not enabled, you must enable them.

To check whether optimizer add-ons are enabled:

  1. In the MariaDB client console, execute the command:

    SELECT @@optimizer_switch;

  2. Make sure that its output contains the following lines:

    join_cache_incremental=on

    join_cache_hashed=on

    join_cache_bka=on

    If these lines are present and have the values on, then optimizer add-ons are enabled.

    If these lines are missing or have off values, you need to do the following:

    1. Open the my.cnf file in a text editor.
    2. Add the following lines into the my.cnf file:

      optimizer_switch='join_cache_incremental=on'

      optimizer_switch='join_cache_hashed=on'

      optimizer_switch='join_cache_bka=on'

The add-ons join_cache_incremental, join_cache_hash, and join_cache_bka are enabled.

Page top