Hosting & Domaining Forum

Hosting Discussion => Colocation, Data Centers, IP Space and Networks => Topic started by: jeffreyrogers on Oct 23, 2024, 12:22 AM

Title: Unlocking Multi-Core Support for Mariadb
Post by: jeffreyrogers on Oct 23, 2024, 12:22 AM
Upon conducting a thorough analysis, I observed that MariaDB is experiencing a bottleneck, wherein it's only leveraging a single core, resulting in a CPU utilization of 99% with no room for further escalation.

To optimize MariaDB's performance on the server, I'm seeking guidance on how to scale up the number of cores utilized. I've delved into the slave_parallel_threads parameter, but I'm uncertain about the optimal configuration and implementation. Could you provide expert advice on how to effectively register and configure this parameter to unlock MariaDB's full potential?
Title: Re: Unlocking Multi-Core Support for Mariadb
Post by: vmehranc on Oct 23, 2024, 02:19 AM
To optimize MariaDB's performance and leverage multiple cores, you need to adjust several parameters beyond just slave_parallel_threads. While slave_parallel_threads is crucial for parallel replication, it primarily impacts replication performance rather than query execution. First, ensure you have innodb_thread_concurrency set to a higher value to allow more threads to run concurrently. Additionally, consider tuning innodb_read_io_threads and innodb_write_io_threads for better I/O performance.
Title: Re: Unlocking Multi-Core Support for Mariadb
Post by: znickollo19 on Oct 23, 2024, 05:52 AM
It's crucial to ascertain the specific iteration of MariaDB that's being utilized.

Additionally, I need to know which storage engine is employed for the tables within the database environment.

Are there other applications running on the server that leverage distinct CPU architectures?

Furthermore, could you specify the operating system in use along with its version?

I'm also interested in the total number of CPU cores available on the server.

Lastly, what methods do you implement to track the performance metrics of an individual core?
Title: Re: Unlocking Multi-Core Support for Mariadb
Post by: SapSakIntitty on Oct 23, 2024, 11:20 AM
In a single-threaded scenario, I've observed that the CPU utilization is capped at a single core, which can lead to underutilization of system resources. However, when multiple connections are established, the workload is efficiently distributed across multiple cores, thereby maximizing throughput. This phenomenon is particularly noteworthy when running multi-threaded benchmarks, which can effectively harness the power of multi-core processors.

In other words, if the Thread Scheduler (TS) solely relies on its requests to MariaDB to gauge system load, it may only perceive the utilization of a single core. Nevertheless, when subjected to a multi-threaded stress test, the load is indeed dispersed across all available cores, thereby optimizing system performance.
Title: Re: Unlocking Multi-Core Support for Mariadb
Post by: catexotica on Oct 21, 2025, 04:34 AM
To fully utilize multi-core CPUs in MariaDB, adjust parameters like innodb_thread_concurrency, slave_parallel_threads, and innodb_read_io_threads. Ensure your workload is multi-threaded, as single-threaded operations will remain limited to one core. Monitoring tools can help assess core utilization and performance.