Tuning the Database ServerΒΆ
MariaDB database
MariaDB: Tuning Server Parameters
According to this documentation, the two most important variables to configure are key_buffer_size and table_open_cache.
PostgreSQL database
PostgreSQL: Server Configuration