Database Auto-Configuration

Database Auto-Configuration

Smart Auto-Configuration automatically adjusts MySQL, MariaDB, and Percona database settings according to the resource limit assigned to each container.

The platform updates the /etc/my.cnf configuration file so that the database can use the allocated RAM and CPU resources more effectively.

Automatically Managed Parameters

Smart Auto-Configuration adjusts the following database parameters:

key_buffer_size Controls the memory allocated for MyISAM index blocks.
table_open_cache Defines how many open tables the database server can keep cached.
myisam_sort_buffer_size Sets the buffer used during MyISAM index creation and repair.
innodb_buffer_pool_size Defines the main memory area used by InnoDB for data and index caching.

For MySQL and Percona 5.7 or 8.0, and MariaDB 10.x, the platform also manages:

  • innodb_buffer_pool_instances — deprecated in MariaDB 10.6.x, where one pool instance is always used.
  • innodb_buffer_pool_chunk_size

Apply Manual Configuration

To manage the auto-configured parameters manually, set the JELASTIC_AUTOCONFIG environment variable to one of the following values:

  • false
  • disable
  • 0
Disable database auto-configuration with JELASTIC_AUTOCONFIG
Set JELASTIC_AUTOCONFIG to false, disable, or 0 before applying manual values.
Important: When Smart Auto-Configuration remains enabled, manual changes to the managed settings can be overwritten automatically.

Override Individual Settings

Instead of disabling the complete auto-configuration mechanism, individual database parameters can be overridden in:

/etc/mysql/conf.d/my_custom.cnf

Values defined in this custom file can override settings from /etc/my.cnf, including parameters normally managed by Smart Auto-Configuration.

Use the custom configuration file when only selected parameters need manual values and the remaining database settings should continue to be managed automatically.

Legacy Implementation

Older database containers use a legacy auto-configuration method. To make manual changes to auto-managed settings on these containers, remove the following line from the beginning of /etc/my.cnf:

#Jelastic autoconfiguration mark.

Jelastic autoconfiguration mark in my.cnf
Remove the legacy autoconfiguration mark before editing managed settings manually.
Configuration safety: Create a backup of the database configuration before changing managed parameters, and verify the server after restarting it.

What’s next?